Class LazyProcessInstanceDataRecord
- java.lang.Object
-
- org.silverpeas.core.workflow.engine.datarecord.AbstractProcessInstanceDataRecord
-
- org.silverpeas.core.workflow.engine.datarecord.LazyProcessInstanceDataRecord
-
- All Implemented Interfaces:
Serializable
,DataRecord
public class LazyProcessInstanceDataRecord extends AbstractProcessInstanceDataRecord
A ProcessInstanceDataRecord groups in a single DataRecord all the data items of a process instance.- The process instance: instance.title, instance.<columnName>
- The process model: model, model.label, model.peas-label
- The folder: <folderItem>
- The forms: form.<formName>, form.<formName>.title, form.<formName>.< fieldItem>
- The actions: action.<actionName>, action.<actionName>.label, action.< actionName>.date, action.<actionName>.actor
- The users: participant.<participantName>
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.silverpeas.core.workflow.engine.datarecord.AbstractProcessInstanceDataRecord
fields, instance, template
-
-
Constructor Summary
Constructors Constructor Description LazyProcessInstanceDataRecord(ProcessInstance instance, String role, String lang)
Builds the data record representation of a process instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Field
getField(int fieldIndex)
Gets the field at the index position in this data record.Field
getField(String fieldName)
Gets the specified named field.String[]
getFieldNames()
Gets the name of all the fields set in this data record.String
getId()
Returns the data record identifier.protected ProcessInstanceTemplate
getTemplate(String role, String lang)
int
size()
Gets the size of this data record or -1 whether this operation isn't supported.-
Methods inherited from class org.silverpeas.core.workflow.engine.datarecord.AbstractProcessInstanceDataRecord
getField, getLanguage, getResourceReference, getValues, isNew, setId, setLanguage
-
-
-
-
Constructor Detail
-
LazyProcessInstanceDataRecord
public LazyProcessInstanceDataRecord(ProcessInstance instance, String role, String lang) throws WorkflowException
Builds the data record representation of a process instance.- Throws:
WorkflowException
-
-
Method Detail
-
getTemplate
protected ProcessInstanceTemplate getTemplate(String role, String lang)
- Specified by:
getTemplate
in classAbstractProcessInstanceDataRecord
-
getId
public String getId()
Description copied from interface:DataRecord
Returns the data record identifier. This id is unique within theRecordSet
from witch this data record has been get. This id is null when it has been built from aRecordTemplate
but not yet inserted into aRecordSet
.- Specified by:
getId
in interfaceDataRecord
- Overrides:
getId
in classAbstractProcessInstanceDataRecord
-
getField
public Field getField(String fieldName) throws FormException
Description copied from interface:DataRecord
Gets the specified named field. If there is several fields with the given name, then only the first one is returned.- Specified by:
getField
in interfaceDataRecord
- Overrides:
getField
in classAbstractProcessInstanceDataRecord
- Parameters:
fieldName
- the name of a field.- Returns:
- the named field or, in the case there is no such field, either null or an empty field.
- Throws:
FormException
- if the field cannot be got.
-
getField
public Field getField(int fieldIndex)
Description copied from interface:DataRecord
Gets the field at the index position in this data record.- Specified by:
getField
in interfaceDataRecord
- Overrides:
getField
in classAbstractProcessInstanceDataRecord
- Parameters:
fieldIndex
- the index of the field in the data record.- Returns:
- the field or, in the case there is no such field, either null or an empty field.
-
size
public int size()
Description copied from interface:DataRecord
Gets the size of this data record or -1 whether this operation isn't supported.- Specified by:
size
in interfaceDataRecord
- Overrides:
size
in classAbstractProcessInstanceDataRecord
- Returns:
- the total number of fields making this record, whatever their name. If this method isn't supported, -1 is returned.
-
getFieldNames
public String[] getFieldNames()
Description copied from interface:DataRecord
Gets the name of all the fields set in this data record.- Specified by:
getFieldNames
in interfaceDataRecord
- Overrides:
getFieldNames
in classAbstractProcessInstanceDataRecord
- Returns:
- an array with the name of the fields.
-
-