Package org.compiere.report
Class MReportColumn
java.lang.Object
org.compiere.model.PO
org.compiere.model.X_PA_ReportColumn
org.compiere.report.MReportColumn
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparator<Object>
,I_PA_ReportColumn
,I_Persistent
,Evaluatee
Financial Report Column Model
- Version:
- $Id: MReportColumn.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_ReportColumn
CALCULATIONTYPE_AD_Reference_ID, CALCULATIONTYPE_AddOp1PlusOp2, CALCULATIONTYPE_AddRangeOp1ToOp2, CALCULATIONTYPE_PercentageOp1OfOp2, CALCULATIONTYPE_SubtractOp1_Op2, COLUMNTYPE_AD_Reference_ID, COLUMNTYPE_Calculation, COLUMNTYPE_RelativePeriod, COLUMNTYPE_SegmentValue, CURRENCYTYPE_AccountingCurrency, CURRENCYTYPE_AD_Reference_ID, CURRENCYTYPE_SourceCurrency, ELEMENTTYPE_Account, ELEMENTTYPE_Activity, ELEMENTTYPE_AD_Reference_ID, ELEMENTTYPE_BPartner, ELEMENTTYPE_Campaign, ELEMENTTYPE_Combination, ELEMENTTYPE_LocationFrom, ELEMENTTYPE_LocationTo, ELEMENTTYPE_Organization, ELEMENTTYPE_OrgTrx, ELEMENTTYPE_Product, ELEMENTTYPE_Project, ELEMENTTYPE_SalesRegion, ELEMENTTYPE_SubAccount, ELEMENTTYPE_UserColumn1, ELEMENTTYPE_UserColumn2, ELEMENTTYPE_UserElementList1, ELEMENTTYPE_UserElementList2, FACTOR_AD_Reference_ID, FACTOR_Million, FACTOR_Thousand, 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
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, UUID_NEW_RECORD, XML_ATTRIBUTE_AD_Table_ID, XML_ATTRIBUTE_Record_ID
Fields inherited from interface org.compiere.model.I_PA_ReportColumn
accessLevel, COLUMNNAME_AD_Client_ID, COLUMNNAME_AD_Org_ID, COLUMNNAME_AD_OrgTrx_ID, COLUMNNAME_C_Activity_ID, COLUMNNAME_C_BPartner_ID, COLUMNNAME_C_Campaign_ID, COLUMNNAME_C_Currency_ID, COLUMNNAME_C_ElementValue_ID, COLUMNNAME_C_Location_ID, COLUMNNAME_C_Project_ID, COLUMNNAME_C_SalesRegion_ID, COLUMNNAME_CalculationType, COLUMNNAME_ColumnType, COLUMNNAME_Created, COLUMNNAME_CreatedBy, COLUMNNAME_CurrencyType, COLUMNNAME_Description, COLUMNNAME_ElementType, COLUMNNAME_Factor, COLUMNNAME_FormatPattern, COLUMNNAME_GL_Budget_ID, COLUMNNAME_IsActive, COLUMNNAME_IsAdhocConversion, COLUMNNAME_IsAllowOppositeSign, COLUMNNAME_IsIncludeNullsActivity, COLUMNNAME_IsIncludeNullsBPartner, COLUMNNAME_IsIncludeNullsCampaign, COLUMNNAME_IsIncludeNullsElementValue, COLUMNNAME_IsIncludeNullsLocation, COLUMNNAME_IsIncludeNullsOrg, COLUMNNAME_IsIncludeNullsOrgTrx, COLUMNNAME_IsIncludeNullsProduct, COLUMNNAME_IsIncludeNullsProject, COLUMNNAME_IsIncludeNullsSalesRegion, COLUMNNAME_IsIncludeNullsUserElement1, COLUMNNAME_IsIncludeNullsUserElement2, COLUMNNAME_IsPrinted, COLUMNNAME_M_Product_ID, COLUMNNAME_Multiplier, COLUMNNAME_Name, COLUMNNAME_Oper_1_ID, COLUMNNAME_Oper_2_ID, COLUMNNAME_Oper_2_LineName, COLUMNNAME_Org_ID, COLUMNNAME_PA_ReportColumn_ID, COLUMNNAME_PA_ReportColumn_UU, COLUMNNAME_PA_ReportColumnSet_ID, COLUMNNAME_PAAmountType, COLUMNNAME_PAPeriodType, COLUMNNAME_PostingType, COLUMNNAME_RelativePeriod, COLUMNNAME_RelativePeriodTo, COLUMNNAME_RoundFactor, COLUMNNAME_SeqNo, COLUMNNAME_Updated, COLUMNNAME_UpdatedBy, COLUMNNAME_UserElement1_ID, COLUMNNAME_UserElement2_ID, Model, Table_ID, Table_Name
-
Constructor Summary
ConstructorDescriptionMReportColumn
(Properties ctx, int PA_ReportColumn_ID, String trxName) ConstructorMReportColumn
(Properties ctx, String PA_ReportColumn_UU, String trxName) UUID based ConstructorMReportColumn
(Properties ctx, ResultSet rs, String trxName) Constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
beforeSave
(boolean newRecord) Called before Save for Pre-Save Operation.
Default implementation is nop, to be implemented in sub-classes that needed it.static MReportColumn
copy
(Properties ctx, int AD_Client_ID, int AD_Org_ID, int PA_ReportColumnSet_ID, MReportColumn source, String trxName) Create a new Report Column instance from sourceGet Calculation TypeGet Element TypeGet Relative Periodint
Get Relative Period As IntGet Relative Period TogetSelectClause
(boolean withSum) Get Column SQL Select Clause.getWhereClause
(int PA_Hierarchy_ID) Get Segment Value Where Clauseboolean
Is Calculation Type Addboolean
Is Calculation Type Percentboolean
Is Calculation Type Rangeboolean
Is Calculation Type Subtractboolean
Is Column Type Calculationboolean
Is Column Type Relative Periodboolean
Is Column Type Segment Valueboolean
Is it PAPERIODTYPE_Natural
Natural balance means year balance for profit and loss a/c, total balance for balance sheet accountboolean
isPeriod()
Is it PAPERIODTYPE_Periodboolean
isTotal()
Is it PAPERIODTYPE_Totalboolean
isYear()
Is it PAPERIODTYPE_YeartoString()
Get String RepresentationMethods inherited from class org.compiere.model.X_PA_ReportColumn
get_AccessLevel, getAD_OrgTrx_ID, getC_Activity, getC_Activity_ID, getC_BPartner, getC_BPartner_ID, getC_Campaign, getC_Campaign_ID, getC_Currency, getC_Currency_ID, getC_ElementValue, getC_ElementValue_ID, getC_Location, getC_Location_ID, getC_Project, getC_Project_ID, getC_SalesRegion, getC_SalesRegion_ID, getColumnType, getCurrencyType, getDescription, getFactor, getFormatPattern, getGL_Budget, getGL_Budget_ID, getKeyNamePair, getM_Product, getM_Product_ID, getMultiplier, getName, getOper_1, getOper_1_ID, getOper_2, getOper_2_ID, getOper_2_LineName, getOrg_ID, getPA_ReportColumn_ID, getPA_ReportColumn_UU, getPA_ReportColumnSet, getPA_ReportColumnSet_ID, getPAAmountType, getPAPeriodType, getPostingType, getRoundFactor, getSeqNo, getUserElement1_ID, getUserElement2_ID, initPO, isAdhocConversion, isAllowOppositeSign, isIncludeNullsActivity, isIncludeNullsBPartner, isIncludeNullsCampaign, isIncludeNullsElementValue, isIncludeNullsLocation, isIncludeNullsOrg, isIncludeNullsOrgTrx, isIncludeNullsProduct, isIncludeNullsProject, isIncludeNullsSalesRegion, isIncludeNullsUserElement1, isIncludeNullsUserElement2, isPrinted, setAD_OrgTrx_ID, setC_Activity_ID, setC_BPartner_ID, setC_Campaign_ID, setC_Currency_ID, setC_ElementValue_ID, setC_Location_ID, setC_Project_ID, setC_SalesRegion_ID, setCalculationType, setColumnType, setCurrencyType, setDescription, setElementType, setFactor, setFormatPattern, setGL_Budget_ID, setIsAdhocConversion, setIsAllowOppositeSign, setIsIncludeNullsActivity, setIsIncludeNullsBPartner, setIsIncludeNullsCampaign, setIsIncludeNullsElementValue, setIsIncludeNullsLocation, setIsIncludeNullsOrg, setIsIncludeNullsOrgTrx, setIsIncludeNullsProduct, setIsIncludeNullsProject, setIsIncludeNullsSalesRegion, setIsIncludeNullsUserElement1, setIsIncludeNullsUserElement2, setIsPrinted, setM_Product_ID, setMultiplier, setName, setOper_1_ID, setOper_2_ID, setOper_2_LineName, setOrg_ID, setPA_ReportColumn_ID, setPA_ReportColumn_UU, setPA_ReportColumnSet_ID, setPAAmountType, setPAPeriodType, setPostingType, setRelativePeriod, setRelativePeriodTo, setRoundFactor, setSeqNo, setUserElement1_ID, setUserElement2_ID
Methods 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_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
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_ReportColumn
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 Details
-
MReportColumn
UUID based Constructor- Parameters:
ctx
- ContextPA_ReportColumn_UU
- UUID keytrxName
- Transaction
-
MReportColumn
Constructor- Parameters:
ctx
- contextPA_ReportColumn_ID
- idtrxName
- transaction
-
MReportColumn
Constructor- Parameters:
ctx
- contextrs
- ResultSet to load fromtrxName
- transaction
-
-
Method Details
-
getSelectClause
Get Column SQL Select Clause.- 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 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 Segment Value Where Clause- Parameters:
PA_Hierarchy_ID
- hierarchy- Returns:
- where clause
-
toString
Get String Representation- Overrides:
toString
in classX_PA_ReportColumn
- Returns:
- String Representation
-
isCalculationTypeRange
public boolean isCalculationTypeRange()Is Calculation Type Range- Returns:
- true if range
-
isCalculationTypeAdd
public boolean isCalculationTypeAdd()Is Calculation Type Add- Returns:
- true if add
-
isCalculationTypeSubtract
public boolean isCalculationTypeSubtract()Is Calculation Type Subtract- Returns:
- true if subtract
-
isCalculationTypePercent
public boolean isCalculationTypePercent()Is Calculation Type Percent- Returns:
- true if percent
-
isColumnTypeCalculation
public boolean isColumnTypeCalculation()Is Column Type Calculation- Returns:
- true if calculation
-
isColumnTypeRelativePeriod
public boolean isColumnTypeRelativePeriod()Is Column Type Relative Period- Returns:
- true if relative period
-
isColumnTypeSegmentValue
public boolean isColumnTypeSegmentValue()Is Column Type Segment Value- Returns:
- true if segment value
-
getRelativePeriodAsInt
public int getRelativePeriodAsInt()Get Relative Period As Int- Returns:
- relative period
-
getRelativePeriod
Get Relative Period- Specified by:
getRelativePeriod
in interfaceI_PA_ReportColumn
- Overrides:
getRelativePeriod
in classX_PA_ReportColumn
- Returns:
- relative period
-
getRelativePeriodTo
Get Relative Period To- Specified by:
getRelativePeriodTo
in interfaceI_PA_ReportColumn
- Overrides:
getRelativePeriodTo
in classX_PA_ReportColumn
- Returns:
- relative period to
-
getElementType
Get Element Type- Specified by:
getElementType
in interfaceI_PA_ReportColumn
- Overrides:
getElementType
in classX_PA_ReportColumn
- Returns:
- Element Type (account or user defined)
-
getCalculationType
Get Calculation Type- Specified by:
getCalculationType
in interfaceI_PA_ReportColumn
- Overrides:
getCalculationType
in classX_PA_ReportColumn
- Returns:
- Calculation
-
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 classPO
- Parameters:
newRecord
- true if it is a new record- Returns:
- true if record can be saved
-
copy
public static MReportColumn copy(Properties ctx, int AD_Client_ID, int AD_Org_ID, int PA_ReportColumnSet_ID, MReportColumn source, String trxName) Create a new Report Column instance from source- Parameters:
ctx
- contextAD_Client_ID
- parentAD_Org_ID
- parentPA_ReportColumnSet_ID
- parentsource
- source to copy fromtrxName
- transaction- Returns:
- new Report Column instance
-