Class AbstractProcessInstanceDataRecord
- java.lang.Object
-
- org.silverpeas.core.workflow.engine.datarecord.AbstractProcessInstanceDataRecord
-
- All Implemented Interfaces:
Serializable
,DataRecord
- Direct Known Subclasses:
LazyProcessInstanceDataRecord
,ProcessInstanceDataRecord
,ProcessInstanceRowRecord
public abstract class AbstractProcessInstanceDataRecord extends Object implements DataRecord
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Field[]
fields
The fields.protected ProcessInstance
instance
The process instance whose data are managed by this data record.protected ProcessInstanceTemplate
template
The record template associated to this data record.
-
Constructor Summary
Constructors Constructor Description AbstractProcessInstanceDataRecord(ProcessInstance instance, String role, String lang)
Builds the data record representation of a process instance.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Field
getField(int fieldIndex)
Returns the field at the index position in the record.Field
getField(String fieldName)
Returns the named field.Field
getField(String fieldName, int occurrence)
String[]
getFieldNames()
String
getId()
Returns the data record id.String
getLanguage()
ResourceReference
getResourceReference()
protected abstract ProcessInstanceTemplate
getTemplate(String role, String lang)
Map<String,String>
getValues(String language)
boolean
isNew()
An instance is always registred.void
setId(String externalId)
The id of an instance is immutable.void
setLanguage(String lang)
-
-
-
Field Detail
-
fields
protected final Field[] fields
The fields.
-
instance
protected final ProcessInstance instance
The process instance whose data are managed by this data record.
-
template
protected final ProcessInstanceTemplate template
The record template associated to this data record.
-
-
Constructor Detail
-
AbstractProcessInstanceDataRecord
public AbstractProcessInstanceDataRecord(ProcessInstance instance, String role, String lang) throws WorkflowException
Builds the data record representation of a process instance.- Throws:
WorkflowException
-
-
Method Detail
-
getTemplate
protected abstract ProcessInstanceTemplate getTemplate(String role, String lang) throws WorkflowException
- Throws:
WorkflowException
-
getId
public String getId()
Description copied from interface:DataRecord
Returns the data record id. This id is unique within the RecordSet from witch this DataRecord has been extracted. This id is null when the DataRecord has been built from a RecordTemplate but not yet inserted in a recordTemplate.- Specified by:
getId
in interfaceDataRecord
-
setId
public void setId(String externalId)
The id of an instance is immutable.- Specified by:
setId
in interfaceDataRecord
-
isNew
public boolean isNew()
An instance is always registred.- Specified by:
isNew
in interfaceDataRecord
-
getField
public Field getField(String fieldName) throws FormException
Description copied from interface:DataRecord
Returns the named field.- Specified by:
getField
in interfaceDataRecord
- Throws:
FormException
- when the fieldName is unknown.
-
getField
public Field getField(String fieldName, int occurrence)
- Specified by:
getField
in interfaceDataRecord
-
getField
public Field getField(int fieldIndex) throws FormException
Description copied from interface:DataRecord
Returns the field at the index position in the record.- Specified by:
getField
in interfaceDataRecord
- Throws:
FormException
- when the fieldIndex is unknown.
-
getFieldNames
public String[] getFieldNames()
- Specified by:
getFieldNames
in interfaceDataRecord
-
getLanguage
public String getLanguage()
- Specified by:
getLanguage
in interfaceDataRecord
-
setLanguage
public void setLanguage(String lang)
- Specified by:
setLanguage
in interfaceDataRecord
-
getValues
public Map<String,String> getValues(String language)
- Specified by:
getValues
in interfaceDataRecord
-
getResourceReference
public ResourceReference getResourceReference()
- Specified by:
getResourceReference
in interfaceDataRecord
-
-