Package org.compiere.model
Class MProcess
- java.lang.Object
-
- org.compiere.model.PO
-
- org.compiere.model.X_AD_Process
-
- org.compiere.model.MProcess
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparator<Object>
,I_AD_Process
,I_Persistent
,Evaluatee
,ImmutablePOSupport
public class MProcess extends X_AD_Process implements ImmutablePOSupport
Process Model- Version:
- $Id: MProcess.java,v 1.4 2006/07/30 00:58:04 jjanke Exp $
- Author:
- Jorg Janke, Teo Sarca, www.arhipac.ro
- BF [ 1757523 ] Server Processes are using Server's context
- FR [ 2214883 ] Remove SQL code and Replace for Query
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.compiere.model.X_AD_Process
ACCESSLEVEL_AD_Reference_ID, ACCESSLEVEL_All, ACCESSLEVEL_ClientOnly, ACCESSLEVEL_ClientPlusOrganization, ACCESSLEVEL_Organization, ACCESSLEVEL_SystemOnly, ACCESSLEVEL_SystemPlusClient, ALLOWMULTIPLEEXECUTION_AD_Reference_ID, ALLOWMULTIPLEEXECUTION_DisallowMultipleExecutions, ALLOWMULTIPLEEXECUTION_DisallowMultipleExecutionsWithTheSameParameters, ENTITYTYPE_AD_Reference_ID, EXECUTIONTYPE_AD_Reference_ID, EXECUTIONTYPE_ForceBackground, EXECUTIONTYPE_ForceForeground, SHOWHELP_AD_Reference_ID, SHOWHELP_AskUserForFutureUse, SHOWHELP_DonTShowHelp, SHOWHELP_RunSilently_TakeDefaults, SHOWHELP_ShowHelp
-
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_AD_Process
accessLevel, COLUMNNAME_AccessLevel, COLUMNNAME_AD_Client_ID, COLUMNNAME_AD_CtxHelp_ID, COLUMNNAME_AD_Form_ID, COLUMNNAME_AD_Org_ID, COLUMNNAME_AD_PrintFormat_ID, COLUMNNAME_AD_Process_ID, COLUMNNAME_AD_Process_UU, COLUMNNAME_AD_ReportView_ID, COLUMNNAME_AD_Workflow_ID, COLUMNNAME_AllowMultipleExecution, COLUMNNAME_Classname, COLUMNNAME_CopyFromProcess, COLUMNNAME_Created, COLUMNNAME_CreatedBy, COLUMNNAME_Description, COLUMNNAME_EntityType, COLUMNNAME_ExecutionType, COLUMNNAME_Help, COLUMNNAME_IsActive, COLUMNNAME_IsBetaFunctionality, COLUMNNAME_IsDirectPrint, COLUMNNAME_IsReport, COLUMNNAME_JasperReport, COLUMNNAME_Name, COLUMNNAME_ProcedureName, COLUMNNAME_ShowHelp, COLUMNNAME_Statistic_Count, COLUMNNAME_Statistic_Seconds, COLUMNNAME_Updated, COLUMNNAME_UpdatedBy, COLUMNNAME_Value, COLUMNNAME_WorkflowValue, Model, Table_ID, Table_Name
-
-
Constructor Summary
Constructors Constructor Description MProcess(Properties ctx, int AD_Process_ID, String trxName)
Standard ConstructorMProcess(Properties ctx, ResultSet rs, String trxName)
Load ConstructorMProcess(Properties ctx, MProcess copy)
MProcess(Properties ctx, MProcess copy, String trxName)
MProcess(MProcess copy)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addStatistics(int seconds)
Deprecated.- use UPDATE insteadprotected boolean
afterSave(boolean newRecord, boolean success)
After Savevoid
copyFrom(MProcess source)
Copy settings from another process overwrites existing data (including translations) and saves.static MProcess
get(int AD_Process_ID)
Get MProcess from Cache (immutable)static MProcess
get(String AD_Process_UU)
Get MProcess from Cache based on UUID (immutable)static MProcess
get(Properties ctx, int AD_Process_ID)
Get MProcess from Cache (immutable)static MProcess
get(Properties ctx, String AD_Process_UU)
Get MProcess from Cache based on UUID (immutable)static MProcess
getCopy(Properties ctx, int AD_Process_ID, String trxName)
Get updateable copy of MProcess from cachestatic MProcess
getFromMenu(Properties ctx, int AD_Menu_ID)
Get MProcess from MenuMProcessPara
getParameter(String name)
Get Parameter with ColumnNameMProcessPara[]
getParameters()
Get Parametersstatic int
getProcess_ID(String value, String trxName)
Grant independence to GenerateModel from AD_Process_IDboolean
isDatabaseProcedure()
Is this a db procedureboolean
isForceBackground()
Is Force Backgroundboolean
isForceForeground()
Is Force Foregroundboolean
isJavaProcess()
Is this a Java Processboolean
isWorkflow()
Is it a WorkflowMProcess
markImmutable()
mark PO as immutableMPInstance
processIt(int Record_ID, Trx trx)
Process w/o parameterMPInstance
processIt(int Record_ID, Trx trx, boolean managedTrx)
Process w/o parameterboolean
processIt(ProcessInfo pi, Trx trx)
Process It (sync)boolean
processIt(ProcessInfo pi, Trx trx, boolean managedTrx)
Process It (sync)boolean
processItWithoutTrxClose(ProcessInfo pi, Trx trx)
Process It without closing the given transaction - used from workflow engine.String
toString()
String Representation-
Methods inherited from class org.compiere.model.X_AD_Process
get_AccessLevel, getAccessLevel, getAD_CtxHelp, getAD_CtxHelp_ID, getAD_Form, getAD_Form_ID, getAD_PrintFormat, getAD_PrintFormat_ID, getAD_Process_ID, getAD_Process_UU, getAD_ReportView, getAD_ReportView_ID, getAD_Workflow, getAD_Workflow_ID, getAllowMultipleExecution, getClassname, getCopyFromProcess, getDescription, getEntityType, getExecutionType, getHelp, getJasperReport, getKeyNamePair, getName, getProcedureName, getShowHelp, getStatistic_Count, getStatistic_Seconds, getValue, getWorkflowValue, initPO, isBetaFunctionality, isDirectPrint, isReport, setAccessLevel, setAD_CtxHelp_ID, setAD_Form_ID, setAD_PrintFormat_ID, setAD_Process_ID, setAD_Process_UU, setAD_ReportView_ID, setAD_Workflow_ID, setAllowMultipleExecution, setClassname, setCopyFromProcess, setDescription, setEntityType, setExecutionType, setHelp, setIsBetaFunctionality, setIsDirectPrint, setIsReport, setJasperReport, setName, setProcedureName, setShowHelp, setStatistic_Count, setStatistic_Seconds, setValue, setWorkflowValue
-
Methods inherited from class org.compiere.model.PO
afterDelete, beforeDelete, beforeSave, 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_AD_Process
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
-
MProcess
public MProcess(Properties ctx, int AD_Process_ID, String trxName)
Standard Constructor- Parameters:
ctx
- contextAD_Process_ID
- processtrxName
- transaction name
-
MProcess
public MProcess(Properties ctx, ResultSet rs, String trxName)
Load Constructor- Parameters:
ctx
- contextrs
- result settrxName
- transaction name
-
MProcess
public MProcess(MProcess copy)
- Parameters:
copy
-
-
MProcess
public MProcess(Properties ctx, MProcess copy)
- Parameters:
ctx
-copy
-
-
MProcess
public MProcess(Properties ctx, MProcess copy, String trxName)
- Parameters:
ctx
-copy
-trxName
-
-
-
Method Detail
-
get
public static MProcess get(int AD_Process_ID)
Get MProcess from Cache (immutable)- Parameters:
AD_Process_ID
- id- Returns:
- MProcess
-
get
public static MProcess get(Properties ctx, int AD_Process_ID)
Get MProcess from Cache (immutable)- Parameters:
ctx
- contextAD_Process_ID
- id- Returns:
- MProcess
-
getCopy
public static MProcess getCopy(Properties ctx, int AD_Process_ID, String trxName)
Get updateable copy of MProcess from cache- Parameters:
ctx
-AD_Process_ID
-trxName
-- Returns:
- MProcess
-
get
public static MProcess get(String AD_Process_UU)
Get MProcess from Cache based on UUID (immutable)- Parameters:
AD_Process_UU
- UUID- Returns:
- MProcess
-
get
public static MProcess get(Properties ctx, String AD_Process_UU)
Get MProcess from Cache based on UUID (immutable)- Parameters:
ctx
- contextAD_Process_UU
- UUID- Returns:
- MProcess
-
getFromMenu
public static MProcess getFromMenu(Properties ctx, int AD_Menu_ID)
Get MProcess from Menu- Parameters:
ctx
- contextAD_Menu_ID
- id- Returns:
- MProcess or null
-
getParameters
public MProcessPara[] getParameters()
Get Parameters- Returns:
- parameters
-
getParameter
public MProcessPara getParameter(String name)
Get Parameter with ColumnName- Parameters:
name
- column name- Returns:
- parameter or null
-
toString
public String toString()
String Representation- Overrides:
toString
in classX_AD_Process
- Returns:
- info
-
processIt
public MPInstance processIt(int Record_ID, Trx trx)
Process w/o parameter- Parameters:
Record_ID
- recordtrx
- transaction- Returns:
- Process Instance
-
processIt
public MPInstance processIt(int Record_ID, Trx trx, boolean managedTrx)
Process w/o parameter- Parameters:
Record_ID
- recordtrx
- transaction- Returns:
- Process Instance
-
processIt
public boolean processIt(ProcessInfo pi, Trx trx)
Process It (sync)- Parameters:
pi
- Process Infotrx
- transaction- Returns:
- true if OK
-
processIt
public boolean processIt(ProcessInfo pi, Trx trx, boolean managedTrx)
Process It (sync)- Parameters:
pi
- Process Infotrx
- transaction- Returns:
- true if OK
-
isJavaProcess
public boolean isJavaProcess()
Is this a Java Process- Returns:
- true if java process
-
isDatabaseProcedure
public boolean isDatabaseProcedure()
Is this a db procedure- Returns:
- true if db procedure
-
isForceBackground
public boolean isForceBackground()
Is Force Background- Returns:
- true if force background
-
isForceForeground
public boolean isForceForeground()
Is Force Foreground- Returns:
- true if force foreground
-
isWorkflow
public boolean isWorkflow()
Is it a Workflow- Returns:
- true if Workflow
-
addStatistics
public void addStatistics(int seconds)
Deprecated.- use UPDATE insteadUpdate Statistics- Parameters:
seconds
- sec
-
afterSave
protected boolean afterSave(boolean newRecord, boolean success)
After Save
-
getProcess_ID
public static int getProcess_ID(String value, String trxName)
Grant independence to GenerateModel from AD_Process_ID- Parameters:
value
-trxName
-- Returns:
-
copyFrom
public void copyFrom(MProcess source)
Copy settings from another process overwrites existing data (including translations) and saves. Not overwritten: name, value, entitytype- Parameters:
source
-
-
processItWithoutTrxClose
public boolean processItWithoutTrxClose(ProcessInfo pi, Trx trx)
Process It without closing the given transaction - used from workflow engine.- Parameters:
pi
- Process Infotrx
- transaction- Returns:
- true if OK
-
markImmutable
public MProcess markImmutable()
Description copied from interface:ImmutablePOSupport
mark PO as immutable- Specified by:
markImmutable
in interfaceImmutablePOSupport
- Returns:
- PO
-
-