Class MAcctSchemaElement

    • Constructor Detail

      • MAcctSchemaElement

        public MAcctSchemaElement​(Properties ctx,
                                  int C_AcctSchema_Element_ID,
                                  String trxName)
        Standard Constructor
        Parameters:
        ctx - context
        C_AcctSchema_Element_ID - id
        trxName - transaction
      • MAcctSchemaElement

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

        public MAcctSchemaElement​(MAcctSchema as)
        Parent Constructor
        Parameters:
        as - accounting schema
      • MAcctSchemaElement

        public MAcctSchemaElement​(MAcctSchemaElement copy)
        Parameters:
        copy -
    • Method Detail

      • getAcctSchemaElements

        public static MAcctSchemaElement[] getAcctSchemaElements​(MAcctSchema as)
        Get ArrayList of Account Schema Elements from cache
        Parameters:
        as - Accounting Schema
        Returns:
        ArrayList with Elements
      • getColumnName

        public static String getColumnName​(String elementType)
        Get Column Name of ELEMENTTYPE
        Parameters:
        elementType - ELEMENTTYPE
        Returns:
        column name or "" if not found
      • getValueQuery

        public static String getValueQuery​(String elementType)
        Get Value Query for ELEMENTTYPE Type
        Parameters:
        elementType - ELEMENTTYPE type
        Returns:
        query "SELECT Value,Name FROM Table WHERE ID=" or "" if not found
      • setTypeOrg

        public void setTypeOrg​(int SeqNo,
                               String Name,
                               int Org_ID)
        Set Organization Type
        Parameters:
        SeqNo - sequence
        Name - name
        Org_ID - id
      • setTypeAccount

        public void setTypeAccount​(int SeqNo,
                                   String Name,
                                   int C_Element_ID,
                                   int C_ElementValue_ID)
        Set Type Account
        Parameters:
        SeqNo - squence
        Name - name
        C_Element_ID - element
        C_ElementValue_ID - element value
      • setTypeBPartner

        public void setTypeBPartner​(int SeqNo,
                                    String Name,
                                    int C_BPartner_ID)
        Set Type BPartner
        Parameters:
        SeqNo - sequence
        Name - name
        C_BPartner_ID - id
      • setTypeProduct

        public void setTypeProduct​(int SeqNo,
                                   String Name,
                                   int M_Product_ID)
        Set Type Product
        Parameters:
        SeqNo - sequence
        Name - name
        M_Product_ID - id
      • setTypeProject

        public void setTypeProject​(int SeqNo,
                                   String Name,
                                   int C_Project_ID)
        Set Type Project
        Parameters:
        SeqNo - sequence
        Name - name
        C_Project_ID - id
      • isElementType

        public boolean isElementType​(String elementType)
        Is Element Type
        Parameters:
        elementType - type
        Returns:
        ELEMENTTYPE type
      • getDefaultValue

        public int getDefaultValue()
        Get Default element value
        Returns:
        default
      • getColumnName

        public String getColumnName()
        Get Acct Fact ColumnName
        Returns:
        column name
      • getDisplayColumnName

        public String getDisplayColumnName()
        Get Display ColumnName
        Returns:
        column name
      • beforeSave

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

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

        protected boolean afterDelete​(boolean success)
        After Delete
        Overrides:
        afterDelete in class PO
        Parameters:
        success - success
        Returns:
        success