Interface DataObjectDataSource
- All Known Implementing Classes:
DataObjectDataSourceImpl
public interface DataObjectDataSource
A data source is responsible to handle external data objects, like lookup, query, create, update and delete.
- Author:
- Micha Kiener
-
Method Summary
Modifier and TypeMethodDescriptionCreate a new data object deletion builder use to delete existing data objects.Creates a new data object instance builder object used to create new data object instances and persist them.Creates a new data object instance query object that can be used for querying data object instances.Creates a new data object modification builder used to modify an existing data object with strong type support.default DataObjectModificationBuilder
createDataObjectModificationBuilder
(String definitionId) Creates a new data object modification builder used to modify an existing data object with strong type support.void
deleteDataObjectInstance
(String lookupId, String definitionId) Deletes the specified data object given by its lookup id and specified by the data object definition and model.findDataObjectByLookupIdAndDefinitionId
(String lookupId, String definitionId) Lookup a single data object given by its lookup id and definition id.findDataObjectByLookupIdAndDefinitionKey
(String lookupId, String definitionKey) Lookup a single data object given by its lookup id and definition key.Returns the optional description for this data source.getId()
Returns the id of this source which must be unique within the system, so there must only be exactly one data source with that id.getName()
Returns the name of this data source which might be used as a label, but never for referencing it.
-
Method Details
-
getId
String getId()Returns the id of this source which must be unique within the system, so there must only be exactly one data source with that id.- Returns:
- the id of this data source
-
getName
String getName()Returns the name of this data source which might be used as a label, but never for referencing it.- Returns:
- the name of this data source
-
getDescription
String getDescription()Returns the optional description for this data source.- Returns:
- the description of this data source
-
findDataObjectByLookupIdAndDefinitionId
DataObjectInstanceVariableContainer findDataObjectByLookupIdAndDefinitionId(String lookupId, String definitionId) Lookup a single data object given by its lookup id and definition id.- Parameters:
lookupId
- the lookup id of the data object to be returneddefinitionId
- the data object definition id to load a data object for- Returns:
- the data object instance, if found, null otherwise
-
findDataObjectByLookupIdAndDefinitionKey
DataObjectInstanceVariableContainer findDataObjectByLookupIdAndDefinitionKey(String lookupId, String definitionKey) Lookup a single data object given by its lookup id and definition key.- Parameters:
lookupId
- the lookup id of the data object to be returneddefinitionKey
- the data object definition key to load a data object for- Returns:
- the data object instance, if found, null otherwise
-
createDataObjectInstanceBuilder
DataObjectInstanceVariableContainerBuilder createDataObjectInstanceBuilder()Creates a new data object instance builder object used to create new data object instances and persist them.- Returns:
- the data object instance builder object
-
createDataObjectModificationBuilder
Creates a new data object modification builder used to modify an existing data object with strong type support. If needed by the data source implementation, the builder might load and hold the current data object first to allow modified data to be applied directly, specially, if partial updates are not supported as the modification builder might only update partial data of the object.- Parameters:
definitionId
- the data object definition id to create a new modification builder for- Returns:
- the data object modification builder
-
createDataObjectModificationBuilder
DataObjectModificationBuilder createDataObjectModificationBuilder()Creates a new data object modification builder used to modify an existing data object with strong type support. If needed by the data source implementation, the builder might load and hold the current data object first to allow modified data to be applied directly, specially, if partial updates are not supported as the modification builder might only update partial data of the object.- Returns:
- the data object modification builder
-
createDataObjectInstanceQuery
DataObjectInstanceVariableContainerQuery createDataObjectInstanceQuery()Creates a new data object instance query object that can be used for querying data object instances.- Returns:
- the data object query
-
createDataObjectDeletionBuilder
DataObjectDeletionBuilder createDataObjectDeletionBuilder()Create a new data object deletion builder use to delete existing data objects.- Returns:
- the data object deletion builder
-
deleteDataObjectInstance
Deletes the specified data object given by its lookup id and specified by the data object definition and model.- Parameters:
lookupId
- the lookup id of the data object to be deleteddefinitionId
- the data object definition id to delete an object instance for
-