public interface DataSourceHandler
| Modifier and Type | Method and Description |
|---|---|
boolean |
executeDelete(String entityName,
Map<String,Object> keys)
Deletes an entity instance.
|
EntityData |
executeInsert(EntityData entityData,
boolean returnCreatedEntity)
Creates an entity instance.
|
<T> T |
executeInsert(T pojoData,
String entityName,
boolean returnCreatedEntity)
Creates an entity instance.
|
EntityData |
executeInsertWithAssociations(EntityData entityData,
boolean returnCreatedEntity)
Creates an entity instance with associated entities.
|
EntityData |
executeRead(String entityName,
Map<String,Object> keys,
List<String> flattenedElementNames)
Reads an entity instance.
|
EntityData |
executeUpdate(EntityData entityData,
Map<String,Object> keys,
boolean returnUpdatedEntity)
Updates an entity instance.
|
EntityData executeInsert(EntityData entityData, boolean returnCreatedEntity) throws DatasourceException
entityData - Represents the entity to be createdreturnCreatedEntity - Indicates whether the created entity needs to be returnedreturnCreatedEntity, either the created entity
or null is returned.DatasourceException - If an issue with the data source occurs<T> T executeInsert(T pojoData,
String entityName,
boolean returnCreatedEntity)
throws DatasourceException
pojoData - Represents the entity to be createdentityName - Name of the entityreturnCreatedEntity - Indicates whether the created entity needs to be returnedreturnCreatedEntity, either the created entity
or null is returned.DatasourceException - If an issue with the data source occursEntityData executeInsertWithAssociations(EntityData entityData, boolean returnCreatedEntity) throws DatasourceException
entityData - Represents the entity and its associated entities to be createdreturnCreatedEntity - Indicates whether the created entity needs to be returnedreturnCreatedEntity, either the created entity
or null is returned.DatasourceException - If an issue with the data source occursEntityData executeUpdate(EntityData entityData, Map<String,Object> keys, boolean returnUpdatedEntity) throws DatasourceException
entityData - Represents the entity to be updatedreturnUpdatedEntity - Indicates whether the updated entity needs to be returnedreturnUpdatedEntity, either the updated entity
or null is returned.DatasourceException - If an issue with the data source occursboolean executeDelete(String entityName, Map<String,Object> keys) throws DatasourceException
entityName - Name of the entity to be deletedkeys - Key-value pair identifying a particular entity instancetrue if the entity is deleted, false otherwiseDatasourceException - If an issue with the data source occursEntityData executeRead(String entityName, Map<String,Object> keys, List<String> flattenedElementNames) throws DatasourceException
entityName - Name of the entity to be readkeys - Key-value pair identifying a particular entity instanceflattenedElementNames - Names of elements that have to be read.
For elements in a structured type, the flattened name has to be given.DatasourceException - If an issue with the data source occursCopyright © 2020 SAP. All Rights Reserved.