Package org.compiere.model
Class MProject
java.lang.Object
org.compiere.model.PO
org.compiere.model.X_C_Project
org.compiere.model.MProject
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparator<Object>
,I_C_Project
,I_Persistent
,Evaluatee
Project Model
- Version:
- $Id: MProject.java,v 1.2 2006/07/30 00:51:02 jjanke Exp $
- Author:
- Jorg Janke
- See Also:
-
Field Summary
Fields inherited from class org.compiere.model.X_C_Project
PROJECTCATEGORY_AD_Reference_ID, PROJECTCATEGORY_AssetProject, PROJECTCATEGORY_General, PROJECTCATEGORY_ServiceChargeProject, PROJECTCATEGORY_WorkOrderJob, PROJECTLINELEVEL_AD_Reference_ID, PROJECTLINELEVEL_Phase, PROJECTLINELEVEL_Project, PROJECTLINELEVEL_Task, PROJINVOICERULE_AD_Reference_ID, PROJINVOICERULE_CommittedAmount, PROJINVOICERULE_None, PROJINVOICERULE_ProductQuantity, PROJINVOICERULE_TimeMaterial, PROJINVOICERULE_TimeMaterialMaxComitted
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_C_Project
accessLevel, COLUMNNAME_AD_Client_ID, COLUMNNAME_AD_Org_ID, COLUMNNAME_AD_OrgTrx_ID, COLUMNNAME_AD_User_ID, COLUMNNAME_C_Activity_ID, COLUMNNAME_C_BPartner_ID, COLUMNNAME_C_BPartner_Location_ID, COLUMNNAME_C_BPartnerSR_ID, COLUMNNAME_C_Campaign_ID, COLUMNNAME_C_Currency_ID, COLUMNNAME_C_PaymentTerm_ID, COLUMNNAME_C_Phase_ID, COLUMNNAME_C_Project_ID, COLUMNNAME_C_Project_UU, COLUMNNAME_C_ProjectType_ID, COLUMNNAME_CommittedAmt, COLUMNNAME_CommittedQty, COLUMNNAME_CopyFrom, COLUMNNAME_Created, COLUMNNAME_CreatedBy, COLUMNNAME_DateContract, COLUMNNAME_DateFinish, COLUMNNAME_Description, COLUMNNAME_GenerateTo, COLUMNNAME_InvoicedAmt, COLUMNNAME_InvoicedQty, COLUMNNAME_IsActive, COLUMNNAME_IsCommitCeiling, COLUMNNAME_IsCommitment, COLUMNNAME_IsSummary, COLUMNNAME_M_PriceList_Version_ID, COLUMNNAME_M_Warehouse_ID, COLUMNNAME_Name, COLUMNNAME_Note, COLUMNNAME_PlannedAmt, COLUMNNAME_PlannedMarginAmt, COLUMNNAME_PlannedQty, COLUMNNAME_POReference, COLUMNNAME_Processed, COLUMNNAME_Processing, COLUMNNAME_ProjectBalanceAmt, COLUMNNAME_ProjectCategory, COLUMNNAME_ProjectLineLevel, COLUMNNAME_ProjInvoiceRule, COLUMNNAME_SalesRep_ID, COLUMNNAME_Updated, COLUMNNAME_UpdatedBy, COLUMNNAME_Value, Model, Table_ID, Table_Name
-
Constructor Summary
ConstructorDescriptionMProject
(Properties ctx, int C_Project_ID, String trxName) Standard ConstructorMProject
(Properties ctx, String C_Project_UU, String trxName) UUID based ConstructorMProject
(Properties ctx, ResultSet rs, String trxName) Load Constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
afterDelete
(boolean success) After Deleteprotected boolean
afterSave
(boolean newRecord, boolean success) After Saveprotected boolean
beforeSave
(boolean newRecord) Before Saveint
copyDetailsFrom
(MProject project) Copy Lines/Phase/Task from other Projectstatic MProject
copyFrom
(Properties ctx, int C_Project_ID, Timestamp dateDoc, String trxName) Create new project by copying from another projectint
copyLinesFrom
(MProject project) Copy Project Lines From other Projectint
copyPhasesFrom
(MProject fromProject) Copy Phases/Tasks from other Projectint
copyPhasesFrom
(MProjectType type) Copy Phases from Project Typeint
Deprecated.Get Project Issue recordsgetLines()
Get Project Linesint
Get Price List from Price List VersionMInvoice[]
Get Invoices Generated for this ProjectgetPhaseLines
(int phase) Get Project Lines of a PhaseGet Project Phase recordsvoid
setM_PriceList_Version_ID
(int M_PriceList_Version_ID) Set PL Versionvoid
setProjectType
(MProjectType type) Set Project Type and Category.
If project type is Service Project (PROJECTCATEGORY_ServiceChargeProject), copy project Phase/Tasks from project type.toString()
String RepresentationMethods inherited from class org.compiere.model.X_C_Project
get_AccessLevel, getAD_OrgTrx_ID, getAD_User, getAD_User_ID, getC_Activity, getC_Activity_ID, getC_BPartner, getC_BPartner_ID, getC_BPartner_Location, getC_BPartner_Location_ID, getC_BPartnerSR, getC_BPartnerSR_ID, getC_Campaign, getC_Campaign_ID, getC_Currency, getC_Currency_ID, getC_PaymentTerm, getC_PaymentTerm_ID, getC_Phase, getC_Phase_ID, getC_Project_ID, getC_Project_UU, getC_ProjectType_ID, getCommittedAmt, getCommittedQty, getCopyFrom, getDateContract, getDateFinish, getDescription, getGenerateTo, getInvoicedAmt, getInvoicedQty, getKeyNamePair, getM_PriceList_Version, getM_PriceList_Version_ID, getM_Warehouse, getM_Warehouse_ID, getName, getNote, getPlannedAmt, getPlannedMarginAmt, getPlannedQty, getPOReference, getProjectBalanceAmt, getProjectCategory, getProjectLineLevel, getProjInvoiceRule, getSalesRep, getSalesRep_ID, getValue, initPO, isCommitCeiling, isCommitment, isProcessed, isProcessing, isSummary, setAD_OrgTrx_ID, setAD_User_ID, setC_Activity_ID, setC_BPartner_ID, setC_BPartner_Location_ID, setC_BPartnerSR_ID, setC_Campaign_ID, setC_Currency_ID, setC_PaymentTerm_ID, setC_Phase_ID, setC_Project_ID, setC_Project_UU, setC_ProjectType_ID, setCommittedAmt, setCommittedQty, setCopyFrom, setDateContract, setDateFinish, setDescription, setGenerateTo, setInvoicedAmt, setInvoicedQty, setIsCommitCeiling, setIsCommitment, setIsSummary, setM_Warehouse_ID, setName, setNote, setPlannedAmt, setPlannedMarginAmt, setPlannedQty, setPOReference, setProcessed, setProcessing, setProjectBalanceAmt, setProjectCategory, setProjectLineLevel, setProjInvoiceRule, setSalesRep_ID, setValue
Methods inherited from class org.compiere.model.PO
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_C_Project
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
-
MProject
UUID based Constructor- Parameters:
ctx
- ContextC_Project_UU
- UUID keytrxName
- Transaction
-
MProject
Standard Constructor- Parameters:
ctx
- contextC_Project_ID
- idtrxName
- transaction
-
MProject
Load Constructor- Parameters:
ctx
- contextrs
- result settrxName
- transaction
-
-
Method Details
-
copyFrom
public static MProject copyFrom(Properties ctx, int C_Project_ID, Timestamp dateDoc, String trxName) Create new project by copying from another project- Parameters:
ctx
- contextC_Project_ID
- project to copy fromdateDoc
- date of the document datetrxName
- transaction- Returns:
- new Project instance
-
getC_ProjectType_ID_Int
Deprecated.Get Project Type as Int (is Button).- Returns:
- C_ProjectType_ID id
-
toString
String Representation- Overrides:
toString
in classX_C_Project
- Returns:
- info
-
getM_PriceList_ID
public int getM_PriceList_ID()Get Price List from Price List Version- Returns:
- M_PriceList_ID or 0
-
setM_PriceList_Version_ID
public void setM_PriceList_Version_ID(int M_PriceList_Version_ID) Set PL Version- Specified by:
setM_PriceList_Version_ID
in interfaceI_C_Project
- Overrides:
setM_PriceList_Version_ID
in classX_C_Project
- Parameters:
M_PriceList_Version_ID
- id
-
getLines
Get Project Lines- Returns:
- Array of lines
-
getPhaseLines
Get Project Lines of a Phase- Parameters:
phase
- C_ProjectPhase_ID- Returns:
- Array of lines of a Phase
-
getIssues
Get Project Issue records- Returns:
- Array of project issue
-
getPhases
Get Project Phase records- Returns:
- Array of project phase
-
copyDetailsFrom
Copy Lines/Phase/Task from other Project- Parameters:
project
- project- Returns:
- number of lines copied
-
copyLinesFrom
Copy Project Lines From other Project- Parameters:
project
- project- Returns:
- number of project lines copied
-
copyPhasesFrom
Copy Phases/Tasks from other Project- Parameters:
fromProject
- project to copy from- Returns:
- number of phase/task line copied
-
setProjectType
Set Project Type and Category.
If project type is Service Project (PROJECTCATEGORY_ServiceChargeProject), copy project Phase/Tasks from project type.- Parameters:
type
- project type
-
copyPhasesFrom
Copy Phases from Project Type- Parameters:
type
- Project Type- Returns:
- number of line copy
-
beforeSave
protected boolean beforeSave(boolean newRecord) Before Save- Overrides:
beforeSave
in classPO
- Parameters:
newRecord
- new- Returns:
- true
-
afterSave
protected boolean afterSave(boolean newRecord, boolean success) After Save -
afterDelete
protected boolean afterDelete(boolean success) After Delete- Overrides:
afterDelete
in classPO
- Parameters:
success
-- Returns:
- deleted
-
getMInvoices
Get Invoices Generated for this Project- Returns:
- array of invoice author monhate
-