Package org.compiere.model
Class PO_Record
java.lang.Object
org.compiere.model.PO_Record
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
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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 relationshipsprotected 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.
-
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
- tableRecord_IDorUU
- record ID (int) or UUID (String)whereTables
- filter for the TablestrxName
- transaction- Returns:
- false if could not be deleted
-
deleteModelCascade
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
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
Check if dependent records with delete restrict condition exists for a table/record combination.- Parameters:
AD_Table_ID
- tableRecord_IDorUU
- record ID (int) or UUID (String)trxName
- transaction- Returns:
- error message (Table Name) or null
-