Class MReportColumn

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

public class MReportColumn extends X_PA_ReportColumn
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:
      select clause - AmtAcctCR+AmtAcctDR/etc or "null" if not defined
    • isPeriod

      public boolean isPeriod()
      Is it Period Info ?
      Returns:
      true if Period Amount Type
    • isYear

      public boolean isYear()
      Is it Year Info ?
      Returns:
      true if Year Amount Type
    • isTotal

      public boolean isTotal()
      Is it Total Info ?
      Returns:
      true if Year Amount Type
    • isNatural

      public boolean isNatural()
      Is it natural balance ? Natural balance means year balance for profit and loss a/c, total balance for balance sheet account
      Returns:
      true if Natural Balance Amount Type
    • 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()
      Calculation Type Range
      Returns:
      true if range
    • isCalculationTypeAdd

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

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

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

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

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

      public boolean isColumnTypeSegmentValue()
      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)
      Before Save
      Overrides:
      beforeSave in class PO
      Parameters:
      newRecord - new
      Returns:
      true
    • copy

      public static MReportColumn copy(Properties ctx, int AD_Client_ID, int AD_Org_ID, int PA_ReportColumnSet_ID, MReportColumn source, String trxName)
      /** Copy
      Parameters:
      ctx - context
      AD_Client_ID - parent
      AD_Org_ID - parent
      PA_ReportColumnSet_ID - parent
      source - copy source
      trxName - transaction
      Returns:
      Report Column