|
Compiere 3.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.compiere.framework.PO
org.compiere.model.X_AD_Table
org.compiere.model.MTable
public class MTable
Persistent Table Model
| Field Summary |
|---|
| Fields inherited from class org.compiere.framework.PO |
|---|
ACCESSLEVEL_ALL, ACCESSLEVEL_CLIENT, ACCESSLEVEL_CLIENTORG, ACCESSLEVEL_ORG, ACCESSLEVEL_SYSTEM, ACCESSLEVEL_SYSTEMCLIENT, ENTITYTYPE_Dictionary, ENTITYTYPE_UserMaintained, I_ZERO, log, p_changeVO, p_info, XML_ATTRIBUTE_AD_Table_ID, XML_ATTRIBUTE_Record_ID |
| Constructor Summary | |
|---|---|
MTable(Ctx ctx,
int AD_Table_ID,
String trxName)
Standard Constructor |
|
MTable(Ctx ctx,
ResultSet rs,
String trxName)
Load Constructor |
|
| Method Summary | |
|---|---|
protected boolean |
afterDelete(boolean success)
After Delete |
protected boolean |
afterSave(boolean newRecord,
boolean success)
After Save |
protected boolean |
beforeSave(boolean newRecord)
Before Save |
static MTable |
get(Ctx ctx,
int AD_Table_ID)
Get Table from Cache |
static MTable |
get(Ctx ctx,
String tableName)
Get Table from Cache |
static Class<?> |
getClass(String tableName)
Get Persistency Class for Table |
MColumn |
getColumn(String columnName)
Get Column |
MColumn[] |
getColumns(boolean requery)
Get Columns |
MColumn[] |
getColumns(String entityType)
Get Columns |
ArrayList<MTable> |
getDependentsDirect()
Get Direct Dependent Tables |
HashMap<String,MTable> |
getDependentsTable(String entityType)
Get Table Reference Dependent Tables |
ArrayList<MColumn> |
getFKs(boolean includeList)
Get Columns which are Foreign Keys |
String[] |
getIdentifierColumns()
Get User Identifier Columns of Table |
String[] |
getKeyColumns()
Get Key Columns of Table (might be parent) |
String[] |
getKeyColumns(boolean withParents)
Get Key Columns of Table |
PO |
getPO(Ctx ctx,
int Record_ID,
String trxName)
Get PO Class Instance |
PO |
getPO(Ctx ctx,
int Record_ID,
String trxName,
boolean newRecord)
Get PO Class Instance |
PO |
getPO(Ctx ctx,
Map<String,String> context)
Get PO |
PO |
getPO(Ctx ctx,
ResultSet rs,
String trxName)
Get PO Class Instance |
PO |
getPO(Ctx ctx,
String whereClause,
String trxName)
Get PO Class Instance |
PO[] |
getPOs(Ctx ctx,
String whereClause,
String orderClause,
String trxName)
Get POs Class Instance |
String |
getSelectColumns()
Get list of columns for SELECT statement. |
String |
getSQLCreate()
Get SQL Create statement |
String |
getSQLCreate(boolean requery)
Get SQL Create |
static MTable[] |
getSubTables(Ctx ctx,
int Base_Table_ID)
Get Sub Tables |
static String |
getTableName(Ctx ctx,
int AD_Table_ID)
Get Table Name |
static MTable[] |
getTables(Ctx ctx,
String entityType)
Get all active Tables |
static MTable[] |
getTables(Ctx ctx,
String where,
String entityType)
Get all active Tables |
static MTable[] |
getTablesByQuery(Ctx ctx,
String sql)
Get all active Tables with input sql |
String[] |
getUniqueIDColumns()
Get Unique ID Columns of Table |
MViewComponent[] |
getViewComponent(boolean reload)
Get MViewComponent Class Instances |
String |
getViewCreate(boolean requery)
Get SQL Create View |
String |
getViewDrop()
Get SQL Create View |
boolean |
isSingleKey()
Table has a single Key |
static void |
main(String[] args)
Test |
String |
toString()
String Representation |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MTable(Ctx ctx,
int AD_Table_ID,
String trxName)
ctx - contextAD_Table_ID - idtrxName - transaction
public MTable(Ctx ctx,
ResultSet rs,
String trxName)
ctx - contextrs - result settrxName - transaction| Method Detail |
|---|
public static MTable[] getTables(Ctx ctx,
String entityType)
ctx - contextentityType - optional entity Type ignored
public static MTable[] getTables(Ctx ctx,
String where,
String entityType)
ctx - contextwhere - where clauseentityType - optional entity type
public static MTable[] getSubTables(Ctx ctx,
int Base_Table_ID)
ctx - contextBase_Table_ID - base table
public static MTable[] getTablesByQuery(Ctx ctx,
String sql)
ctx - user contextsql - query to get the tables
public static MTable get(Ctx ctx,
int AD_Table_ID)
ctx - contextAD_Table_ID - id
public static MTable get(Ctx ctx,
String tableName)
ctx - contexttableName - case insensitive table name
public static String getTableName(Ctx ctx,
int AD_Table_ID)
ctx - contextAD_Table_ID - table
public static Class<?> getClass(String tableName)
tableName - table name
public MColumn[] getColumns(boolean requery)
requery - requery
public MColumn[] getColumns(String entityType)
entityType -
public MColumn getColumn(String columnName)
columnName - (case insensitive)
public boolean isSingleKey()
public String[] getKeyColumns()
public String[] getKeyColumns(boolean withParents)
withParents - with parents
public String[] getIdentifierColumns()
public String[] getUniqueIDColumns()
public String getSelectColumns()
public ArrayList<MColumn> getFKs(boolean includeList)
includeList - include list entities
public ArrayList<MTable> getDependentsDirect()
public HashMap<String,MTable> getDependentsTable(String entityType)
entityType - optional entity type
public PO getPO(Ctx ctx,
int Record_ID,
String trxName)
ctx - context for PORecord_ID - record - 0 = newtrxName - transaction
public PO getPO(Ctx ctx,
int Record_ID,
String trxName,
boolean newRecord)
ctx - context for PORecord_ID - record - loads valid 0 records if newRecord is falsetrxName - transactionnewRecord - new record
public PO getPO(Ctx ctx,
ResultSet rs,
String trxName)
ctx - context for POrs - result settrxName - transaction
public PO getPO(Ctx ctx,
Map<String,String> context)
ctx - general context for POcontext - record context
public PO getPO(Ctx ctx,
String whereClause,
String trxName)
ctx - context for POwhereClause - where clause resulting in single recordtrxName - transaction
public PO[] getPOs(Ctx ctx,
String whereClause,
String orderClause,
String trxName)
ctx - context for POwhereClause - optional where clauseorderClause - optional order bytrxName - transaction
protected boolean beforeSave(boolean newRecord)
beforeSave in class POnewRecord - new
protected boolean afterSave(boolean newRecord,
boolean success)
afterSave in class POnewRecord - newsuccess - success
protected boolean afterDelete(boolean success)
afterDelete in class POsuccess - success
public String getSQLCreate()
public String getSQLCreate(boolean requery)
requery - refresh columns
public String getViewDrop()
requery - refresh columns
public String getViewCreate(boolean requery)
requery - refresh columns
public MViewComponent[] getViewComponent(boolean reload)
reload - boolean if it need to reload
public String toString()
toString in class X_AD_Tablepublic static void main(String[] args)
args -
|
Compiere 3.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||