Class MReportColumn

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

public class MReportColumn extends X_PA_ReportColumn
Financial Report Column Model
Version:
$Id: MReportColumn.java,v 1.3 2006/08/03 22:16:52 jjanke Exp $
Author:
Jorg Janke
See Also:
  • Constructor Details

    • MReportColumn

      public MReportColumn(Properties ctx, String PA_ReportColumn_UU, String trxName)
      UUID based Constructor
      Parameters:
      ctx - Context
      PA_ReportColumn_UU - UUID key
      trxName - Transaction
    • MReportColumn

      public MReportColumn(Properties ctx, int PA_ReportColumn_ID, String trxName)
      Constructor
      Parameters:
      ctx - context
      PA_ReportColumn_ID - id
      trxName - transaction
    • MReportColumn

      public MReportColumn(Properties ctx, ResultSet rs, String trxName)
      Constructor
      Parameters:
      ctx - context
      rs - ResultSet to load from
      trxName - transaction
  • Method Details

    • getSelectClause

      public String getSelectClause(boolean withSum)
      Get Column SQL Select Clause.
      Parameters:
      withSum - with SUM() function
      Returns:
      column clause for select - AmtAcctCR+AmtAcctDR/etc or "null" if not defined
    • isPeriod

      public boolean isPeriod()
      Is it PAPERIODTYPE_Period
      Returns:
      true if PAPERIODTYPE_Period
    • isYear

      public boolean isYear()
      Is it PAPERIODTYPE_Year
      Returns:
      true if PAPERIODTYPE_Year
    • isTotal

      public boolean isTotal()
      Is it PAPERIODTYPE_Total
      Returns:
      true if PAPERIODTYPE_Total
    • isNatural

      public boolean isNatural()
      Is it PAPERIODTYPE_Natural
      Natural balance means year balance for profit and loss a/c, total balance for balance sheet account
      Returns:
      true if Natural Balance Amount Type (PAPERIODTYPE_Natural)
    • getWhereClause

      public String getWhereClause(int PA_Hierarchy_ID)
      Get Segment Value Where Clause
      Parameters:
      PA_Hierarchy_ID - hierarchy
      Returns:
      where clause
    • toString

      public String toString()
      Get String Representation
      Overrides:
      toString in class X_PA_ReportColumn
      Returns:
      String Representation
    • isCalculationTypeRange

      public boolean isCalculationTypeRange()
      Is Calculation Type Range
      Returns:
      true if range
    • isCalculationTypeAdd

      public boolean isCalculationTypeAdd()
      Is Calculation Type Add
      Returns:
      true if add
    • isCalculationTypeSubtract

      public boolean isCalculationTypeSubtract()
      Is Calculation Type Subtract
      Returns:
      true if subtract
    • isCalculationTypePercent

      public boolean isCalculationTypePercent()
      Is Calculation Type Percent
      Returns:
      true if percent
    • isColumnTypeCalculation

      public boolean isColumnTypeCalculation()
      Is Column Type Calculation
      Returns:
      true if calculation
    • isColumnTypeRelativePeriod

      public boolean isColumnTypeRelativePeriod()
      Is Column Type Relative Period
      Returns:
      true if relative period
    • isColumnTypeSegmentValue

      public boolean isColumnTypeSegmentValue()
      Is Column Type Segment Value
      Returns:
      true if segment value
    • getRelativePeriodAsInt

      public int getRelativePeriodAsInt()
      Get Relative Period As Int
      Returns:
      relative period
    • getRelativePeriod

      public BigDecimal getRelativePeriod()
      Get Relative Period
      Specified by:
      getRelativePeriod in interface I_PA_ReportColumn
      Overrides:
      getRelativePeriod in class X_PA_ReportColumn
      Returns:
      relative period
    • getRelativePeriodTo

      public BigDecimal getRelativePeriodTo()
      Get Relative Period To
      Specified by:
      getRelativePeriodTo in interface I_PA_ReportColumn
      Overrides:
      getRelativePeriodTo in class X_PA_ReportColumn
      Returns:
      relative period to
    • getElementType

      public String getElementType()
      Get Element Type
      Specified by:
      getElementType in interface I_PA_ReportColumn
      Overrides:
      getElementType in class X_PA_ReportColumn
      Returns:
      Element Type (account or user defined)
    • getCalculationType

      public String getCalculationType()
      Get Calculation Type
      Specified by:
      getCalculationType in interface I_PA_ReportColumn
      Overrides:
      getCalculationType in class X_PA_ReportColumn
      Returns:
      Calculation
    • beforeSave

      protected boolean beforeSave(boolean newRecord)
      Description copied from class: PO
      Called before Save for Pre-Save Operation.
      Default implementation is nop, to be implemented in sub-classes that needed it.
      Overrides:
      beforeSave in class PO
      Parameters:
      newRecord - true if it is a new record
      Returns:
      true if record can be saved
    • copy

      public static MReportColumn copy(Properties ctx, int AD_Client_ID, int AD_Org_ID, int PA_ReportColumnSet_ID, MReportColumn source, String trxName)
      Create a new Report Column instance from source
      Parameters:
      ctx - context
      AD_Client_ID - parent
      AD_Org_ID - parent
      PA_ReportColumnSet_ID - parent
      source - source to copy from
      trxName - transaction
      Returns:
      new Report Column instance