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
public class MProject extends X_C_Project
Project Model- Version:
- $Id: MProject.java,v 1.2 2006/07/30 00:51:02 jjanke Exp $
- Author:
- Jorg Janke
- See Also:
- Serialized Form
-
-
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, 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
Constructors Constructor Description MProject(Properties ctx, int C_Project_ID, String trxName)
Standard ConstructorMProject(Properties ctx, ResultSet rs, String trxName)
Load Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected 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 copyingint
copyLinesFrom(MProject project)
Copy Lines From other Projectint
copyPhasesFrom(MProject fromProject)
Copy Phases/Tasks from other Projectint
copyPhasesFrom(MProjectType type)
Copy Phases from Typeint
getC_ProjectType_ID_Int()
Deprecated.MProjectIssue[]
getIssues()
Get Project IssuesMProjectLine[]
getLines()
Get Project Linesint
getM_PriceList_ID()
Get Price List from Price List VersionMInvoice[]
getMInvoices()
Return the Invoices Generated for this ProjectMProjectLine[]
getPhaseLines(int phase)
Get Project Lines from a PhaseMProjectPhase[]
getPhases()
Get Project Phasesvoid
setM_PriceList_Version_ID(int M_PriceList_Version_ID)
Set PL Versionvoid
setProjectType(MProjectType type)
Set Project Type and Category.String
toString()
String Representation-
Methods 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, 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_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 Detail
-
MProject
public MProject(Properties ctx, int C_Project_ID, String trxName)
Standard Constructor- Parameters:
ctx
- contextC_Project_ID
- idtrxName
- transaction
-
MProject
public MProject(Properties ctx, ResultSet rs, String trxName)
Load Constructor- Parameters:
ctx
- contextrs
- result settrxName
- transaction
-
-
Method Detail
-
copyFrom
public static MProject copyFrom(Properties ctx, int C_Project_ID, Timestamp dateDoc, String trxName)
Create new Project by copying- Parameters:
ctx
- contextC_Project_ID
- projectdateDoc
- date of the document datetrxName
- transaction- Returns:
- Project
-
getC_ProjectType_ID_Int
public int getC_ProjectType_ID_Int()
Deprecated.Get Project Type as Int (is Button).- Returns:
- C_ProjectType_ID id
-
toString
public String 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:
- price list 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
public MProjectLine[] getLines()
Get Project Lines- Returns:
- Array of lines
-
getPhaseLines
public MProjectLine[] getPhaseLines(int phase)
Get Project Lines from a Phase- Returns:
- Array of lines from a Phase
-
getIssues
public MProjectIssue[] getIssues()
Get Project Issues- Returns:
- Array of issues
-
getPhases
public MProjectPhase[] getPhases()
Get Project Phases- Returns:
- Array of phases
-
copyDetailsFrom
public int copyDetailsFrom(MProject project)
Copy Lines/Phase/Task from other Project- Parameters:
project
- project- Returns:
- number of total lines copied
-
copyLinesFrom
public int copyLinesFrom(MProject project)
Copy Lines From other Project- Parameters:
project
- project- Returns:
- number of lines copied
-
copyPhasesFrom
public int copyPhasesFrom(MProject fromProject)
Copy Phases/Tasks from other Project- Parameters:
fromProject
- project- Returns:
- number of items copied
-
setProjectType
public void setProjectType(MProjectType type)
Set Project Type and Category. If Service Project copy Projet Type Phase/Tasks- Parameters:
type
- project type
-
copyPhasesFrom
public int copyPhasesFrom(MProjectType type)
Copy Phases from Type- Parameters:
type
- Project Type- Returns:
- count
-
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
public MInvoice[] getMInvoices()
Return the Invoices Generated for this Project- Returns:
- invoices author monhate
-
-