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
Financial Report Line Model
- Version:
- $Id: MReportLine.java,v 1.3 2006/08/03 22:16:52 jjanke Exp $
- Author:
- Jorg Janke
- See Also:
-
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_SolidFields 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, UUID_NEW_RECORD, XML_ATTRIBUTE_AD_Table_ID, XML_ATTRIBUTE_Record_IDFields 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_Multiplier, 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_RoundFactor, COLUMNNAME_SeqNo, COLUMNNAME_UnderlineStrokeType, COLUMNNAME_Updated, COLUMNNAME_UpdatedBy, Model, Table_ID, Table_Name -
Constructor Summary
ConstructorsConstructorDescriptionMReportLine(Properties ctx, int PA_ReportLine_ID, String trxName) ConstructorMReportLine(Properties ctx, String PA_ReportLine_UU, String trxName) UUID based ConstructorMReportLine(Properties ctx, ResultSet rs, String trxName) Constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbeforeSave(boolean newRecord) Called before Save for Pre-Save Operation.
Default implementation is nop, to be implemented in sub-classes that needed it.static MReportLinecopy(Properties ctx, int AD_Client_ID, int AD_Org_ID, int PA_ReportLineSet_ID, MReportLine source, String trxName) Create new Report Line instance from sourceintGet overline style 0 - none, 1 - single, 2 - doublegetOverlineStroke(BigDecimal stroke) Get OverLine StrokegetSelectClause(boolean withSum) Get Column Clause for Select statementGet Source Column NameGet Report SourcesGet Value Query for Segment TypeintGet underline style 0 - none 1 - single 2 - doublegetUnderlineStroke(BigDecimal stroke) Get UnderLine StrokegetWhereClause(int PA_Hierarchy_ID) Get SQL where clause (sources, posting type)booleanCalculation Type AddbooleanCalculation Type PercentbooleanCalculation Type RangebooleanCalculation Type SubtractbooleanLine Type Blank LinebooleanLine Type CalculationbooleanLine Type Segment ValuebooleanIs it natural balance (PAPERIODTYPE_Natural) ?booleanisPeriod()Is it PAPERIODTYPE_Period ?booleanHas Posting TypebooleanisTotal()Is it PAPERIODTYPE_Total ?booleanisYear()Is it PAPERIODTYPE_Year ?voidlist()List InfotoString()String RepresentationMethods inherited from class org.compiere.model.X_PA_ReportLine
get_AccessLevel, getCalculationType, getDescription, getGL_Budget, getGL_Budget_ID, getKeyNamePair, getLineType, getMultiplier, 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, getRoundFactor, getSeqNo, getUnderlineStrokeType, initPO, isInverseDebitCreditOnly, isPrinted, isShowOppositeSign, setCalculationType, setDescription, setGL_Budget_ID, setIsInverseDebitCreditOnly, setIsPrinted, setIsShowOppositeSign, setLineType, setMultiplier, setName, setOper_1_ID, setOper_2_ID, setOverlineStrokeType, setPA_ReportLine_ID, setPA_ReportLine_UU, setPA_ReportLineSet_ID, setPAAmountType, setPAPeriodType, setPostingType, setRoundFactor, setSeqNo, setUnderlineStrokeTypeMethods inherited from class org.compiere.model.PO
afterDelete, afterSave, beforeDelete, buildInsertSQL, 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_TableAttribute, get_TableAttributeAsBoolean, get_TableAttributeAsInt, get_TableAttributes, get_TableName, get_Translation, get_Translation, get_Translation, get_Translation, get_Translation, get_TrxName, get_UUID, get_Value, get_Value, get_ValueAsBoolean, get_ValueAsInt, get_ValueAsInt, get_ValueAsString, 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, loadByUU, loadComplete, loadDefaults, loadPO, loadSpecial, lock, makeImmutable, postDelete, retrieveIdOfParentValue, retrieveIdOfParentValue, save, save, saveCrossTenantSafe, saveCrossTenantSafeEx, saveCrossTenantSafeEx, 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, toInsertSQL, unlock, update_Tree, validForeignKeys, validForeignKeysExMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongMethods inherited from interface org.compiere.model.I_PA_ReportLine
getAD_Client_ID, getAD_Org_ID, getCreated, getCreatedBy, getUpdated, getUpdatedBy, isActive, setAD_Org_ID, setIsActiveMethods inherited from interface org.compiere.model.I_Persistent
save
-
Constructor Details
-
MReportLine
UUID based Constructor- Parameters:
ctx- ContextPA_ReportLine_UU- UUID keytrxName- Transaction
-
MReportLine
Constructor- Parameters:
ctx- contextPA_ReportLine_ID- idtrxName- transaction
-
MReportLine
Constructor- Parameters:
ctx- contextrs- ResultSet to load fromtrxName- transaction
-
-
Method Details
-
getSources
Get Report Sources- Returns:
- report sources
-
list
public void list()List Info -
getSourceColumnName
Get Source Column Name- Returns:
- Source ColumnName
-
getSourceValueQuery
Get Value Query for Segment Type- Returns:
- Query for first source element or null
-
getSelectClause
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
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
String Representation- Overrides:
toStringin 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) Description copied from class:POCalled before Save for Pre-Save Operation.
Default implementation is nop, to be implemented in sub-classes that needed it.- Overrides:
beforeSavein classPO- 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- contextAD_Client_ID- parentAD_Org_ID- parentPA_ReportLineSet_ID- parentsource- source to copy fromtrxName- 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
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
Get UnderLine Stroke- Returns:
- line based on line (1/2 of) width and stroke (default dotted 1/2p
-