Adempiere 3.5.2a

org.eevolution.model
Class MPPOrderWorkflow

java.lang.Object
  extended by org.compiere.model.PO
      extended by org.eevolution.model.X_PP_Order_Workflow
          extended by org.eevolution.model.MPPOrderWorkflow
All Implemented Interfaces:
Serializable, Comparator, I_Persistent, Evaluatee, I_PP_Order_Workflow

public class MPPOrderWorkflow
extends X_PP_Order_Workflow

WorkFlow Model

Version:
$Id: MPPOrderWorkflow.java,v 1.4 2006/07/30 00:51:05 jjanke Exp $
Author:
Jorg Janke
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.eevolution.model.X_PP_Order_Workflow
ACCESSLEVEL_AD_Reference_ID, ACCESSLEVEL_All, ACCESSLEVEL_ClientOnly, ACCESSLEVEL_ClientPlusOrganization, ACCESSLEVEL_Organization, ACCESSLEVEL_SystemOnly, ACCESSLEVEL_SystemPlusClient, DURATIONUNIT_AD_Reference_ID, DURATIONUNIT_Day, DURATIONUNIT_Hour, DURATIONUNIT_Minute, DURATIONUNIT_Month, DURATIONUNIT_Second, DURATIONUNIT_Year, ENTITYTYPE_AD_Reference_ID, PROCESSTYPE_AD_Reference_ID, PROCESSTYPE_BatchFlow, PROCESSTYPE_ContinuousFlow, PROCESSTYPE_DedicateRepetititiveFlow, PROCESSTYPE_JobShop, PROCESSTYPE_MixedRepetitiveFlow, PROCESSTYPE_Plant, PUBLISHSTATUS_AD_Reference_ID, PUBLISHSTATUS_Released, PUBLISHSTATUS_Test, PUBLISHSTATUS_UnderRevision, PUBLISHSTATUS_Void, WORKFLOWTYPE_AD_Reference_ID, WORKFLOWTYPE_Maintain, WORKFLOWTYPE_QueryOnly, WORKFLOWTYPE_SingleRecord, WORKFLOWTYPE_Transaction
 
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, log, p_ctx, p_info, XML_ATTRIBUTE_AD_Table_ID, XML_ATTRIBUTE_Record_ID
 
Fields inherited from interface org.eevolution.model.I_PP_Order_Workflow
accessLevel, COLUMNNAME_AccessLevel, COLUMNNAME_AD_Table_ID, COLUMNNAME_AD_WF_Node_ID, COLUMNNAME_AD_WF_Responsible_ID, COLUMNNAME_AD_Workflow_ID, COLUMNNAME_AD_WorkflowProcessor_ID, COLUMNNAME_Author, COLUMNNAME_Cost, COLUMNNAME_Description, COLUMNNAME_DocumentNo, COLUMNNAME_Duration, COLUMNNAME_DurationUnit, COLUMNNAME_EntityType, COLUMNNAME_Help, COLUMNNAME_IsDefault, COLUMNNAME_Limit, COLUMNNAME_MovingTime, COLUMNNAME_Name, COLUMNNAME_PP_Order_ID, COLUMNNAME_PP_Order_Node_ID, COLUMNNAME_PP_Order_Workflow_ID, COLUMNNAME_Priority, COLUMNNAME_ProcessType, COLUMNNAME_PublishStatus, COLUMNNAME_QtyBatchSize, COLUMNNAME_QueuingTime, COLUMNNAME_S_Resource_ID, COLUMNNAME_SetupTime, COLUMNNAME_ValidateWorkflow, COLUMNNAME_ValidFrom, COLUMNNAME_ValidTo, COLUMNNAME_Value, COLUMNNAME_Version, COLUMNNAME_WaitingTime, COLUMNNAME_WorkflowType, COLUMNNAME_WorkingTime, Model, Table_ID, Table_Name
 
Constructor Summary
MPPOrderWorkflow(Properties ctx, int PP_Order_Workflow_ID, String trxName)
          Create/Load Workflow
MPPOrderWorkflow(Properties ctx, ResultSet rs, String trxName)
          Load Constructor
 
Method Summary
protected  boolean afterSave(boolean newRecord, boolean success)
          After Save.
protected  boolean beforeSave(boolean newRecord)
          Before Save
static MPPOrderWorkflow get(Properties ctx, int PP_Order_Workflow_ID)
          Get Workflow from Cache
 String getDescription(boolean translated)
          Get Description
