Class MColumn

    • Constructor Detail

      • MColumn

        public MColumn​(Properties ctx,
                       int AD_Column_ID,
                       String trxName)
        Standard Constructor
        Parameters:
        ctx - context
        AD_Column_ID -
        trxName - transaction
      • MColumn

        public MColumn​(Properties ctx,
                       ResultSet rs,
                       String trxName)
        Load Constructor
        Parameters:
        ctx - context
        rs - result set
        trxName - transaction
      • MColumn

        public MColumn​(MTable parent)
        Parent Constructor
        Parameters:
        parent - table
      • MColumn

        public MColumn​(MColumn copy)
        Parameters:
        copy -
      • MColumn

        public MColumn​(Properties ctx,
                       MColumn copy)
        Parameters:
        ctx -
        copy -
    • Method Detail

      • get

        public static MColumn get​(int AD_Column_ID)
        Get MColumn from Cache (immutable)
        Parameters:
        AD_Column_ID - id
        Returns:
        MColumn
      • get

        public static MColumn get​(Properties ctx,
                                  int AD_Column_ID)
        Get MColumn from Cache (immutable)
        Parameters:
        ctx - context
        AD_Column_ID - id
        Returns:
        MColumn
      • get

        public static MColumn get​(Properties ctx,
                                  int AD_Column_ID,
                                  String trxName)
        Get MColumn from Cache (immutable)
        Parameters:
        ctx - context
        AD_Column_ID - id
        trxName - trx
        Returns:
        MColumn
      • getCopy

        public static MColumn getCopy​(Properties ctx,
                                      int AD_Column_ID,
                                      String trxName)
        Get updateable copy of MColumn from cache
        Parameters:
        ctx -
        AD_Column_ID -
        trxName -
        Returns:
        MColumn
      • get

        public static MColumn get​(Properties ctx,
                                  String tableName,
                                  String columnName)
        Get MColumn given TableName and ColumnName
        Parameters:
        ctx - context
        tableName -
        columnName -
        Returns:
        MColumn
      • get

        public static MColumn get​(Properties ctx,
                                  String tableName,
                                  String columnName,
                                  String trxName)
        Get MColumn given TableName and ColumnName
        Parameters:
        ctx - context
        tableName -
        columnName -
        trxName -
        Returns:
        MColumn
      • getColumnName

        public static String getColumnName​(Properties ctx,
                                           int AD_Column_ID)
      • getColumnName

        public static String getColumnName​(Properties ctx,
                                           int AD_Column_ID,
                                           String trxName)
        Get Column Name
        Parameters:
        ctx - context
        AD_Column_ID - id
        trxName - transaction
        Returns:
        Column Name or null
      • isStandardColumn

        public boolean isStandardColumn()
        Is Standard Column
        Returns:
        true for AD_Client_ID, etc.
      • isUUIDColumn

        public boolean isUUIDColumn()
        Is UUID Column
        Returns:
        true for UUID column
      • isVirtualColumn

        public boolean isVirtualColumn()
        Is Virtual Column
        Returns:
        true if virtual column
      • isVirtualDBColumn

        public boolean isVirtualDBColumn()
        Is Virtual DB Column
        Returns:
        true if virtual DB column
      • isVirtualUIColumn

        public boolean isVirtualUIColumn()
        Is Virtual UI Column
        Returns:
        true if virtual UI column
      • isVirtualSearchColumn

        public boolean isVirtualSearchColumn()
        Is Virtual Search Column
        Returns:
        true if virtual search column
      • isEncrypted

        public boolean isEncrypted()
        Is the Column Encrypted?
        Returns:
        true if encrypted
      • setIsEncrypted

        public void setIsEncrypted​(boolean IsEncrypted)
        Set Encrypted
        Parameters:
        IsEncrypted - encrypted
      • beforeSave

        protected boolean beforeSave​(boolean newRecord)
        Before Save
        Overrides:
        beforeSave in class PO
        Parameters:
        newRecord - new
        Returns:
        true
      • afterSave

        protected boolean afterSave​(boolean newRecord,
                                    boolean success)
        After Save
        Overrides:
        afterSave in class PO
        Parameters:
        newRecord - new
        success - success
        Returns:
        success
      • getSQLAdd

        public String getSQLAdd​(MTable table)
        Get SQL Add command
        Parameters:
        table - table
        Returns:
        sql
      • getSQLDDL

        public String getSQLDDL()
        Get SQL DDL
        Returns:
        columnName datataype ..
      • getSQLModify

        public String getSQLModify​(MTable table,
                                   boolean setNullOption)
        Get SQL Modify command
        Parameters:
        table - table
        setNullOption - generate null / not null statement
        Returns:
        sql separated by ;
      • getSQLDataType

        public String getSQLDataType()
        Get SQL Data Type
        Returns:
        e.g. NVARCHAR2(60)
      • getConstraint

        public String getConstraint​(String tableName)
        Get Table Constraint
        Parameters:
        tableName - table name
        Returns:
        table constraint
      • getColumn_ID

        public static int getColumn_ID​(String TableName,
                                       String columnName)
        get Column ID
        Parameters:
        TableName -
        columnName -
        Returns:
        int retValue
      • getTable_ID

        public static int getTable_ID​(Properties ctx,
                                      int AD_Column_ID,
                                      String trxName)
        Get Table Id for a column
        Parameters:
        ctx - context
        AD_Column_ID - id
        trxName - transaction
        Returns:
        MColumn
      • isSuggestSelectionColumn

        public static boolean isSuggestSelectionColumn​(String columnName,
                                                       boolean caseSensitive)
      • getReferenceTableName

        public String getReferenceTableName()
      • setSmartDefaults

        public void setSmartDefaults()
      • isAdvanced

        public boolean isAdvanced()
        Is Advanced
        Returns:
        true if the column has any field marked as advanced or part of an advanced tab
      • getColumnSQL

        public String getColumnSQL​(boolean nullForUI)
      • getColumnSQL

        public String getColumnSQL​(boolean nullForUI,
                                   boolean nullForSearch)
      • renameDBColumn

        public String renameDBColumn​(String newColumnName)