public interface JdbcAggregateOperations
Modifier and Type | Method and Description |
---|---|
long |
count(Class<?> domainType)
Counts the number of aggregates of a given type.
|
<T> void |
delete(T aggregateRoot,
Class<T> domainType)
Delete an aggregate identified by it's aggregate root.
|
void |
deleteAll(Class<?> domainType)
Delete all aggregates of a given type.
|
<T> void |
deleteById(Object id,
Class<T> domainType)
Deletes a single Aggregate including all entities contained in that aggregate.
|
<T> boolean |
existsById(Object id,
Class<T> domainType)
Checks if an aggregate identified by type and id exists in the database.
|
<T> Iterable<T> |
findAll(Class<T> domainType)
Load all aggregates of a given type.
|
<T> Page<T> |
findAll(Class<T> domainType,
Pageable pageable)
Load a page of (potentially sorted) aggregates of a given type.
|
<T> Iterable<T> |
findAll(Class<T> domainType,
Sort sort)
Load all aggregates of a given type, sorted.
|
<T> Iterable<T> |
findAllById(Iterable<?> ids,
Class<T> domainType)
Load all aggregates of a given type that are identified by the given ids.
|
<T> T |
findById(Object id,
Class<T> domainType)
Load an aggregate from the database.
|
<T> T |
insert(T instance)
Dedicated insert function.
|
<T> T |
save(T instance)
Saves an instance of an aggregate, including all the members of the aggregate.
|
<T> T |
update(T instance)
Dedicated update function.
|
<T> T save(T instance)
T
- the type of the aggregate root.instance
- the aggregate root of the aggregate to be saved. Must not be null
.<T> T insert(T instance)
This is useful if the client provides an id for new aggregate roots.
T
- the type of the aggregate root.instance
- the aggregate root of the aggregate to be inserted. Must not be null
.<T> T update(T instance)
T
- the type of the aggregate root.instance
- the aggregate root of the aggregate to be inserted. Must not be null
.<T> void deleteById(Object id, Class<T> domainType)
T
- the type of the aggregate root.id
- the id of the aggregate root of the aggregate to be deleted. Must not be null
.domainType
- the type of the aggregate root.<T> void delete(T aggregateRoot, Class<T> domainType)
T
- the type of the aggregate root.aggregateRoot
- to delete. Must not be null
.domainType
- the type of the aggregate root. Must not be null
.void deleteAll(Class<?> domainType)
domainType
- type of the aggregate roots to be deleted. Must not be null
.long count(Class<?> domainType)
domainType
- the type of the aggregates to be counted.null
.@Nullable <T> T findById(Object id, Class<T> domainType)
T
- the type of the aggregate root.id
- the id of the aggregate to load. Must not be null
.domainType
- the type of the aggregate root. Must not be null
.null
.<T> Iterable<T> findAllById(Iterable<?> ids, Class<T> domainType)
T
- the type of the aggregate roots. Must not be null
.ids
- of the aggregate roots identifying the aggregates to load. Must not be null
.domainType
- the type of the aggregate roots. Must not be null
.null
.<T> Iterable<T> findAll(Class<T> domainType)
T
- the type of the aggregate roots. Must not be null
.domainType
- the type of the aggregate roots. Must not be null
.null
.<T> boolean existsById(Object id, Class<T> domainType)
T
- the type of the aggregate root.id
- the id of the aggregate root.domainType
- the type of the aggregate root.<T> Iterable<T> findAll(Class<T> domainType, Sort sort)
T
- the type of the aggregate roots. Must not be null
.domainType
- the type of the aggregate roots. Must not be null
.sort
- the sorting information. Must not be null
.null
.<T> Page<T> findAll(Class<T> domainType, Pageable pageable)
T
- the type of the aggregate roots. Must not be null
.domainType
- the type of the aggregate roots. Must not be null
.pageable
- the pagination information. Must not be null
.null
.Copyright © 2017–2020 Pivotal Software, Inc.. All rights reserved.