static MPPOrderWorkflow[] getDocValue(Properties ctx, int AD_Client_ID, int AD_Table_ID, String trxName)
          Get Doc Value Workflow
 long getDurationBaseSec()
          Get Duration Base in Seconds
 int getDurationCalendarField()
          Get Duration CalendarField
 MPPOrderNode getFirstNode()
          Get the first node
 String getHelp(boolean translated)
          Get Help
 int getLast(int PP_Order_Node_ID, int AD_Client_ID)
          Get very Last Node
 String getName(boolean translated)
          Get Name
 int getNext(int PP_Order_Node_ID, int AD_Client_ID)
          Get first transition (Next Node) of ID
 MPPOrderNode[] getNextNodes(int PP_Order_Node_ID, int AD_Client_ID)
          Get the next nodes
protected  MPPOrderNode getNode(int PP_Order_Node_ID)
          Get Node with ID in Workflow
 int getNodeCount()
          Get Number of Nodes
 MPPOrderNodeNext[] getNodeNexts(int PP_Order_Node_ID, int AD_Client_ID)
          Get Transitions (NodeNext) of ID
 MPPOrderNode[] getNodes(boolean ordered, int AD_Client_ID)
          Get the nodes
 int getPrevious(int PP_Order_Node_ID, int AD_Client_ID)
          Get (first) Previous Node of ID
 boolean isFirst(int PP_Order_Node_ID, int AD_Client_ID)
          Is this the first Node
 boolean isLast(int PP_Order_Node_ID, int AD_Client_ID)
          Is this the last Node
static void main(String[] args)
          main
 String toString()
          String Representation
 
Methods inherited from class org.eevolution.model.X_PP_Order_Workflow
get_AccessLevel, getAccessLevel, getAD_Table_ID, getAD_Table, getAD_WF_Node_ID, getAD_WF_Node, getAD_WF_Responsible_ID, getAD_WF_Responsible, getAD_Workflow_ID, getAD_Workflow, getAD_WorkflowProcessor_ID, getAD_WorkflowProcessor, getAuthor, getCost, getDescription, getDocumentNo, getDuration, getDurationUnit, getEntityType, getHelp, getKeyNamePair, getLimit, getMovingTime, getName, getPP_Order_ID, getPP_Order_Node_ID, getPP_Order_Node, getPP_Order_Workflow_ID, getPP_Order, getPriority, getProcessType, getPublishStatus, getQtyBatchSize, getQueuingTime, getS_Resource_ID, getS_Resource, getSetupTime, getValidateWorkflow, getValidFrom, getValidTo, getValue, getVersion, getWaitingTime, getWorkflowType, getWorkingTime, initPO, isDefault, setAccessLevel, setAD_Table_ID, setAD_WF_Node_ID, setAD_WF_Responsible_ID, setAD_Workflow_ID, setAD_WorkflowProcessor_ID, setAuthor, setCost, setDescription, setDocumentNo, setDuration, setDurationUnit, setEntityType, setHelp, setIsDefault, setLimit, setMovingTime, setName, setPP_Order_ID, setPP_Order_Node_ID, setPP_Order_Workflow_ID, setPriority, setProcessType, setPublishStatus, setQtyBatchSize, setQueuingTime, setS_Resource_ID, setSetupTime, setValidateWorkflow, setValidFrom, setValidTo, setValue, setVersion, setWaitingTime, setWorkflowType, setWorkingTime
 
Methods inherited from class org.compiere.model.PO
afterDelete, beforeDelete, compare, copyValues, copyValues, createAttachment, delete_Accounting, delete_Tree, delete, delete, deleteEx, deleteEx, dump, dump, equals, 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_Table_ID, get_TableName, get_Translation, get_TrxName, get_Value, get_Value, get_ValueAsInt, get_ValueAsString, get_ValueDifference, get_ValueDifference, get_ValueE, get_ValueOfColumn, get_ValueOld, get_ValueOld, get_ValueOldAsInt, get_WhereClause, get_xmlDocument, get_xmlString, getAD_Client_ID, getAD_Org_ID, getAllIDs, getAttachment, getAttachment, getAttachmentData, getCreated, getCreatedBy, getCtx, getDoc, getFindParameter, getPdfAttachment, getUpdated, getUpdatedBy, insert_Accounting, insert_Tree, insert_Tree, is_Changed, is_new, is_ValueChanged, is_ValueChanged, isActive, isAttachment, isColumnMandatory, isColumnUpdateable, isMandatoryOK, isPdfAttachment, isReplication, load, load, load, load, loadComplete, loadDefaults, loadSpecial, lock, save, save, saveEx, saveEx, saveNew_getID, saveNewSpecial, saveReplica, saveUpdate, set_ColumnUpdateable, set_CustomColumn, set_TrxName, set_TrxName, set_Value, set_Value, set_ValueE, set_ValueNoCheck, set_ValueNoCheckE, set_ValueOfColumn, set_ValueOfColumn, setAD_Client_ID, setAD_Org_ID, setClientOrg, setClientOrg, setDoc, setDocWorkflowMgr, setIsActive, setReplication, setStandardDefaults, setUpdateable, setUpdatedBy, unlock
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.compiere.model.I_Persistent
save
 

