Class 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:
  • Constructor Details

    • MProject

      public MProject(Properties ctx, String C_Project_UU, String trxName)
      UUID based Constructor
      Parameters:
      ctx - Context
      C_Project_UU - UUID key
      trxName - Transaction
    • MProject

      public MProject(Properties ctx, int C_Project_ID, String trxName)
      Standard Constructor
      Parameters:
      ctx - context
      C_Project_ID - id
      trxName - transaction
    • MProject

      public MProject(Properties ctx, ResultSet rs, String trxName)
      Load Constructor
      Parameters:
      ctx - context
      rs - result set
      trxName - 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 - context
      C_Project_ID - project to copy from
      dateDoc - date of the document date
      trxName - transaction
      Returns:
      new Project instance
    • getC_ProjectType_ID_Int

      @Deprecated 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 class X_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 interface I_C_Project
      Overrides:
      setM_PriceList_Version_ID in class X_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 of a Phase
      Parameters:
      phase - C_ProjectPhase_ID
      Returns:
      Array of lines of a Phase
    • getIssues

      public MProjectIssue[] getIssues()
      Get Project Issue records
      Returns:
      Array of project issue
    • getPhases

      public MProjectPhase[] getPhases()
      Get Project Phase records
      Returns:
      Array of project phase
    • copyDetailsFrom

      public int copyDetailsFrom(MProject project)
      Copy Lines/Phase/Task from other Project
      Parameters:
      project - project
      Returns:
      number of lines copied
    • copyLinesFrom

      public int copyLinesFrom(MProject project)
      Copy Project Lines From other Project
      Parameters:
      project - project
      Returns:
      number of project lines copied
    • copyPhasesFrom

      public int copyPhasesFrom(MProject fromProject)
      Copy Phases/Tasks from other Project
      Parameters:
      fromProject - project to copy from
      Returns:
      number of phase/task line copied
    • setProjectType

      public void setProjectType(MProjectType type)
      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

      public int copyPhasesFrom(MProjectType type)
      Copy Phases from Project Type
      Parameters:
      type - Project Type
      Returns:
      number of line copy
    • 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 class PO
      Parameters:
      newRecord - true if it is a new record
      Returns:
      true if record can be saved
    • afterSave

      protected boolean afterSave(boolean newRecord, boolean success)
      Description copied from class: PO
      Called after Save for Post-Save Operation.
      Default implementation is nop, to be implemented in sub-classes that needed it.
      Overrides:
      afterSave in class PO
      Parameters:
      newRecord - true if it is a new record
      success - true if save operation was success
      Returns:
      if save was a success
    • afterDelete

      protected boolean afterDelete(boolean success)
      Description copied from class: PO
      Execute after Delete operations.
      Default implementation is nop, to be implemented in sub-classes that needed it.
      Overrides:
      afterDelete in class PO
      Parameters:
      success - true if record deleted
      Returns:
      true if delete is a success
    • getMInvoices

      public MInvoice[] getMInvoices()
      Get Invoices Generated for this Project
      Returns:
      array of invoice author monhate