public class DataInstanceServiceImpl extends Object implements DataInstanceService
| Modifier and Type | Field and Description |
|---|---|
protected ArchiveService |
archiveService |
protected TechnicalLoggerService |
logger |
protected org.bonitasoft.engine.persistence.ReadPersistenceService |
persistenceService |
protected Recorder |
recorder |
| Constructor and Description |
|---|
DataInstanceServiceImpl(Recorder recorder,
org.bonitasoft.engine.persistence.ReadPersistenceService persistenceService,
ArchiveService archiveService,
TechnicalLoggerService logger) |
| Modifier and Type | Method and Description |
|---|---|
void |
createDataInstance(SDataInstance dataInstance)
Create dataInstance in DB for given dataInstance
|
void |
deleteDataInstance(SDataInstance dataInstance)
Delete the specific dataInstance
|
void |
deleteLocalArchivedDataInstances(long containerId,
String containerType)
Delete all local archived data instances for a specified container
|
void |
deleteLocalDataInstances(long containerId,
String dataInstanceContainerType,
boolean dataPresent)
Delete all local active data instances for a specified container
|
SDataInstance |
getDataInstance(long dataInstanceId)
Get dataInstance by its id
|
SDataInstance |
getDataInstance(String dataName,
long containerId,
String containerType,
ParentContainerResolver parentContainerResolver)
Get dataInstance visible in the specific container
|
List<SDataInstance> |
getDataInstances(List<String> dataNames,
long containerId,
String containerType,
ParentContainerResolver parentContainerResolver)
Get dataInstances visible in the specific container for given names
|
List<SDataInstance> |
getDataInstances(long containerId,
String containerType,
ParentContainerResolver parentContainerResolver,
int fromIndex,
int numberOfResults)
Get all dataInstances visible in the specific container
|
List<SADataInstance> |
getLastLocalSADataInstances(long containerId,
String containerType,
int startIndex,
int maxResults)
Gets the last archived SADataInstance objects of the container.
|
SADataInstance |
getLastSADataInstance(String dataName,
long containerId,
String containerType,
ParentContainerResolver parentContainerResolver)
Gets the last archived SADataInstance object for the named data in the container.
|
SDataInstance |
getLocalDataInstance(String dataName,
long containerId,
String containerType)
Get the local dataInstance by name in a certain container, the dataInstance is existed in this container
|
List<SDataInstance> |
getLocalDataInstances(long containerId,
String containerType,
int fromIndex,
int numberOfResults)
Get a list of local dataInstances for the specific container, those dataInstances must belong to the specified container.
|
List<SADataInstance> |
getLocalSADataInstances(long containerId,
String containerType,
int fromIndex,
int numberOfResults)
Get the local SADataInstances for this element
|
long |
getNumberOfDataInstances(long containerId,
String containerType,
ParentContainerResolver parentContainerResolver)
Get number of dataInstance for specified container
|
SADataInstance |
getSADataInstance(long sourceObjectId,
long time)
Get SADataInstance object for specific dataInstance at the specific time
|
SADataInstance |
getSADataInstance(long containerId,
String containerType,
ParentContainerResolver parentContainerResolver,
String dataName,
long time)
Get SADataInstance object archived in the specific time for name specified dataInstance in a container
|
List<SADataInstance> |
getSADataInstances(long containerId,
String containerType,
ParentContainerResolver parentContainerResolver,
List<String> dataNames,
long time)
Get all SADataInstance objects archived after specific time for specific dataInstance in a container
|
void |
updateDataInstance(SDataInstance dataInstance,
EntityUpdateDescriptor descriptor)
Update the specific dataInstance according to the given descriptor
|
protected final Recorder recorder
protected final org.bonitasoft.engine.persistence.ReadPersistenceService persistenceService
protected final ArchiveService archiveService
protected final TechnicalLoggerService logger
public DataInstanceServiceImpl(Recorder recorder, org.bonitasoft.engine.persistence.ReadPersistenceService persistenceService, ArchiveService archiveService, TechnicalLoggerService logger)
public SDataInstance getDataInstance(String dataName, long containerId, String containerType, ParentContainerResolver parentContainerResolver) throws SDataInstanceException
DataInstanceServicegetDataInstance in interface DataInstanceServicedataName - Name of data instancecontainerId - Identifier of containercontainerType - Type of container, e.g process instance, activity instance and so on.SDataInstanceExceptionpublic List<SDataInstance> getDataInstances(long containerId, String containerType, ParentContainerResolver parentContainerResolver, int fromIndex, int numberOfResults) throws SDataInstanceException
DataInstanceServicegetDataInstances in interface DataInstanceServicecontainerId - Identifier of containercontainerType - Type of container, e.g process instance, activity instance and so on.SDataInstanceExceptionpublic SDataInstance getLocalDataInstance(String dataName, long containerId, String containerType) throws SDataInstanceReadException
DataInstanceServicegetLocalDataInstance in interface DataInstanceServicedataName - Name of dataInstancecontainerId - Identifier of containercontainerType - Type of container, e.g process instance, activity instance and so on.SDataInstanceReadExceptionpublic List<SDataInstance> getLocalDataInstances(long containerId, String containerType, int fromIndex, int numberOfResults) throws SDataInstanceReadException
DataInstanceServicegetLocalDataInstances in interface DataInstanceServicecontainerId - Identifier of containercontainerType - Type of container, e.g process instance, activity instance and so on.SDataInstanceReadExceptionpublic SADataInstance getSADataInstance(long containerId, String containerType, ParentContainerResolver parentContainerResolver, String dataName, long time) throws SDataInstanceReadException
DataInstanceServicegetSADataInstance in interface DataInstanceServicecontainerId - Identifier of containercontainerType - Type of container, e.g process instance, activity instance and so on.dataName - Name of data instancetime - The archive timeSDataInstanceReadExceptionpublic SADataInstance getSADataInstance(long sourceObjectId, long time) throws SDataInstanceReadException
DataInstanceServicegetSADataInstance in interface DataInstanceServicesourceObjectId - Identifier of data instance which has been archivedtime - The archive timeSDataInstanceReadExceptionpublic SADataInstance getLastSADataInstance(String dataName, long containerId, String containerType, ParentContainerResolver parentContainerResolver) throws SDataInstanceException
DataInstanceServicegetLastSADataInstance in interface DataInstanceServicedataName - the name of the datacontainerId - the identifier of the containercontainerType - the type of the containerSDataInstanceExceptionpublic List<SADataInstance> getSADataInstances(long containerId, String containerType, ParentContainerResolver parentContainerResolver, List<String> dataNames, long time) throws SDataInstanceReadException
DataInstanceServicegetSADataInstances in interface DataInstanceServicecontainerId - Identifier of containercontainerType - Type of container, e.g process instance, activity instance and so on.dataNames - Name of datatime - The archive timeSDataInstanceReadExceptionpublic List<SADataInstance> getLastLocalSADataInstances(long containerId, String containerType, int startIndex, int maxResults) throws SDataInstanceReadException
DataInstanceServicegetLastLocalSADataInstances in interface DataInstanceServicecontainerId - the identifier of the containercontainerType - the type of the containerSDataInstanceReadExceptionpublic long getNumberOfDataInstances(long containerId,
String containerType,
ParentContainerResolver parentContainerResolver)
throws SDataInstanceReadException
DataInstanceServicegetNumberOfDataInstances in interface DataInstanceServicecontainerId - Identifier of containercontainerType - Type of container, e.g process instance, activity instance and so on.SDataInstanceReadExceptionpublic List<SDataInstance> getDataInstances(List<String> dataNames, long containerId, String containerType, ParentContainerResolver parentContainerResolver) throws SDataInstanceException
DataInstanceServicegetDataInstances in interface DataInstanceServicedataNames - A list of names of data instancescontainerId - Identifier of containercontainerType - Type of container, e.g process instance, activity instance and so on.SDataInstanceExceptionpublic List<SADataInstance> getLocalSADataInstances(long containerId, String containerType, int fromIndex, int numberOfResults) throws SDataInstanceReadException
DataInstanceServicegetLocalSADataInstances in interface DataInstanceServiceSDataInstanceReadExceptionpublic void deleteLocalArchivedDataInstances(long containerId,
String containerType)
throws SDataInstanceException
DataInstanceServicedeleteLocalArchivedDataInstances in interface DataInstanceServiceSDataInstanceExceptionpublic void deleteLocalDataInstances(long containerId,
String dataInstanceContainerType,
boolean dataPresent)
throws SDataInstanceException
DataInstanceServicedeleteLocalDataInstances in interface DataInstanceServiceSDataInstanceExceptionpublic void createDataInstance(SDataInstance dataInstance) throws SDataInstanceException
DataInstanceServicecreateDataInstance in interface DataInstanceServicedataInstance - SDataInstance objectSDataInstanceExceptionpublic void updateDataInstance(SDataInstance dataInstance, EntityUpdateDescriptor descriptor) throws SDataInstanceException
DataInstanceServiceupdateDataInstance in interface DataInstanceServicedataInstance - SDataInstance object will be updateddescriptor - Update descriptionSDataInstanceExceptionpublic void deleteDataInstance(SDataInstance dataInstance) throws SDataInstanceException
DataInstanceServicedeleteDataInstance in interface DataInstanceServicedataInstance - SDataInstance object will be deletedSDataInstanceExceptionpublic SDataInstance getDataInstance(long dataInstanceId) throws SDataInstanceException
DataInstanceServicegetDataInstance in interface DataInstanceServicedataInstanceId - Identifier of dataInstanceSDataInstanceExceptionCopyright © 2018 Bonitasoft S.A.. All rights reserved.