Class MReportLine

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

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

    • MReportLine

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

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

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

    • getSources

      public MReportSource[] getSources()
      Get Report Sources
      Returns:
      report sources
    • list

      public void list()
      List Info
    • getSourceColumnName

      public String getSourceColumnName()
      Get Source Column Name
      Returns:
      Source ColumnName
    • getSourceValueQuery

      public String getSourceValueQuery()
      Get Value Query for Segment Type
      Returns:
      Query for first source element or null
    • getSelectClause

      public String getSelectClause(boolean withSum)
      Get Column Clause for Select statement
      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 natural balance (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 SQL where clause (sources, posting type)
      Parameters:
      PA_Hierarchy_ID - hierarchy
      Returns:
      where clause
    • isPostingType

      public boolean isPostingType()
      Has Posting Type
      Returns:
      true if posting type is not null
    • toString

      public String toString()
      String Representation
      Overrides:
      toString in class X_PA_ReportLine
      Returns:
      info
    • isLineTypeCalculation

      public boolean isLineTypeCalculation()
      Line Type Calculation
      Returns:
      true if calculation
    • isLineTypeSegmentValue

      public boolean isLineTypeSegmentValue()
      Line Type Segment Value
      Returns:
      true if segment value
    • isLineTypeBlankLine

      public boolean isLineTypeBlankLine()
      Line Type Blank Line
      Returns:
      true if Blank Line
    • isCalculationTypeRange

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

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

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

      public boolean isCalculationTypePercent()
      Calculation Type Percent
      Returns:
      true if percent
    • 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 MReportLine copy(Properties ctx, int AD_Client_ID, int AD_Org_ID, int PA_ReportLineSet_ID, MReportLine source, String trxName)
      Create new Report Line instance from source
      Parameters:
      ctx - context
      AD_Client_ID - parent
      AD_Org_ID - parent
      PA_ReportLineSet_ID - parent
      source - source to copy from
      trxName - transaction
      Returns:
      new Report Line instance
    • getOverline

      public int getOverline()
      Get overline style 0 - none, 1 - single, 2 - double
      Returns:
      int - overline style No
    • getOverlineStroke

      public Stroke getOverlineStroke(BigDecimal stroke)
      Get OverLine Stroke
      Returns:
      line based on line (1/2 of) width and stroke (default dotted 1/2p
    • getUnderline

      public int getUnderline()
      Get underline style 0 - none 1 - single 2 - double
      Returns:
      underline style No
    • getUnderlineStroke

      public Stroke getUnderlineStroke(BigDecimal stroke)
      Get UnderLine Stroke
      Returns:
      line based on line (1/2 of) width and stroke (default dotted 1/2p