Adempiere 3.5.2a

org.compiere.report
Class MReportLine

java.lang.Object
  extended by org.compiere.model.PO
      extended by org.compiere.model.X_PA_ReportLine
          extended by org.compiere.report.MReportLine
All Implemented Interfaces:
Serializable, Comparator, I_PA_ReportLine, I_Persistent, Evaluatee

public class MReportLine
extends X_PA_ReportLine

Report Line Model

Version:
$Id: MReportLine.java,v 1.3 2006/08/03 22:16:52 jjanke Exp $
Author:
Jorg Janke
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.compiere.model.X_PA_ReportLine
AMOUNTTYPE_AD_Reference_ID, AMOUNTTYPE_PeriodBalance, AMOUNTTYPE_PeriodCreditOnly, AMOUNTTYPE_PeriodDebitOnly, AMOUNTTYPE_PeriodQuantity, AMOUNTTYPE_TotalBalance, AMOUNTTYPE_TotalCreditOnly, AMOUNTTYPE_TotalDebitOnly, AMOUNTTYPE_TotalQuantity, AMOUNTTYPE_YearBalance, AMOUNTTYPE_YearCreditOnly, AMOUNTTYPE_YearDebitOnly, AMOUNTTYPE_YearQuantity, CALCULATIONTYPE_AD_Reference_ID, CALCULATIONTYPE_AddOp1PlusOp2, CALCULATIONTYPE_AddRangeOp1ToOp2, CALCULATIONTYPE_PercentageOp1OfOp2, CALCULATIONTYPE_SubtractOp1_Op2, LINETYPE_AD_Reference_ID, LINETYPE_Calculation, LINETYPE_SegmentValue, OPER_1_ID_AD_Reference_ID, OPER_2_ID_AD_Reference_ID, POSTINGTYPE_Actual, POSTINGTYPE_AD_Reference_ID, POSTINGTYPE_Budget, POSTINGTYPE_Commitment, POSTINGTYPE_Reservation, POSTINGTYPE_Statistical
 
Fields inherited from class org.compiere.model.PO
ACCESSLEVEL_ALL, ACCESSLEVEL_CLIENT, ACCESSLEVEL_CLIENTORG, ACCESSLEVEL_ORG, ACCESSLEVEL_SYSTEM, ACCESSLEVEL_SYSTEMCLIENT, ENTITYTYPE_Dictionary, ENTITYTYPE_UserMaintained, I_ZERO, log, p_ctx, p_info, XML_ATTRIBUTE_AD_Table_ID, XML_ATTRIBUTE_Record_ID
 
Fields inherited from interface org.compiere.model.I_PA_ReportLine
accessLevel, COLUMNNAME_AmountType, COLUMNNAME_CalculationType, COLUMNNAME_Description, COLUMNNAME_GL_Budget_ID, COLUMNNAME_IsPrinted, COLUMNNAME_LineType, COLUMNNAME_Name, COLUMNNAME_Oper_1_ID, COLUMNNAME_Oper_2_ID, COLUMNNAME_PA_ReportLine_ID, COLUMNNAME_PA_ReportLineSet_ID, COLUMNNAME_PostingType, COLUMNNAME_SeqNo, Model, Table_ID, Table_Name
 
Constructor Summary
MReportLine(Properties ctx, int PA_ReportLine_ID, String trxName)
          Constructor
MReportLine(Properties ctx, ResultSet rs, String trxName)
          Constructor
 
Method Summary
protected  boolean beforeSave(boolean newRecord)
          Before Save
static MReportLine copy(Properties ctx, int AD_Client_ID, int AD_Org_ID, int PA_ReportLineSet_ID, MReportLine source, String trxName)
          Copy
 String getSelectClause(boolean withSum)
          Get SQL Select Clause.
 String getSourceColumnName()
          Get Source Column Name
 MReportSource[] getSources()
          Get Sources
 String getSourceValueQuery()
          Get Value Query for Segment Type
 String getWhereClause(int PA_Hierarchy_ID)
          Get SQL where clause (sources, posting type)
 boolean isCalculationTypeAdd()
          Calculation Type Add
 boolean isCalculationTypePercent()
          Calculation Type Percent
 boolean isCalculationTypeRange()
          Calculation Type Range
 boolean isCalculationTypeSubtract()
          Calculation Type Subtract
 boolean isLineTypeCalculation()
          Line Type Calculation
 boolean isLineTypeSegmentValue()
          Line Type Segment Value
 boolean isPeriod()
          Is it Period ?
 boolean isPostingType()
          Has Posting Type
 boolean isTotal()
          Is it Total ?
 boolean isYear()
          Is it Year ?
 void list()
          List Info
 String toString()
          String Representation
 