Constructor Detail

MPPOrderWorkflow

public MPPOrderWorkflow(Properties ctx,
                        int PP_Order_Workflow_ID,
                        String trxName)
Create/Load Workflow

Parameters:
ctx - Context
PP_Order_Workflow_ID - ID
trxName - transaction

MPPOrderWorkflow

public MPPOrderWorkflow(Properties ctx,
                        ResultSet rs,
                        String trxName)
Load Constructor

Parameters:
ctx - context
rs - result set
trxName - transaction
Method Detail

get

public static MPPOrderWorkflow get(Properties ctx,
                                   int PP_Order_Workflow_ID)
Get Workflow from Cache

Parameters:
ctx - context
AD_Workflow_ID - id
Returns:
workflow

getDocValue

public static MPPOrderWorkflow[] getDocValue(Properties ctx,
                                             int AD_Client_ID,
                                             int AD_Table_ID,
                                             String trxName)
Get Doc Value Workflow

Parameters:
ctx - context
AD_Client_ID - client
AD_Table_ID - table
Returns:
document value workflow array or null

getNodeCount

public int getNodeCount()
Get Number of Nodes

Returns:
number of nodes

getNodes

public MPPOrderNode[] getNodes(boolean ordered,
                               int AD_Client_ID)
Get the nodes

Parameters:
ordered - ordered array
AD_Client_ID - for client
Returns:
array of nodes

getFirstNode

public MPPOrderNode getFirstNode()
Get the first node

Returns:
array of next nodes

getNode

protected MPPOrderNode getNode(int PP_Order_Node_ID)
Get Node with ID in Workflow

Parameters:
PP_Order_Node_ID - ID
Returns:
node or null

getNextNodes

public MPPOrderNode[] getNextNodes(int PP_Order_Node_ID,
                                   int AD_Client_ID)
Get the next nodes

Parameters:
PP_Order_Node_ID - ID
AD_Client_ID - for client
Returns:
array of next nodes or null

getNext

public int getNext(int PP_Order_Node_ID,
                   int AD_Client_ID)
Get first transition (Next Node) of ID

Parameters:
PP_Order_Node_ID - id
AD_Client_ID - for client
Returns:
next PP_Order_Node_ID or 0

getNodeNexts

public MPPOrderNodeNext[] getNodeNexts(int PP_Order_Node_ID,
                                       int AD_Client_ID)
Get Transitions (NodeNext) of ID

Parameters:
PP_Order_Node_ID - id
AD_Client_ID - for client
Returns:
array of next nodes

getPrevious

public int getPrevious(int PP_Order_Node_ID,
                       int AD_Client_ID)
Get (first) Previous Node of ID

Parameters:
PP_Order_Node_ID - id
AD_Client_ID - for client
Returns:
next PP_Order_Node_ID or 0

getLast

public int getLast(int PP_Order_Node_ID,
                   int AD_Client_ID)
Get very Last Node

Parameters:
PP_Order_Node_ID - ignored
AD_Client_ID - for client
Returns:
next PP_Order_Node_ID or 0

isFirst

public boolean isFirst(int PP_Order_Node_ID,
                       int AD_Client_ID)
Is this the first Node

Parameters:
PP_Order_Node_ID - id
AD_Client_ID - for client
Returns:
true if first node

isLast

public boolean isLast(int PP_Order_Node_ID,
                      int AD_Client_ID)
Is this the last Node

Parameters:
PP_Order_Node_ID - id
AD_Client_ID - for client
Returns:
true if last node

getName

public String getName(boolean translated)
Get Name

Parameters:
translated - translated
Returns:
Name

getDescription

public String getDescription(boolean translated)
Get Description

Parameters:
translated - translated
Returns:
Description

getHelp

public String getHelp(boolean translated)
Get Help

Parameters:
translated - translated
Returns:
Name

toString

public String toString()
String Representation

Overrides:
toString in class X_PP_Order_Workflow
Returns:
info

beforeSave

protected boolean beforeSave(boolean newRecord)
Before Save

Overrides:
beforeSave in class PO
Parameters:
newRecord - new
Returns:
true

afterSave

protected boolean afterSave(boolean newRecord,
                            boolean success)
After Save.

Overrides:
afterSave in class PO
Parameters:
newRecord - new record
success - success
Returns:
true if save complete (if not overwritten true)

getDurationBaseSec

public long getDurationBaseSec()
Get Duration Base in Seconds

Returns:
duration unit in seconds

getDurationCalendarField

public int getDurationCalendarField()
Get Duration CalendarField

Returns:
Calendar.MINUTE, etc.

main

public static void main(String[] args)
main

Parameters:
args -

Adempiere 3.5.2a

Adempiere® is a registered trademark of ADempiere Business Inc. ©2004-2008 HumanFlash.com All rights reserved.