Adempiere 3.5.2a

org.compiere.model
Class MPInstance

java.lang.Object
  extended by org.compiere.model.PO
      extended by org.compiere.model.X_AD_PInstance
          extended by org.compiere.model.MPInstance
All Implemented Interfaces:
Serializable, Comparator, I_AD_PInstance, I_Persistent, Evaluatee

public class MPInstance
extends X_AD_PInstance

Process Instance Model

Version:
$Id: MPInstance.java,v 1.3 2006/07/30 00:58:36 jjanke Exp $
Author:
Jorg Janke
See Also:
Serialized Form

Field Summary
static int RESULT_ERROR
          Result FALSE = 0
static int RESULT_OK
          Result OK = 1
 
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.compiere.model.I_AD_PInstance
accessLevel, COLUMNNAME_AD_PInstance_ID, COLUMNNAME_AD_Process_ID, COLUMNNAME_AD_User_ID, COLUMNNAME_ErrorMsg, COLUMNNAME_IsProcessing, COLUMNNAME_Record_ID, COLUMNNAME_Result, Model, Table_ID, Table_Name
 
Constructor Summary
MPInstance(MProcess process, int Record_ID)
          Create Process Instance from Process and create parameters
MPInstance(Properties ctx, int AD_Process_ID, int Record_ID)
          New Constructor
MPInstance(Properties ctx, int AD_PInstance_ID, String ignored)
          Standard Constructor
MPInstance(Properties ctx, ResultSet rs, String ignored)
          Load Constructor
 
Method Summary
 void addLog(Timestamp P_Date, int P_ID, BigDecimal P_Number, String P_Msg)
           
protected  boolean afterSave(boolean newRecord, boolean success)
          After Save
 MPInstanceLog[] getLog()
          Get Logs
 MPInstancePara[] getParameters()
          Get Parameters
 boolean isOK()
          Is it OK
 void log()
          Dump Log
 void setAD_Process_ID(int AD_Process_ID)
          Set AD_Process_ID.
 void setRecord_ID(int Record_ID)
          Set Record ID.
 void setResult(boolean ok)
          Set Result
 String toString()
          String Representation
 
Methods inherited from class org.compiere.model.X_AD_PInstance
get_AccessLevel, getAD_PInstance_ID, getAD_Process_ID, getAD_Process, getAD_User_ID, getAD_User, getErrorMsg, getKeyNamePair, getRecord_ID, getResult, initPO, isProcessing, setAD_PInstance_ID, setAD_User_ID, setErrorMsg, setIsProcessing, setResult
 
Methods inherited from class org.compiere.model.PO
afterDelete, beforeDelete, beforeSave, 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
 

Field Detail

RESULT_OK

public static final int RESULT_OK
Result OK = 1

See Also:
Constant Field Values

RESULT_ERROR

public static final int RESULT_ERROR
Result FALSE = 0

See Also:
Constant Field Values
Constructor Detail

MPInstance

public MPInstance(Properties ctx,
                  int AD_PInstance_ID,
                  String ignored)
Standard Constructor

Parameters:
ctx - context
AD_PInstance_ID - instance or 0
ignored - no transaction support

MPInstance

public MPInstance(Properties ctx,
                  ResultSet rs,
                  String ignored)
Load Constructor

Parameters:
ctx - context
rs - result set
ignored - no transaction support

MPInstance

public MPInstance(MProcess process,
                  int Record_ID)
Create Process Instance from Process and create parameters

Parameters:
process - process
Record_ID - Record

MPInstance

public MPInstance(Properties ctx,
                  int AD_Process_ID,
                  int Record_ID)
New Constructor

Parameters:
ctx - context
AD_Process_ID - Process ID
Record_ID - record
Method Detail

getParameters

public MPInstancePara[] getParameters()
Get Parameters

Returns:
parameter array

getLog

public MPInstanceLog[] getLog()
Get Logs

Returns:
array of logs

addLog

public void addLog(Timestamp P_Date,
                   int P_ID,
                   BigDecimal P_Number,
                   String P_Msg)
Parameters:
P_Date - date
P_ID - id
P_Number - number
P_Msg - msg

setAD_Process_ID

public void setAD_Process_ID(int AD_Process_ID)
Set AD_Process_ID. Check Role if process can be performed

Specified by:
setAD_Process_ID in interface I_AD_PInstance
Overrides:
setAD_Process_ID in class X_AD_PInstance
Parameters:
AD_Process_ID - process

setRecord_ID

public void setRecord_ID(int Record_ID)
Set Record ID. direct internal record ID

Specified by:
setRecord_ID in interface I_AD_PInstance
Overrides:
setRecord_ID in class X_AD_PInstance
Parameters:
Record_ID - record

toString

public String toString()
String Representation

Overrides:
toString in class X_AD_PInstance
Returns:
info
See Also:
Object.toString()

log

public void log()
Dump Log


isOK

public boolean isOK()
Is it OK

Returns:
Result == OK

setResult

public void setResult(boolean ok)
Set Result

Parameters:
ok -

afterSave

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

Overrides:
afterSave in class PO
Parameters:
newRecord - new
success - success
Returns:
success

Adempiere 3.5.2a

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