T - the domain type the repository managesID - the type of the id of the entity the repository manages@NoRepositoryBean
public interface JmixDataRepository<T,ID>
extends org.springframework.data.repository.PagingAndSortingRepository<T,ID>
Extends functionality of PagingAndSortingRepository by adding FetchPlan parameters to common methods and providing
other Jmix-specific methods
PagingAndSortingRepository| Modifier and Type | Method and Description |
|---|---|
java.lang.Iterable<T> |
findAll(FetchPlan fetchPlan)
Returns all instances of the type loaded according to
fetchPlan |
java.lang.Iterable<T> |
findAll(java.lang.Iterable<ID> ids,
FetchPlan fetchPlan)
Returns all instances of the type
T with the given IDs loaded according to fetchPlan |
org.springframework.data.domain.Page<T> |
findAll(org.springframework.data.domain.Pageable pageable,
FetchPlan fetchPlan)
Returns a
Page of entities meeting the paging restriction provided in the Pageable object. |
java.lang.Iterable<T> |
findAll(org.springframework.data.domain.Sort sort,
FetchPlan fetchPlan)
Returns all entities sorted by the given options and loaded by specified FetchPlan.
|
java.util.Optional<T> |
findOne(ID id,
FetchPlan fetchPlan)
Loads an entity by its
id according to fetchPlan |
T |
newOne()
Invokes
metadata.create(<T>.class) |
T newOne()
metadata.create(<T>.class)<T>.java.util.Optional<T> findOne(ID id, FetchPlan fetchPlan)
id according to fetchPlanid - must not be null.java.lang.Iterable<T> findAll(FetchPlan fetchPlan)
fetchPlanjava.lang.Iterable<T> findAll(java.lang.Iterable<ID> ids, @Nullable FetchPlan fetchPlan)
T with the given IDs loaded according to fetchPlan
If some or all ids are not found, no entities are returned for these IDs.
fetchPlan - defines entity graph to load. FetchPlan#BASE will be used instead in case of null.ids - must not be null nor contain any null values.java.lang.IllegalArgumentException - in case the given ids or one of its items is null.java.lang.Iterable<T> findAll(org.springframework.data.domain.Sort sort, @Nullable FetchPlan fetchPlan)
fetchPlan - to load entity. FetchPlan#BASE will be used if fetchPlan == nullorg.springframework.data.domain.Page<T> findAll(org.springframework.data.domain.Pageable pageable, @Nullable FetchPlan fetchPlan)
Page of entities meeting the paging restriction provided in the Pageable object.
Entities will be loaded according to passed fetchPlanfetchPlan - to load entities. FetchPlan#BASE will be used if fetchPlan == null