Class MAcctSchemaElement

All Implemented Interfaces:
Serializable, Cloneable, Comparator<Object>, I_C_AcctSchema_Element, I_Persistent, Evaluatee, ImmutablePOSupport

public class MAcctSchemaElement extends X_C_AcctSchema_Element implements ImmutablePOSupport
Account Schema Element Object
Version:
$Id: MAcctSchemaElement.java,v 1.4 2006/08/10 01:00:44 jjanke Exp $
Author:
Jorg Janke, victor.perez@e-evolution.com, www.e-evolution.com
  • RF [ 2214883 ] Remove SQL code and Replace for Query https://sourceforge.net/p/adempiere/feature-requests/557/
  • See Also:
    • Constructor Details

      • MAcctSchemaElement

        public MAcctSchemaElement(Properties ctx, String C_AcctSchema_Element_UU, String trxName)
        UUID based Constructor
        Parameters:
        ctx - Context
        C_AcctSchema_Element_UU - UUID key
        trxName - Transaction
      • 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)
        Copy constructor
        Parameters:
        copy -
      • MAcctSchemaElement

        public MAcctSchemaElement(Properties ctx, MAcctSchemaElement copy)
        Copy constructor
        Parameters:
        ctx -
        copy -
      • MAcctSchemaElement

        public MAcctSchemaElement(Properties ctx, MAcctSchemaElement copy, String trxName)
        Copy constructor
        Parameters:
        ctx -
        copy -
        trxName -
    • Method Details

      • getAcctSchemaElements

        public static MAcctSchemaElement[] getAcctSchemaElements(MAcctSchema as)
        Get array of Account Schema Elements from cache
        Parameters:
        as - Accounting Schema
        Returns:
        Elements array
      • 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 value for Organization element 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 value for Account element type
        Parameters:
        SeqNo - sequence
        Name - name
        C_Element_ID - element
        C_ElementValue_ID - element value
      • setTypeBPartner

        public void setTypeBPartner(int SeqNo, String Name, int C_BPartner_ID)
        Set value for BPartner element type
        Parameters:
        SeqNo - sequence
        Name - name
        C_BPartner_ID - id
      • setTypeProduct

        public void setTypeProduct(int SeqNo, String Name, int M_Product_ID)
        Set value for Product element type
        Parameters:
        SeqNo - sequence
        Name - name
        M_Product_ID - id
      • setTypeProject

        public void setTypeProject(int SeqNo, String Name, int C_Project_ID)
        Set value for Project element type
        Parameters:
        SeqNo - sequence
        Name - name
        C_Project_ID - id
      • isElementType

        public boolean isElementType(String elementType)
        Is Element Type
        Parameters:
        elementType - type
        Returns:
        true if this is an instance of elementType
      • 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
      • toString

        public String toString()
        String representation
        Overrides:
        toString in class X_C_AcctSchema_Element
        Returns:
        info
      • 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
      • markImmutable

        public MAcctSchemaElement markImmutable()
        Description copied from interface: ImmutablePOSupport
        mark PO as immutable
        Specified by:
        markImmutable in interface ImmutablePOSupport
        Returns:
        PO