Class POInfo

java.lang.Object
org.compiere.model.POInfo
All Implemented Interfaces:
Serializable

public class POInfo extends Object implements 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 Details

      • getPOInfo

        public static POInfo getPOInfo(Properties ctx, int AD_Table_ID)
        POInfo Factory
        Parameters:
        ctx - context
        AD_Table_ID - AD_Table_ID
        Returns:
        POInfo
      • getPOInfo

        public static POInfo getPOInfo(Properties ctx, int AD_Table_ID, String trxName)
        POInfo Factory
        Parameters:
        ctx - context
        AD_Table_ID - AD_Table_ID
        trxName - Transaction name
        Returns:
        POInfo
      • toString

        public String toString()
        String representation
        Overrides:
        toString in class Object
        Returns:
        String Representation
      • toString

        public String toString(int index)
        String representation for index
        Parameters:
        index - column index
        Returns:
        String Representation
      • getTableName

        public String 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 has a key column
      • getAccessLevel

        public String getAccessLevel()
        Get Table Access Level
        Returns:
        Table.ACCESS..
      • getColumnCount

        public int getColumnCount()
        Get ColumnCount
        Returns:
        column count
      • getColumnIndex

        public int getColumnIndex(String ColumnName)
        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 ColumnName or -1 if not found
      • getAD_Column_ID

        public int getAD_Column_ID(String columnName)
        Parameters:
        columnName -
        Returns:
        AD_Column_ID if found, -1 if not found
      • getColumn

        protected POInfoColumn getColumn(int index)
        Get Column
        Parameters:
        index - index
        Returns:
        column
      • getColumnName

        public String getColumnName(int index)
        Get Column Name
        Parameters:
        index - index
        Returns:
        ColumnName column name
      • getColumnSQL

        public String getColumnSQL(int index)
        Get Column SQL or Column Name
        Parameters:
        index - index
        Returns:
        ColumnSQL column sql or name
      • isVirtualColumn

        public boolean isVirtualColumn(int index)
        Is Column Virtual?
        Parameters:
        index - index
        Returns:
        true if column is virtual
      • isVirtualDBColumn

        public boolean isVirtualDBColumn(int index)
        Is Column Virtual DB?
        Parameters:
        index - 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

        public String getColumnLabel(int index)
        Get Column Label
        Parameters:
        index - index
        Returns:
        column label
      • getColumnDescription

        public String getColumnDescription(int index)
        Get Column Description
        Parameters:
        index - index
        Returns:
        column description
      • getColumnClass

        public Class<?> getColumnClass(int index)
        Get Column Class
        Parameters:
        index - index
        Returns:
        Class
      • getColumnDisplayType

        public int getColumnDisplayType(int index)
        Get Column Display Type
        Parameters:
        index - index
        Returns:
        DisplayType
      • getDefaultLogic

        public String getDefaultLogic(int index)
        Get Column Default Logic
        Parameters:
        index - index
        Returns:
        Default Logic
      • isColumnMandatory

        public boolean isColumnMandatory(int index)
        Is Column Mandatory
        Parameters:
        index - index
        Returns:
        true if column mandatory
      • isColumnUpdateable

        public boolean isColumnUpdateable(int index)
        Is Column Updateable
        Parameters:
        index - index
        Returns:
        true if column updateable
      • setColumnUpdateable

        public void setColumnUpdateable(int index, boolean updateable)
        Set Column Updateable
        Parameters:
        index - index
        updateable - column updateable
      • setUpdateable

        public void setUpdateable(boolean updateable)
        Set all columns updateable
        Parameters:
        updateable - updateable
      • isColumnLookup

        public boolean isColumnLookup(int index)
        Is Lookup Column
        Parameters:
        index - index
        Returns:
        true if it is a lookup column
      • getColumnLookup

        public Lookup getColumnLookup(int index)
        Get Lookup
        Parameters:
        index - index
        Returns:
        Lookup
      • isKey

        public boolean isKey(int index)
        Is Column Key
        Parameters:
        index - index
        Returns:
        true if column is the key
      • isColumnParent

        public boolean isColumnParent(int index)
        Is Column Parent
        Parameters:
        index - index
        Returns:
        true if column is a Parent
      • isColumnTranslated

        public boolean isColumnTranslated(int index)
        Is Column Translated
        Parameters:
        index - 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 - index
        Returns:
        true if column is encrypted
      • isSecure

        public boolean isSecure(int index)
        Parameters:
        index -
        Returns:
        true if column is secure
      • isAllowLogging

        public boolean isAllowLogging(int index)
        Is allowed logging on this column
        Parameters:
        index - index
        Returns:
        true if column is allowed to be logged
      • isAllowCopy

        public boolean isAllowCopy(int index)
        Is allowed copying this column
        Parameters:
        index - index
        Returns:
        true if column is allowed to be copied
      • getFieldLength

        public int getFieldLength(int index)
        Get Column FieldLength
        Parameters:
        index - index
        Returns:
        field length
      • getFieldLength

        public int getFieldLength(String columnName)
        Get Column FieldLength
        Parameters:
        columnName - Column Name
        Returns:
        field length or 0
      • validate

        public String validate(int index, Object value)
        Validate Content
        Parameters:
        index - index
        value - new Value
        Returns:
        null if all valid otherwise error message
      • buildSelect

        public StringBuilder buildSelect()
        Build SQL SELECT statement.
        Returns:
        StringBuilder instance with the SQL statement.
      • buildSelect

        public StringBuilder buildSelect(boolean fullyQualified, boolean noVirtualColumn)
        Build SQL SELECT statement.
        Parameters:
        fullyQualified - prefix column names with the table name
        noVirtualColumn - Include (false value) all declared virtual columns at once or use lazy loading (true value).
        Returns:
        StringBuilder instance with the SQL statement.
      • buildSelect

        public StringBuilder buildSelect(boolean fullyQualified, String... virtualColumns)
        Build SQL SELECT statement.
        Parameters:
        fullyQualified - prefix column names with the table name
        virtualColumns - names of virtual columns to include along with the regular table columns - if no value (or null) is provided then all declared virtual columns will be included.
        Returns:
        StringBuilder instance with the SQL statement.
      • isChangeLog

        public boolean isChangeLog()
        Returns:
        if table save log