Package org.compiere.model
Class POInfo
java.lang.Object
org.compiere.model.POInfo
- All Implemented Interfaces:
Serializable
Persistent Object Info.
Provides structural information.
- Version:
- $Id: POInfo.java,v 1.2 2006/07/30 00:58:37 jjanke Exp $
- Author:
- Jorg Janke, Victor Perez, e-Evolution SC
- [ 2195894 ] Improve performance in PO engine
- https://sourceforge.net/p/adempiere/feature-requests/555/
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionBuild SQL SELECT statement.buildSelect
(boolean fullyQualified, boolean noVirtualColumn) Build SQL SELECT statement.buildSelect
(boolean fullyQualified, String... virtualColumns) Build SQL SELECT statement.buildSelectForColumns
(boolean fullyQualified, String[] columns) Build SQL SELECT statement for columns.Get Table Access Levelint
getAD_Column_ID
(String columnName) Get AD_Column_IDint
Get AD_Table_IDprotected POInfoColumn
getColumn
(int index) Get Column InfoClass<?>
getColumnClass
(int index) Get Column Classint
Get ColumnCountgetColumnDescription
(int index) Get Column Descriptionint
getColumnDisplayType
(int index) Get Column Display Typeint
getColumnIndex
(int AD_Column_ID) Get Column Indexint
getColumnIndex
(String ColumnName) Get Column IndexgetColumnLabel
(int index) Get Column LabelgetColumnLookup
(int index) Get LookupgetColumnName
(int index) Get Column NamegetColumnSQL
(int index) Get Column SQL or Column NamegetDefaultLogic
(int index) Get Column Default Logicint
getFieldLength
(int index) Get Column FieldLengthint
getFieldLength
(String columnName) Get Column FieldLengthstatic POInfo
getPOInfo
(Properties ctx, int AD_Table_ID) POInfo Factory Methodstatic POInfo
getPOInfo
(Properties ctx, int AD_Table_ID, String trxName) POInfo Factory MethodGet Table Nameboolean
Table has a Key Columnboolean
isAllowCopy
(int index) Is allowed copying this columnboolean
isAllowLogging
(int index) Is allowed logging on this columnboolean
Is save changes to change log tableprotected boolean
isColumnAlwaysLoadedForPartialPO
(int columnIndex) Is column should always be loaded for partial loading of POboolean
isColumnLookup
(int index) Is Lookup Columnboolean
isColumnMandatory
(int index) Is Column Mandatoryboolean
isColumnParent
(int index) Is Column Parentboolean
isColumnTranslated
(int index) Is Column Translatedboolean
isColumnUpdateable
(int index) Is Column Updateableboolean
isEncrypted
(int index) Is Column (data) Encryptedboolean
isKey
(int index) Is Column Keyboolean
isSecure
(int index) Is column secureboolean
Is Table Translatedboolean
isVirtualColumn
(int index) Is Column Virtual?boolean
isVirtualDBColumn
(int index) Is Column Virtual DB?boolean
isVirtualSearchColumn
(int index) Is Column Virtual Search?boolean
isVirtualUIColumn
(int index) Is Column Virtual UI?void
setColumnUpdateable
(int index, boolean updateable) Set Column Updateablevoid
setUpdateable
(boolean updateable) Set all columns updateabletoString()
String representationtoString
(int index) String representation for columnValidate value
-
Method Details
-
getPOInfo
POInfo Factory Method- Parameters:
ctx
- contextAD_Table_ID
- AD_Table_ID- Returns:
- POInfo
-
getPOInfo
POInfo Factory Method- Parameters:
ctx
- contextAD_Table_ID
- AD_Table_IDtrxName
- Transaction name- Returns:
- POInfo instance
-
toString
String representation -
toString
String representation for column- Parameters:
index
- column index- Returns:
- String Representation
-
getTableName
Get Table Name- Returns:
- Table Name
-
getAD_Table_ID
public int getAD_Table_ID()Get AD_Table_ID- Returns:
- AD_Table_ID
-
hasKeyColumn
public boolean hasKeyColumn()Table has a Key Column- Returns:
- true if table has a key column
-
getAccessLevel
Get Table Access Level- Returns:
- Table.ACCESS..
-
getColumnCount
public int getColumnCount()Get ColumnCount- Returns:
- column count
-
getColumnIndex
Get Column Index- Parameters:
ColumnName
- column name- Returns:
- index of column with ColumnName or -1 if not found
-
getColumnIndex
public int getColumnIndex(int AD_Column_ID) Get Column Index- Parameters:
AD_Column_ID
- column- Returns:
- index of column with AD_Column_ID or -1 if not found
-
getAD_Column_ID
Get AD_Column_ID- Parameters:
columnName
-- Returns:
- AD_Column_ID if found, -1 if not found
-
getColumn
Get Column Info- Parameters:
index
- column index- Returns:
- column info
-
getColumnName
Get Column Name- Parameters:
index
- column index- Returns:
- column name
-
getColumnSQL
Get Column SQL or Column Name- Parameters:
index
- column index- Returns:
- column sql or column name
-
isVirtualColumn
public boolean isVirtualColumn(int index) Is Column Virtual?- Parameters:
index
- column index- Returns:
- true if column is virtual
-
isVirtualDBColumn
public boolean isVirtualDBColumn(int index) Is Column Virtual DB?- Parameters:
index
- column index- Returns:
- true if column is virtual DB
-
isVirtualUIColumn
public boolean isVirtualUIColumn(int index) Is Column Virtual UI?- Parameters:
index
- index- Returns:
- true if column is virtual UI
-
isVirtualSearchColumn
public boolean isVirtualSearchColumn(int index) Is Column Virtual Search?- Parameters:
index
- index- Returns:
- true if column is virtual search
-
getColumnLabel
Get Column Label- Parameters:
index
- column index- Returns:
- column label
-
getColumnDescription
Get Column Description- Parameters:
index
- column index- Returns:
- column description
-
getColumnClass
Get Column Class- Parameters:
index
- column index- Returns:
- Class
-
getColumnDisplayType
public int getColumnDisplayType(int index) Get Column Display Type- Parameters:
index
- column index- Returns:
- DisplayType
-
getDefaultLogic
Get Column Default Logic- Parameters:
index
- column index- Returns:
- Default Logic
-
isColumnMandatory
public boolean isColumnMandatory(int index) Is Column Mandatory- Parameters:
index
- column index- Returns:
- true if column is mandatory
-
isColumnUpdateable
public boolean isColumnUpdateable(int index) Is Column Updateable- Parameters:
index
- column index- Returns:
- true if column is updateable
-
setColumnUpdateable
public void setColumnUpdateable(int index, boolean updateable) Set Column Updateable- Parameters:
index
- column indexupdateable
-
-
setUpdateable
public void setUpdateable(boolean updateable) Set all columns updateable- Parameters:
updateable
-
-
isColumnLookup
public boolean isColumnLookup(int index) Is Lookup Column- Parameters:
index
- column index- Returns:
- true if it is a lookup column
-
getColumnLookup
Get Lookup- Parameters:
index
- column index- Returns:
- Lookup or null
-
isKey
public boolean isKey(int index) Is Column Key- Parameters:
index
- column index- Returns:
- true if column is a key column
-
isColumnParent
public boolean isColumnParent(int index) Is Column Parent- Parameters:
index
- column index- Returns:
- true if column is a Parent column
-
isColumnTranslated
public boolean isColumnTranslated(int index) Is Column Translated- Parameters:
index
- column index- Returns:
- true if column is translated
-
isTranslated
public boolean isTranslated()Is Table Translated- Returns:
- true if table is translated
-
isEncrypted
public boolean isEncrypted(int index) Is Column (data) Encrypted- Parameters:
index
- column index- Returns:
- true if column is encrypted
-
isSecure
public boolean isSecure(int index) Is column secure- Parameters:
index
- column index- Returns:
- true if column is secure
-
isAllowLogging
public boolean isAllowLogging(int index) Is allowed logging on this column- Parameters:
index
- column index- Returns:
- true if column is allowed to be logged
-
isAllowCopy
public boolean isAllowCopy(int index) Is allowed copying this column- Parameters:
index
- column index- Returns:
- true if column is allowed to be copied
-
getFieldLength
public int getFieldLength(int index) Get Column FieldLength- Parameters:
index
- column index- Returns:
- field length or 0
-
getFieldLength
Get Column FieldLength- Parameters:
columnName
- Column Name- Returns:
- field length or 0
-
validate
Validate value- Parameters:
index
- column indexvalue
- value to validate- Returns:
- null if valid, otherwise error message
-
buildSelect
Build SQL SELECT statement.- Returns:
StringBuilder
instance with the SQL statement.
-
buildSelect
Build SQL SELECT statement.- Parameters:
fullyQualified
- prefix column names with the table namenoVirtualColumn
- Include (false
value) all declared virtual columns at once or use lazy loading (true
value).- Returns:
StringBuilder
instance with the SQL statement.
-
buildSelect
Build SQL SELECT statement.- Parameters:
fullyQualified
- prefix column names with the table namevirtualColumns
- names of virtual columns to include along with the regular table columns.
- if virtualColumns is null then all declared virtual columns will be included.
- if virtualColumns is an empty string array (new String[] {}), no declared virtual columns will be included.- Returns:
StringBuilder
instance with the SQL statement.
-
isColumnAlwaysLoadedForPartialPO
protected boolean isColumnAlwaysLoadedForPartialPO(int columnIndex) Is column should always be loaded for partial loading of PO- Parameters:
columnIndex
-- Returns:
- true if column should always be loaded for partial loading of PO
-
buildSelectForColumns
Build SQL SELECT statement for columns.- Parameters:
fullyQualified
- prefix column names with the table name- Returns:
StringBuilder
instance with the SQL statement.
-
isChangeLog
public boolean isChangeLog()Is save changes to change log table- Returns:
- if table save change log
-