Class BackingRepository<T,ID> 
java.lang.Object
com.oracle.coherence.repository.AbstractRepositoryBase<ID,T,com.tangosol.net.NamedMap<ID,T>>
   
com.oracle.coherence.repository.AbstractRepository<ID,T>
 
com.oracle.coherence.spring.data.repository.BackingRepository<T,ID> 
- Type Parameters:
- T- the entity type
- ID- the id type
public class BackingRepository<T,ID> 
extends com.oracle.coherence.repository.AbstractRepository<ID,T> 
The BackingRepository is a Coherence Repository backing Coherence-based Spring repositories.
- Since:
- 3.0
- Author:
- Ryan Lubke
- See Also:
- 
Nested Class Summary
- 
Constructor SummaryConstructorsConstructorDescriptionBackingRepository(com.tangosol.net.NamedMap<ID, T> namedMap, org.springframework.data.mapping.context.MappingContext<CoherencePersistentEntity<T>, CoherencePersistentProperty> mappingContext, Class<? extends T> domainType) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidDeletes a given entity.Alias forAbstractRepository.remove(Object, boolean).voidDeletes all entities managed by the repository.booleandeleteAll(com.tangosol.util.Filter<?> filter) Alias forAbstractRepository.removeAll(Filter).deleteAll(com.tangosol.util.Filter<?> filter, boolean fReturn) Alias forAbstractRepository.removeAll(Filter, boolean).voidDeletes the given entities.booleandeleteAll(Collection<? extends T> colEntities) Alias forAbstractRepository.removeAll(Collection).deleteAll(Collection<? extends T> colEntities, boolean fReturn) Alias forAbstractRepository.removeAll(Collection, boolean).booleanAlias forAbstractRepository.removeAll(Stream).Alias forAbstractRepository.removeAll(Stream, boolean).voiddeleteAllById(Iterable<? extends ID> ids) Deletes all instances of the typeTwith the given IDs.booleandeleteAllById(Collection<? extends ID> colIds) Alias forAbstractRepository.removeAllById(Collection).deleteAllById(Collection<? extends ID> colIds, boolean fReturn) Alias forAbstractRepository.removeAllById(Collection, boolean).voiddeleteById(ID id) Deletes the entity with the given id.booleanexistsById(ID id) Returns whether an entity with the given id exists.findAll()Returns all instances of the type.org.springframework.data.domain.Page<T>findAll(org.springframework.data.domain.Pageable pageable) Returns aPageof entities meeting the paging restriction provided in thePageableobject.findAll(org.springframework.data.domain.Sort sort) Returns all entities sorted by the given options.findAllById(Iterable<ID> ids) Returns all instances of the typeTwith the given IDs.Retrieves an entity by its id.protected IDgetMap()Saves all given entities.Methods inherited from class com.oracle.coherence.repository.AbstractRepositoryaverage, average, average, average, average, average, average, average, count, count, distinct, distinct, exists, get, get, getAll, getAll, getAll, getAll, getAll, getAll, getAllOrderedBy, getAllOrderedBy, getAllOrderedBy, getAllOrderedBy, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, max, max, max, max, max, max, max, max, max, max, maxBy, maxBy, min, min, min, min, min, min, min, min, min, min, minBy, minBy, remove, remove, removeAll, removeAll, removeAll, removeAll, removeAll, removeAll, removeAllById, removeAllById, removeById, removeById, save, saveAll, saveAll, stream, stream, stream, sum, sum, sum, sum, sum, sum, sum, sum, top, top, top, top, topBy, topBy, topBy, topBy, update, update, update, update, update, update, updateAll, updateAll, updateAllMethods inherited from class com.oracle.coherence.repository.AbstractRepositoryBaseaddListener, addListener, addListener, createIndices, ensureInitialized, instantiateMapListener, listener, removeListener, removeListener, removeListener
- 
Constructor Details- 
BackingRepositorypublic BackingRepository(com.tangosol.net.NamedMap<ID, T> namedMap, org.springframework.data.mapping.context.MappingContext<CoherencePersistentEntity<T>, CoherencePersistentProperty> mappingContext, Class<? extends T> domainType) 
 
- 
- 
Method Details- 
getMap
- 
getId
- 
getEntityType
- 
deleteDeletes a given entity.- Parameters:
- entity- must not be null
- Throws:
- IllegalArgumentException- in case the given entity is null.
 
- 
deleteByIdDeletes the entity with the given id.- Parameters:
- id- must not be null
- Throws:
- IllegalArgumentException- in case the given id is null
 
