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
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) Before Savestatic MReportColumn
copy
(Properties ctx, int AD_Client_ID, int AD_Org_ID, int PA_ReportColumnSet_ID, MReportColumn source, String trxName) /** CopyGet 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
Calculation Type Addboolean
Calculation Type Percentboolean
Calculation Type Rangeboolean
Calculation Type Subtractboolean
Column Type Calculationboolean
Column Type Relative Periodboolean
Column Type Segment Valueboolean
Is it natural balance ?boolean
isPeriod()
Is it Period Info ?boolean
isTotal()
Is it Total Info ?boolean
isYear()
Is it Year Info ?toString()
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:
- select clause - AmtAcctCR+AmtAcctDR/etc or "null" if not defined
-
isPeriod
public boolean isPeriod()Is it Period Info ?- Returns:
- true if Period Amount Type
-
isYear
public boolean isYear()Is it Year Info ?- Returns:
- true if Year Amount Type
-
isTotal
public boolean isTotal()Is it Total Info ?- 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
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()Calculation Type Range- Returns:
- true if range
-
isCalculationTypeAdd
public boolean isCalculationTypeAdd()Calculation Type Add- Returns:
- true id add
-
isCalculationTypeSubtract
public boolean isCalculationTypeSubtract()Calculation Type Subtract- Returns:
- true if subtract
-
isCalculationTypePercent
public boolean isCalculationTypePercent()Calculation Type Percent- Returns:
- true if percent
-
isColumnTypeCalculation
public boolean isColumnTypeCalculation()Column Type Calculation- Returns:
- true if calculation
-
isColumnTypeRelativePeriod
public boolean isColumnTypeRelativePeriod()Column Type Relative Period- Returns:
- true if relative period
-
isColumnTypeSegmentValue
public boolean isColumnTypeSegmentValue()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) Before Save- Overrides:
beforeSave
in classPO
- Parameters:
newRecord
- new- Returns:
- true
-
copy
public static MReportColumn copy(Properties ctx, int AD_Client_ID, int AD_Org_ID, int PA_ReportColumnSet_ID, MReportColumn source, String trxName) /** Copy- Parameters:
ctx
- contextAD_Client_ID
- parentAD_Org_ID
- parentPA_ReportColumnSet_ID
- parentsource
- copy sourcetrxName
- transaction- Returns:
- Report Column
-