Class PO_Record

java.lang.Object
org.compiere.model.PO_Record

public class PO_Record extends Object
Maintain AD_Table_ID/Record_ID constraint
Version:
$Id: PO_Record.java,v 1.4 2006/07/30 00:58:04 jjanke Exp $
Author:
Jorg Janke
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    deleteModelCascade(String tableName, Serializable Record_IDorUU, String trxName)
    Delete dependent records.
    This is model class implementation of the delete cascade option of foreign key constraint.
    protected static boolean
    deleteRecordCascade(int AD_Table_ID, Serializable Record_IDorUU, String whereTables, String trxName)
    Delete Cascade including (selected)parent relationships
    protected static String
    exists(int AD_Table_ID, Serializable Record_IDorUU, String trxName)
    Check if dependent records with delete restrict condition exists for a table/record combination.
    static void
    setRecordNull(int AD_Table_ID, Serializable Record_IDorUU, String trxName)
    If a referencing Record ID or Record UU exists to the deleted record, set it to NULL.
    This is model class implementation of the set null option of foreign key constraint.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PO_Record

      public PO_Record()
  • Method Details

    • deleteRecordCascade

      protected static boolean deleteRecordCascade(int AD_Table_ID, Serializable Record_IDorUU, String whereTables, String trxName)
      Delete Cascade including (selected)parent relationships
      Parameters:
      AD_Table_ID - table
      Record_IDorUU - record ID (int) or UUID (String)
      whereTables - filter for the Tables
      trxName - transaction
      Returns:
      false if could not be deleted
    • deleteModelCascade

      public static void deleteModelCascade(String tableName, Serializable Record_IDorUU, String trxName)
      Delete dependent records.
      This is model class implementation of the delete cascade option of foreign key constraint.
      Parameters:
      tableName -
      Record_IDorUU - record ID (int) or UUID (String)
      trxName -
    • setRecordNull

      public static void setRecordNull(int AD_Table_ID, Serializable Record_IDorUU, String trxName)
      If a referencing Record ID or Record UU exists to the deleted record, set it to NULL.
      This is model class implementation of the set null option of foreign key constraint.
      Parameters:
      AD_Table_ID -
      Record_IDorUU - record ID (int) or UUID (String)
      trxName -
    • exists

      protected static String exists(int AD_Table_ID, Serializable Record_IDorUU, String trxName)
      Check if dependent records with delete restrict condition exists for a table/record combination.
      Parameters:
      AD_Table_ID - table
      Record_IDorUU - record ID (int) or UUID (String)
      trxName - transaction
      Returns:
      error message (Table Name) or null