Methods inherited from class org.compiere.model.X_PA_ReportLine
get_AccessLevel, getAmountType, getCalculationType, getDescription, getGL_Budget_ID, getGL_Budget, getKeyNamePair, getLineType, getName, getOper_1_ID, getOper_2_ID, getPA_ReportLine_ID, getPA_ReportLineSet_ID, getPA_ReportLineSet, getPostingType, getSeqNo, initPO, isPrinted, setAmountType, setCalculationType, setDescription, setGL_Budget_ID, setIsPrinted, setLineType, setName, setOper_1_ID, setOper_2_ID, setPA_ReportLine_ID, setPA_ReportLineSet_ID, setPostingType, setSeqNo
 
Methods inherited from class org.compiere.model.PO
afterDelete, afterSave, beforeDelete, compare, copyValues, copyValues, createAttachment, delete_Accounting, delete_Tree, delete, delete, deleteEx, deleteEx, dump, dump, equals, get_ColumnCount, get_ColumnDescription, get_ColumnDisplayType, get_ColumnIndex, get_ColumnLabel, get_ColumnLookup, get_ColumnName, get_DisplayValue, get_HashMap, get_ID, get_IDOld, get_KeyColumns, get_Logger, get_Table_ID, get_TableName, get_Translation, get_TrxName, get_Value, get_Value, get_ValueAsInt, get_ValueAsString, get_ValueDifference, get_ValueDifference, get_ValueE, get_ValueOfColumn, get_ValueOld, get_ValueOld, get_ValueOldAsInt, get_WhereClause, get_xmlDocument, get_xmlString, getAD_Client_ID, getAD_Org_ID, getAllIDs, getAttachment, getAttachment, getAttachmentData, getCreated, getCreatedBy, getCtx, getDoc, getFindParameter, getPdfAttachment, getUpdated, getUpdatedBy, insert_Accounting, insert_Tree, insert_Tree, is_Changed, is_new, is_ValueChanged, is_ValueChanged, isActive, isAttachment, isColumnMandatory, isColumnUpdateable, isMandatoryOK, isPdfAttachment, isReplication, load, load, load, load, loadComplete, loadDefaults, loadSpecial, lock, save, save, saveEx, saveEx, saveNew_getID, saveNewSpecial, saveReplica, saveUpdate, set_ColumnUpdateable, set_CustomColumn, set_TrxName, set_TrxName, set_Value, set_Value, set_ValueE, set_ValueNoCheck, set_ValueNoCheckE, set_ValueOfColumn, set_ValueOfColumn, setAD_Client_ID, setAD_Org_ID, setClientOrg, setClientOrg, setDoc, setDocWorkflowMgr, setIsActive, setReplication, setStandardDefaults, setUpdateable, setUpdatedBy, unlock
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.compiere.model.I_Persistent
save
 

Constructor Detail

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 Detail

getSources

public MReportSource[] getSources()
Get Sources

Returns:
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 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 ?

Returns:
true if Period Amount Type

isYear

public boolean isYear()
Is it Year ?

Returns:
true if Year Amount Type

isTotal

public boolean isTotal()
Is it Total ?

Returns:
true if Year Amount Type

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

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

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)
Before Save

Overrides:
beforeSave in class PO
Parameters:
newRecord - new
Returns:
true

copy

public static MReportLine copy(Properties ctx,
                               int AD_Client_ID,
                               int AD_Org_ID,
                               int PA_ReportLineSet_ID,
                               MReportLine source,
                               String trxName)
Copy

Parameters:
ctx - context
AD_Client_ID - parent
AD_Org_ID - parent
PA_ReportLineSet_ID - parent
source - copy source
trxName - transaction
Returns:
Report Line

Adempiere 3.5.2a

Adempiere® is a registered trademark of ADempiere Business Inc. ©2004-2008 HumanFlash.com All rights reserved.