Interface DataInstanceService
-
- All Known Implementing Classes:
DataInstanceServiceImpl
public interface DataInstanceService
- Since:
- 6.0
- Author:
- Zhao Na, Elias Ricken de Medeiros, Feng Hui, Matthieu Chaffotte
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
createDataInstance(SDataInstance dataInstance)
Create dataInstance in DB for given dataInstancevoid
deleteDataInstance(SDataInstance dataInstance)
Delete the specific dataInstancevoid
deleteLocalArchivedDataInstances(long containerId, java.lang.String dataInstanceContainerType)
Delete all local archived data instances for a specified containervoid
deleteLocalArchivedDataInstances(java.util.List<java.lang.Long> containerIds, java.lang.String dataInstanceContainerType)
Delete all local archived data instances for multiple containers having the same typevoid
deleteLocalDataInstances(long containerId, java.lang.String dataInstanceContainerType, boolean dataPresent)
Delete all local active data instances for a specified containerSDataInstance
getDataInstance(long dataInstanceId)
Get dataInstance by its idSDataInstance
getDataInstance(java.lang.String dataName, long containerId, java.lang.String containerType, ParentContainerResolver parentContainerResolver)
Get dataInstance visible in the specific containerjava.util.List<SDataInstance>
getDataInstances(long containerId, java.lang.String containerType, ParentContainerResolver parentContainerResolver, int fromIndex, int numberOfResults)
Get all dataInstances visible in the specific containerjava.util.List<SDataInstance>
getDataInstances(java.util.List<java.lang.String> dataNames, long containerId, java.lang.String containerType, ParentContainerResolver parentContainerResolver)
Get dataInstances visible in the specific container for given namesjava.util.List<SADataInstance>
getLastLocalSADataInstances(long containerId, java.lang.String containerType, int startIndex, int maxResults)
Gets the last archived SADataInstance objects of the container.SADataInstance
getLastSADataInstance(java.lang.String dataName, long containerId, java.lang.String containerType, ParentContainerResolver parentContainerResolver)
Gets the last archived SADataInstance object for the named data in the container.SDataInstance
getLocalDataInstance(java.lang.String dataName, long containerId, java.lang.String containerType)
Get the local dataInstance by name in a certain container, the dataInstance is existed in this containerjava.util.List<SDataInstance>
getLocalDataInstances(long containerId, java.lang.String containerType, int fromIndex, int numberOfResults)
Get a list of local dataInstances for the specific container, those dataInstances must belong to the specified container.java.util.List<SADataInstance>
getLocalSADataInstances(long containerId, java.lang.String containerType, int fromIndex, int maxResults)
Get the local SADataInstances for this elementlong
getNumberOfDataInstances(long containerId, java.lang.String containerType, ParentContainerResolver parentContainerResolver)
Get number of dataInstance for specified containerSADataInstance
getSADataInstance(long sourceObjectId, long time)
Get SADataInstance object for specific dataInstance at the specific timeSADataInstance
getSADataInstance(long containerId, java.lang.String containerType, ParentContainerResolver parentContainerResolver, java.lang.String dataName, long time)
Get SADataInstance object archived in the specific time for name specified dataInstance in a containerjava.util.List<SADataInstance>
getSADataInstances(long containerId, java.lang.String containerType, ParentContainerResolver parentContainerResolver, java.util.List<java.lang.String> dataNames, long time)
Get all SADataInstance objects archived after specific time for specific dataInstance in a containervoid
updateDataInstance(SDataInstance dataInstance, EntityUpdateDescriptor descriptor)
Update the specific dataInstance according to the given descriptor
-
-
-
Method Detail
-
createDataInstance
void createDataInstance(SDataInstance dataInstance) throws SDataInstanceException
Create dataInstance in DB for given dataInstance- Parameters:
dataInstance
- SDataInstance object- Throws:
SDataInstanceException
-
updateDataInstance
void updateDataInstance(SDataInstance dataInstance, EntityUpdateDescriptor descriptor) throws SDataInstanceException
Update the specific dataInstance according to the given descriptor- Parameters:
dataInstance
- SDataInstance object will be updateddescriptor
- Update description- Throws:
SDataInstanceException
-
deleteDataInstance
void deleteDataInstance(SDataInstance dataInstance) throws SDataInstanceException
Delete the specific dataInstance- Parameters:
dataInstance
- SDataInstance object will be deleted- Throws:
SDataInstanceException
-
getDataInstance
SDataInstance getDataInstance(long dataInstanceId) throws SDataInstanceException
Get dataInstance by its id- Parameters:
dataInstanceId
- Identifier of dataInstance- Returns:
- a SDataInstance object
- Throws:
SDataInstanceException
-
getDataInstance
SDataInstance getDataInstance(java.lang.String dataName, long containerId, java.lang.String containerType, ParentContainerResolver parentContainerResolver) throws SDataInstanceException
Get dataInstance visible in the specific container- Parameters:
dataName
- Name of data instancecontainerId
- Identifier of containercontainerType
- Type of container, e.g process instance, activity instance and so on.- Returns:
- a SDataInstance object
- Throws:
SDataInstanceException
-
getDataInstances
java.util.List<SDataInstance> getDataInstances(java.util.List<java.lang.String> dataNames, long containerId, java.lang.String containerType, ParentContainerResolver parentContainerResolver) throws SDataInstanceException
Get dataInstances visible in the specific container for given names- Parameters:
dataNames
- A list of names of data instancescontainerId
- Identifier of containercontainerType
- Type of container, e.g process instance, activity instance and so on.- Returns:
- a list of SDataInstance objects
- Throws:
SDataInstanceException
-
getDataInstances
java.util.List<SDataInstance> getDataInstances(long containerId, java.lang.String containerType, ParentContainerResolver parentContainerResolver, int fromIndex, int numberOfResults) throws SDataInstanceException
Get all dataInstances visible in the specific container- Parameters:
containerId
- Identifier of containercontainerType
- Type of container, e.g process instance, activity instance and so on.- Returns:
- Throws:
SDataInstanceException
-
getLocalDataInstance
SDataInstance getLocalDataInstance(java.lang.String dataName, long containerId, java.lang.String containerType) throws SDataInstanceException
Get the local dataInstance by name in a certain container, the dataInstance is existed in this container- Parameters:
dataName
- Name of dataInstancecontainerId
- Identifier of containercontainerType
- Type of container, e.g process instance, activity instance and so on.- Returns:
- an SDataInstance object
- Throws:
SDataInstanceException
-
getLocalDataInstances
java.util.List<SDataInstance> getLocalDataInstances(long containerId, java.lang.String containerType, int fromIndex, int numberOfResults) throws SDataInstanceException
Get a list of local dataInstances for the specific container, those dataInstances must belong to the specified container. This method is paginated.- Parameters:
containerId
- Identifier of containercontainerType
- Type of container, e.g process instance, activity instance and so on.- Returns:
- a list of SDataInstance objects
- Throws:
SDataInstanceException
-
getSADataInstance
SADataInstance getSADataInstance(long sourceObjectId, long time) throws SDataInstanceException
Get SADataInstance object for specific dataInstance at the specific time- Parameters:
sourceObjectId
- Identifier of data instance which has been archivedtime
- The archive time- Returns:
- an SADataInstance object
- Throws:
SDataInstanceException
-
getSADataInstance
SADataInstance getSADataInstance(long containerId, java.lang.String containerType, ParentContainerResolver parentContainerResolver, java.lang.String dataName, long time) throws SDataInstanceException
Get SADataInstance object archived in the specific time for name specified dataInstance in a container- Parameters:
containerId
- Identifier of containercontainerType
- Type of container, e.g process instance, activity instance and so on.dataName
- Name of data instancetime
- The archive time- Returns:
- an SADataInstance object
- Throws:
SDataInstanceException
-
getSADataInstances
java.util.List<SADataInstance> getSADataInstances(long containerId, java.lang.String containerType, ParentContainerResolver parentContainerResolver, java.util.List<java.lang.String> dataNames, long time) throws SDataInstanceException
Get all SADataInstance objects archived after specific time for specific dataInstance in a container- Parameters:
containerId
- Identifier of containercontainerType
- Type of container, e.g process instance, activity instance and so on.dataNames
- Name of datatime
- The archive time- Returns:
- a list of SADataInstance objects
- Throws:
SDataInstanceException
-
getNumberOfDataInstances
long getNumberOfDataInstances(long containerId, java.lang.String containerType, ParentContainerResolver parentContainerResolver) throws SDataInstanceException
Get number of dataInstance for specified container- Parameters:
containerId
- Identifier of containercontainerType
- Type of container, e.g process instance, activity instance and so on.- Returns:
- the number of dataInstances
- Throws:
SDataInstanceException
-
getLastSADataInstance
SADataInstance getLastSADataInstance(java.lang.String dataName, long containerId, java.lang.String containerType, ParentContainerResolver parentContainerResolver) throws SDataInstanceException
Gets the last archived SADataInstance object for the named data in the container.- Parameters:
dataName
- the name of the datacontainerId
- the identifier of the containercontainerType
- the type of the container- Returns:
- the last archived SADataInstance
- Throws:
SDataInstanceException
-
getLastLocalSADataInstances
java.util.List<SADataInstance> getLastLocalSADataInstances(long containerId, java.lang.String containerType, int startIndex, int maxResults) throws SDataInstanceException
Gets the last archived SADataInstance objects of the container.- Parameters:
containerId
- the identifier of the containercontainerType
- the type of the containerstartIndex
-maxResults
-- Returns:
- the last archived SADataInstance
- Throws:
SDataInstanceException
-
getLocalSADataInstances
java.util.List<SADataInstance> getLocalSADataInstances(long containerId, java.lang.String containerType, int fromIndex, int maxResults) throws SDataInstanceException
Get the local SADataInstances for this element- Parameters:
containerId
-containerType
-fromIndex
-maxResults
-- Returns:
- Throws:
SDataInstanceException
-
deleteLocalArchivedDataInstances
void deleteLocalArchivedDataInstances(long containerId, java.lang.String dataInstanceContainerType) throws SDataInstanceException
Delete all local archived data instances for a specified container- Parameters:
containerId
-dataInstanceContainerType
-- Throws:
SDataInstanceException
- Since:
- 6.1
-
deleteLocalArchivedDataInstances
void deleteLocalArchivedDataInstances(java.util.List<java.lang.Long> containerIds, java.lang.String dataInstanceContainerType) throws SDataInstanceException
Delete all local archived data instances for multiple containers having the same type- Parameters:
containerIds
- containersdataInstanceContainerType
- type of the containers- Throws:
SDataInstanceException
- Since:
- 7.8
-
deleteLocalDataInstances
void deleteLocalDataInstances(long containerId, java.lang.String dataInstanceContainerType, boolean dataPresent) throws SDataInstanceException
Delete all local active data instances for a specified container- Parameters:
containerId
-dataInstanceContainerType
-dataPresent
-- Throws:
SDataInstanceException
- Since:
- 6.1
-
-