Package org.compiere.report
Class MReportLine
- java.lang.Object
-
- org.compiere.model.PO
-
- org.compiere.model.X_PA_ReportLine
-
- org.compiere.report.MReportLine
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparator<Object>
,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
CALCULATIONTYPE_AD_Reference_ID, CALCULATIONTYPE_AddOp1PlusOp2, CALCULATIONTYPE_AddRangeOp1ToOp2, CALCULATIONTYPE_PercentageOp1OfOp2, CALCULATIONTYPE_SubtractOp1_Op2, LINETYPE_AD_Reference_ID, LINETYPE_BlankLine, LINETYPE_Calculation, LINETYPE_SegmentValue, OVERLINESTROKETYPE_AD_Reference_ID, OVERLINESTROKETYPE_Dashed, OVERLINESTROKETYPE_Dotted, OVERLINESTROKETYPE_DoubleDashed, OVERLINESTROKETYPE_DoubleDotted, OVERLINESTROKETYPE_DoubleSolid, OVERLINESTROKETYPE_Solid, PAAMOUNTTYPE_AD_Reference_ID, PAAMOUNTTYPE_BalanceAccountedSign, PAAMOUNTTYPE_BalanceExpectedSign, PAAMOUNTTYPE_CreditOnly, PAAMOUNTTYPE_DebitOnly, PAAMOUNTTYPE_QuantityAccountedSign, PAAMOUNTTYPE_QuantityExpectedSign, PAPERIODTYPE_AD_Reference_ID, PAPERIODTYPE_Natural, PAPERIODTYPE_Period, PAPERIODTYPE_Total, PAPERIODTYPE_Year, POSTINGTYPE_Actual, POSTINGTYPE_AD_Reference_ID, POSTINGTYPE_Budget, POSTINGTYPE_Commitment, POSTINGTYPE_Reservation, POSTINGTYPE_Statistical, UNDERLINESTROKETYPE_AD_Reference_ID, UNDERLINESTROKETYPE_Dashed, UNDERLINESTROKETYPE_Dotted, UNDERLINESTROKETYPE_DoubleDashed, UNDERLINESTROKETYPE_DoubleDotted, UNDERLINESTROKETYPE_DoubleSolid, UNDERLINESTROKETYPE_Solid
-
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, LOCAL_TRX_PREFIX, 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_AD_Client_ID, COLUMNNAME_AD_Org_ID, COLUMNNAME_CalculationType, COLUMNNAME_Created, COLUMNNAME_CreatedBy, COLUMNNAME_Description, COLUMNNAME_GL_Budget_ID, COLUMNNAME_IsActive, COLUMNNAME_IsInverseDebitCreditOnly, COLUMNNAME_IsPrinted, COLUMNNAME_IsShowOppositeSign, COLUMNNAME_LineType, COLUMNNAME_Name, COLUMNNAME_Oper_1_ID, COLUMNNAME_Oper_2_ID, COLUMNNAME_OverlineStrokeType, COLUMNNAME_PA_ReportLine_ID, COLUMNNAME_PA_ReportLine_UU, COLUMNNAME_PA_ReportLineSet_ID, COLUMNNAME_PAAmountType, COLUMNNAME_PAPeriodType, COLUMNNAME_PostingType, COLUMNNAME_SeqNo, COLUMNNAME_UnderlineStrokeType, COLUMNNAME_Updated, COLUMNNAME_UpdatedBy, Model, Table_ID, Table_Name
-
-
Constructor Summary
Constructors Constructor Description MReportLine(Properties ctx, int PA_ReportLine_ID, String trxName)
ConstructorMReportLine(Properties ctx, ResultSet rs, String trxName)
Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
beforeSave(boolean newRecord)
Before Savestatic MReportLine
copy(Properties ctx, int AD_Client_ID, int AD_Org_ID, int PA_ReportLineSet_ID, MReportLine source, String trxName)
Copyint
getOverline()
Get overline style 0 - none, 1 - single, 2 - doubleStroke
getOverlineStroke(BigDecimal stroke)
Get OverLine StrokeString
getSelectClause(boolean withSum)
Get SQL Select Clause.String
getSourceColumnName()
Get Source Column NameMReportSource[]
getSources()
Get SourcesString
getSourceValueQuery()
Get Value Query for Segment Typeint
getUnderline()
Get underline style 0 - none 1 - single 2 - doubleStroke
getUnderlineStroke(BigDecimal stroke)
Get UnderLine StrokeString
getWhereClause(int PA_Hierarchy_ID)
Get SQL where clause (sources, posting type)boolean
isCalculationTypeAdd()
Calculation Type Addboolean
isCalculationTypePercent()
Calculation Type Percentboolean
isCalculationTypeRange()
Calculation Type Rangeboolean
isCalculationTypeSubtract()
Calculation Type Subtractboolean
isLineTypeBlankLine()
Line Type Blank Lineboolean
isLineTypeCalculation()
Line Type Calculationboolean
isLineTypeSegmentValue()
Line Type Segment Valueboolean
isNatural()
Is it natural balance ?boolean
isPeriod()
Is it Period ?boolean
isPostingType()
Has Posting Typeboolean
isTotal()
Is it Total ?boolean
isYear()
Is it Year ?void
list()
List InfoString
toString()
String Representation-
Methods inherited from class org.compiere.model.X_PA_ReportLine
get_AccessLevel, getCalculationType, getDescription, getGL_Budget, getGL_Budget_ID, getKeyNamePair, getLineType, getName, getOper_1, getOper_1_ID, getOper_2, getOper_2_ID, getOverlineStrokeType, getPA_ReportLine_ID, getPA_ReportLine_UU, getPA_ReportLineSet, getPA_ReportLineSet_ID, getPAAmountType, getPAPeriodType, getPostingType, getSeqNo, getUnderlineStrokeType, initPO, isInverseDebitCreditOnly, isPrinted, isShowOppositeSign, setCalculationType, setDescription, setGL_Budget_ID, setIsInverseDebitCreditOnly, setIsPrinted, setIsShowOppositeSign, setLineType, setName, setOper_1_ID, setOper_2_ID, setOverlineStrokeType, setPA_ReportLine_ID, setPA_ReportLine_UU, setPA_ReportLineSet_ID, setPAAmountType, setPAPeriodType, setPostingType, setSeqNo, setUnderlineStrokeType
-
Methods inherited from class org.compiere.model.PO
afterDelete, afterSave, beforeDelete, checkImmutable, clearCrossTenantSafe, clone, columnExists, columnExists, compare, copyPO, copyValues, copyValues, createAttachment, delete, delete, delete_Accounting, delete_Tree, deleteEx, deleteEx, dump, dump, equals, get_Attribute, get_Attributes, 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_OptimisticLockingColumns, get_Table_ID, get_TableName, get_Translation, get_Translation, get_Translation, get_Translation, get_Translation, get_TrxName, get_Value, get_Value, get_ValueAsBoolean, get_ValueAsInt, get_ValueAsInt, get_ValueAsString, get_ValueDifference, get_ValueDifference, get_ValueE, get_ValueOfColumn, get_ValueOld, get_ValueOld, get_ValueOldAsInt, get_WhereClause, get_WhereClause, get_xmlDocument, get_xmlString, getAD_Client_ID, getAD_Org_ID, getAllIDs, getAttachment, getAttachment, getAttachmentData, getCreated, getCreatedBy, getCtx, getDoc, getFindParameter, getPdfAttachment, getUpdated, getUpdatedBy, getUUIDColumnName, getUUIDColumnName, hashCode, insert_Accounting, insert_Tree, insert_Tree, is_Changed, is_Immutable, is_new, is_UseOptimisticLocking, is_ValueChanged, is_ValueChanged, isActive, isAttachment, isColumnMandatory, isColumnUpdateable, isMandatoryOK, isPdfAttachment, isReplication, load, load, load, load, load, loadByUU, loadComplete, loadDefaults, loadSpecial, lock, makeImmutable, postDelete, retrieveIdOfParentValue, retrieveIdOfParentValue, save, save, saveEx, saveEx, saveNew_afterSetID, saveNew_getID, saveNewSpecial, saveReplica, saveUpdate, set_Attribute, set_ColumnUpdateable, set_CustomColumn, set_CustomColumnReturningBoolean, set_OptimisticLockingColumns, set_TrxName, set_TrxName, set_UseOptimisticLocking, set_Value, set_Value, set_Value, set_Value, set_ValueE, set_ValueNoCheck, set_ValueNoCheckE, set_ValueOfColumn, set_ValueOfColumn, set_ValueOfColumnReturningBoolean, set_ValueOfColumnReturningBoolean, setAD_Client_ID, setAD_Org_ID, setClientOrg, setClientOrg, setCrossTenantSafe, setDoc, setDocWorkflowMgr, setIsActive, setProcessedOn, setReplication, setStandardDefaults, setUpdateable, setUpdatedBy, unlock, update_Tree, validForeignKeys
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Methods inherited from interface org.compiere.model.I_PA_ReportLine
getAD_Client_ID, getAD_Org_ID, getCreated, getCreatedBy, getUpdated, getUpdatedBy, isActive, setAD_Org_ID, setIsActive
-
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
- contextPA_ReportLine_ID
- idtrxName
- transaction
-
MReportLine
public MReportLine(Properties ctx, ResultSet rs, String trxName)
Constructor- Parameters:
ctx
- contextrs
- ResultSet to load fromtrxName
- 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
-
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 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 classX_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)
Before Save- Overrides:
beforeSave
in classPO
- 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
- contextAD_Client_ID
- parentAD_Org_ID
- parentPA_ReportLineSet_ID
- parentsource
- copy sourcetrxName
- transaction- Returns:
- Report Line
-
getOverline
public int getOverline()
Get overline style 0 - none, 1 - single, 2 - double- Returns:
- int - 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:
- int - 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
-
-