public interface DataAccessStrategy
JdbcAggregateOperations which provides interactions related to
complete aggregates.| Modifier and Type | Method and Description |
|---|---|
long |
count(Class<?> domainType)
Counts the rows in the table representing the given domain type.
|
void |
delete(Object id,
Class<?> domainType)
deletes a single row identified by the id, from the table identified by the domainType.
|
void |
delete(Object rootId,
PersistentPropertyPath<RelationalPersistentProperty> propertyPath)
Deletes all entities reachable via propertyPath from the instance identified by rootId.
|
<T> void |
deleteAll(Class<T> domainType)
Deletes all entities of the given domain type.
|
void |
deleteAll(PersistentPropertyPath<RelationalPersistentProperty> propertyPath)
Deletes all entities reachable via propertyPath from any instance.
|
<T> boolean |
existsById(Object id,
Class<T> domainType)
returns if a row with the given id exists for the given type.
|
<T> Iterable<T> |
findAll(Class<T> domainType)
Loads all entities of the given type.
|
<T> Iterable<T> |
findAllById(Iterable<?> ids,
Class<T> domainType)
Loads all entities that match one of the ids passed as an argument.
|
<T> Iterable<T> |
findAllByProperty(Object rootId,
RelationalPersistentProperty property)
Finds all entities reachable via property from the instance identified by rootId.
|
<T> T |
findById(Object id,
Class<T> domainType)
Loads a single entity identified by type and id.
|
<T> Object |
insert(T instance,
Class<T> domainType,
Map<String,Object> additionalParameters)
Inserts a the data of a single entity.
|
<T> boolean |
update(T instance,
Class<T> domainType)
Updates the data of a single entity in the database.
|
<T> Object insert(T instance, Class<T> domainType, Map<String,Object> additionalParameters)
T - the type of the instance.instance - the instance to be stored. Must not be null.domainType - the type of the instance. Must not be null.additionalParameters - name-value pairs of additional parameters. Especially ids of parent entities that need
to get referenced are contained in this map. Must not be null.<T> boolean update(T instance,
Class<T> domainType)
T - the type of the instance to save.instance - the instance to save. Must not be null.domainType - the type of the instance to save. Must not be null.void delete(Object id, Class<?> domainType)
id - the id of the row to be deleted. Must not be null.domainType - the type of entity to be deleted. Implicitly determines the table to operate on. Must not be
null.void delete(Object rootId, PersistentPropertyPath<RelationalPersistentProperty> propertyPath)
rootId - Id of the root object on which the propertyPath is based. Must not be null.propertyPath - Leading from the root object to the entities to be deleted. Must not be null.<T> void deleteAll(Class<T> domainType)
T - type of the domain type.domainType - the domain type for which to delete all entries. Must not be null.void deleteAll(PersistentPropertyPath<RelationalPersistentProperty> propertyPath)
propertyPath - Leading from the root object to the entities to be deleted. Must not be null.long count(Class<?> domainType)
domainType - the domain type for which to count the elements. Must not be null.null.@Nullable <T> T findById(Object id, Class<T> domainType)
T - the type of the entity.id - the id of the entity to load. Must not be null.domainType - the domain type of the entity. Must not be null.null.<T> Iterable<T> findAll(Class<T> domainType)
T - the type of entities to load.domainType - the type of entities to load. Must not be null.null.<T> Iterable<T> findAllById(Iterable<?> ids, Class<T> domainType)
T - type of entities to load.ids - the Ids of the entities to load. Must not be null.domainType - the type of entities to laod. Must not be null.null.<T> Iterable<T> findAllByProperty(Object rootId, RelationalPersistentProperty property)
rootId - Id of the root object on which the propertyPath is based.property - Leading from the root object to the entities to be found.<T> boolean existsById(Object id, Class<T> domainType)
T - the type of the entity.id - the id of the entity for which to check. Must not be null.domainType - the type of the entity to check for. Must not be null.true if a matching row exists, otherwise false.Copyright © 2017–2019 Pivotal Software, Inc.. All rights reserved.