- 
deleteAllDeletes the given entities.- Parameters:
- entities- must not be null. Must not contain null elements
- Throws:
- IllegalArgumentException- in case the given entities or one of its entities is null.
 
- 
saveAllSaves all given entities.- Type Parameters:
- S- entity type
- Parameters:
- entities- must not be null nor must it contain null
- Returns:
- the saved entities; will never be null. The returned Iterable will have the same size as the Iterable passed as an argument.
- Throws:
- IllegalArgumentException- in case the given- entitiesor one of its entities is null.
 
- 
findByIdRetrieves an entity by its id.- Parameters:
- id- must not be null.
- Returns:
- the entity with the given id or Optional#empty() if none found.
- Throws:
- IllegalArgumentException- if id is null.
 
- 
findAllReturns all instances of the type.- Returns:
- all entities
 
- 
findAllReturns all entities sorted by the given options.- Parameters:
- sort- the sort configuration
- Returns:
- all entities sorted by the given options
 
- 
findAllpublic org.springframework.data.domain.Page<T> findAll(org.springframework.data.domain.Pageable pageable) Returns aPageof entities meeting the paging restriction provided in thePageableobject.- Parameters:
- pageable- paging metadata
- Returns:
- a page of entities
 
- 
findAllByIdReturns all instances of the typeTwith the given IDs.If some or all ids are not found, no entities are returned for these IDs. Note that the order of elements in the result is not guaranteed. - Parameters:
- ids- must not be null nor contain any null values
- Returns:
- guaranteed to be not null. The size can be equal or less than the number of given ids.
- Throws:
- IllegalArgumentException- in case the given- idsor one of its items is null.
 
- 
existsByIdReturns whether an entity with the given id exists.- Parameters:
- id- must not be null
- Returns:
- true if an entity with the given id exists, false otherwise.
- Throws:
- IllegalArgumentException- if id is null.
 
- 
deleteAllpublic void deleteAll()Deletes all entities managed by the repository.
- 
deleteAlias forAbstractRepository.remove(Object, boolean).- Parameters:
- entity- the entity to remove
- fReturn- the flag specifying whether to return removed entity
- Returns:
- deleted entity, iff fReturn == true;nullotherwise
 
- 
deleteAllByIdDeletes all instances of the typeTwith the given IDs.- Parameters:
- ids- must not be null. Must not contain null elements.
 
- 
deleteAllByIdAlias forAbstractRepository.removeAllById(Collection).- Parameters:
- colIds- the identifiers of the entities to remove
- Returns:
- trueif this repository changed as a result of the call
 
- 
deleteAllByIdAlias forAbstractRepository.removeAllById(Collection, boolean).- Parameters:
- colIds- the identifiers of the entities to remove
- fReturn- the flag specifying whether to return removed entity
- Returns:
- the map of removed entity identifiers as keys, and the removed
 entities as values iff fReturn == true;nullotherwise
 
- 
deleteAllAlias forAbstractRepository.removeAll(Collection).- Parameters:
- colEntities- the entities to remove
- Returns:
- trueif this repository changed as a result of the call
 
- 
deleteAllAlias forAbstractRepository.removeAll(Collection, boolean).- Parameters:
- colEntities- the entities to remove
- fReturn- the flag specifying whether to return removed entity
- Returns:
- the map of removed entity identifiers as keys, and the removed
 entities as values iff fReturn == true;nullotherwise
 
- 
deleteAllAlias forAbstractRepository.removeAll(Stream).- Parameters:
- strEntities- the entities to remove
- Returns:
- trueif this repository changed as a result of the call
 
- 
deleteAllAlias forAbstractRepository.removeAll(Stream, boolean).- Parameters:
- strEntities- the entities to remove
- fReturn- the flag specifying whether to return removed entity
- Returns:
- the map of removed entity identifiers as keys, and the removed
 entities as values iff fReturn == true;nullotherwise
 
- 
deleteAllpublic boolean deleteAll(com.tangosol.util.Filter<?> filter) Alias forAbstractRepository.removeAll(Filter).- Parameters:
- filter- the criteria that should be used to select entities to remove
- Returns:
- trueif this repository changed as a result of the call
 
- 
deleteAllAlias forAbstractRepository.removeAll(Filter, boolean).- Parameters:
- filter- the criteria that should be used to select entities to remove
- fReturn- the flag specifying whether to return removed entity
- Returns:
- the map of removed entity identifiers as keys, and the removed
 entities as values iff fReturn == true;nullotherwise
 
 
-