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
Modifier and TypeMethodDescriptionvoidcreateDataInstance(SDataInstance dataInstance) Create dataInstance in DB for given dataInstancevoiddeleteDataInstance(SDataInstance dataInstance) Delete the specific dataInstancevoiddeleteLocalArchivedDataInstances(long containerId, String dataInstanceContainerType) Delete all local archived data instances for a specified containervoiddeleteLocalArchivedDataInstances(List<Long> containerIds, String dataInstanceContainerType) Delete all local archived data instances for multiple containers having the same typevoiddeleteLocalDataInstances(long containerId, String dataInstanceContainerType, boolean dataPresent) Delete all local active data instances for a specified containergetDataInstance(long dataInstanceId) Get dataInstance by its idgetDataInstance(String dataName, long containerId, String containerType, ParentContainerResolver parentContainerResolver) Get dataInstance visible in the specific containergetDataInstances(long containerId, String containerType, ParentContainerResolver parentContainerResolver, int fromIndex, int numberOfResults) Get all dataInstances visible in the specific containergetDataInstances(List<String> dataNames, long containerId, String containerType, ParentContainerResolver parentContainerResolver) Get dataInstances visible in the specific container for given namesgetLastLocalSADataInstances(long containerId, String containerType, int startIndex, int maxResults) Gets the last archived SADataInstance objects of the container.getLastSADataInstance(String dataName, long containerId, String containerType, ParentContainerResolver parentContainerResolver) Gets the last archived SADataInstance object for the named data in the container.getLocalDataInstance(String dataName, long containerId, String containerType) Get the local dataInstance by name in a certain container, the dataInstance is existed in this containergetLocalDataInstances(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.getLocalSADataInstances(long containerId, String containerType, int fromIndex, int maxResults) Get the local SADataInstances for this elementlonggetNumberOfDataInstances(long containerId, String containerType, ParentContainerResolver parentContainerResolver) Get number of dataInstance for specified containergetSADataInstance(long sourceObjectId, long time) Get SADataInstance object for specific dataInstance at the specific timegetSADataInstance(long containerId, String containerType, ParentContainerResolver parentContainerResolver, String dataName, long time) Get SADataInstance object archived in the specific time for name specified dataInstance in a containergetSADataInstances(long containerId, String containerType, ParentContainerResolver parentContainerResolver, List<String> dataNames, long time) Get all SADataInstance objects archived after specific time for specific dataInstance in a containervoidupdateDataInstance(SDataInstance dataInstance, EntityUpdateDescriptor descriptor) Update the specific dataInstance according to the given descriptor
-
Method Details
-
createDataInstance
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
Delete the specific dataInstance- Parameters:
dataInstance- SDataInstance object will be deleted- Throws:
SDataInstanceException
-
getDataInstance
Get dataInstance by its id- Parameters:
dataInstanceId- Identifier of dataInstance- Returns:
- a SDataInstance object
- Throws:
SDataInstanceException
-
getDataInstance
SDataInstance getDataInstance(String dataName, long containerId, 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
List<SDataInstance> getDataInstances(List<String> dataNames, long containerId, 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
List<SDataInstance> getDataInstances(long containerId, 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(String dataName, long containerId, 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
List<SDataInstance> getLocalDataInstances(long containerId, 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
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, String containerType, ParentContainerResolver parentContainerResolver, 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
List<SADataInstance> getSADataInstances(long containerId, String containerType, ParentContainerResolver parentContainerResolver, List<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, 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(String dataName, long containerId, 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
List<SADataInstance> getLastLocalSADataInstances(long containerId, 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
List<SADataInstance> getLocalSADataInstances(long containerId, 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, 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(List<Long> containerIds, 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, 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
-