Package io.ran
Class CrudRepositoryTestDoubleBase<T,K> 
java.lang.Object
io.ran.CrudRepositoryTestDoubleBase<T,K> 
- All Implemented Interfaces:
- CrudRepository<T,- K> 
public abstract class CrudRepositoryTestDoubleBase<T,K> 
extends Object
implements CrudRepository<T,K> 
- 
Nested Class SummaryNested classes/interfaces inherited from interface io.ran.CrudRepositoryCrudRepository.CrudUpdateResult, CrudRepository.InlineQuery<T,Q extends CrudRepository.InlineQuery<T, Q>> 
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected GenericFactoryprotected MappingHelperprotected final TestDoubleDbprotected TypeDescriber<T>
- 
Constructor SummaryConstructorsConstructorDescriptionCrudRepositoryTestDoubleBase(GenericFactory genericFactory, Class<T> modelType, Class<K> keyType, MappingHelper mappingHelper, TestDoubleDb store) 
- 
Method SummaryModifier and TypeMethodDescriptiondeleteById(K k) Delete an instance of the entity by its id (primary key).deleteByIds(Collection<K> k) Delete all instances of the entity which has an id (primary key) in the given collection.Get an instance of the entity by its id (primary key).getAll()Get all instances of the entity, as a stream.Insert a new instance of the entity or update an existing one.protected <Z> CrudRepository.CrudUpdateResult
- 
Field Details- 
store
- 
genericFactory
- 
modelType
- 
keyType
- 
typeDescriber
- 
mappingHelper
 
- 
- 
Constructor Details- 
CrudRepositoryTestDoubleBasepublic CrudRepositoryTestDoubleBase(GenericFactory genericFactory, Class<T> modelType, Class<K> keyType, MappingHelper mappingHelper, TestDoubleDb store) 
 
- 
- 
Method Details- 
getDescription copied from interface:CrudRepositoryGet an instance of the entity by its id (primary key).Note: If the entity does not have a primary key, this method will not be available. In case of compound primary key, pass the model object with the primary key fields populated. - Specified by:
- getin interface- CrudRepository<T,- K> 
- Parameters:
- k- the id of the entity
- Returns:
- an optional containing the entity if it exists
 
- 
getAllDescription copied from interface:CrudRepositoryGet all instances of the entity, as a stream.- Specified by:
- getAllin interface- CrudRepository<T,- K> 
- Returns:
- an unordered stream of all instances of the entity
 
- 
deleteByIdDescription copied from interface:CrudRepositoryDelete an instance of the entity by its id (primary key).Note: If the entity does not have a primary key, this method will not be available. In case of compound primary key, pass the model object with the primary key fields populated. - Specified by:
- deleteByIdin interface- CrudRepository<T,- K> 
- Parameters:
- k- the id of the entity to be deleted
- Returns:
- the result of the delete operation
 
- 
deleteByIdsDescription copied from interface:CrudRepositoryDelete all instances of the entity which has an id (primary key) in the given collection.Note: If the entity does not have a primary key, this method will not be available. In case of compound primary key, pass the model object with the primary key fields populated. - Specified by:
- deleteByIdsin interface- CrudRepository<T,- K> 
- Parameters:
- k- a collection of ids to be deleted
- Returns:
- the result of the delete operation
 
- 
saveDescription copied from interface:CrudRepositoryInsert a new instance of the entity or update an existing one. Will match by primary key, but not other unique keys.- Specified by:
- savein interface- CrudRepository<T,- K> 
- Parameters:
- t- the entity to save
- Returns:
- the result of the save operation
 
- 
save
 
-