Class SimpleGemfireRepository<T,ID>
java.lang.Object
org.springframework.data.gemfire.repository.support.SimpleGemfireRepository<T,ID>
- All Implemented Interfaces:
GemfireRepository<T,,ID> CrudRepository<T,,ID> PagingAndSortingRepository<T,,ID> Repository<T,ID>
Simple, basic
PagingAndSortingRepository / CrudRepository implementation for Apache Geode.- Author:
- Oliver Gierke, David Turanski, John Blum, Jens Schauder
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSimpleGemfireRepository(GemfireTemplate template, EntityInformation<T, ID> entityInformation) Constructs a new instance ofSimpleGemfireRepositoryinitialized with theGemfireTemplateandEntityInformation. -
Method Summary
Modifier and TypeMethodDescriptionlongcount()Counts the number of entities stored in theRegion.voidvoidvoidvoiddeleteAllById(Iterable<? extends ID> ids) voiddeleteById(ID id) booleanexistsById(ID id) Determines whether an entity with the given ID is stored in theRegion.findAll()findAllById(Iterable<ID> ids) Returns a reference to theEntityInformationtype describing the entity.org.slf4j.LoggerReturns a reference to the SLF4JLoggerused to log the operations of thisGemfireRepository.Gets theRegionto which thisGemfireRepositoryperforms all data access operations.Returns a reference to theGemfireTemplateused by thisGemfireRepositoryto perform basic CRUD and simple OQL queries data access operationsSave the entity wrapped by the givenWrapper.<U extends T>
Usave(U entity)
-
Field Details
-
SELECT_COUNT_OQL_QUERY
- See Also:
-
-
Constructor Details
-
SimpleGemfireRepository
public SimpleGemfireRepository(@NonNull GemfireTemplate template, @NonNull EntityInformation<T, ID> entityInformation) Constructs a new instance ofSimpleGemfireRepositoryinitialized with theGemfireTemplateandEntityInformation.- Parameters:
template-GemfireTemplateused to perform basic data access operations and simple OQL queries; must not be null.entityInformation-EntityInformationthat describes the entity; must not be null.- Throws:
IllegalArgumentException- ifGemfireTemplateorEntityInformationis null.- See Also:
-
-
Method Details
-
getEntityInformation
Returns a reference to theEntityInformationtype describing the entity.- Returns:
- a reference to the
EntityInformationtype describing the entity. - See Also:
-
getLogger
Returns a reference to the SLF4JLoggerused to log the operations of thisGemfireRepository.- Returns:
- a reference to the SLF4J
Loggerused to log the operations of thisGemfireRepository. - See Also:
-
Logger
-
getRegion
Gets theRegionto which thisGemfireRepositoryperforms all data access operations.- Returns:
- a reference to the
Regionon which thisGemfireRepositoryoperates. - See Also:
-
getTemplate
Returns a reference to theGemfireTemplateused by thisGemfireRepositoryto perform basic CRUD and simple OQL queries data access operations- Returns:
- a reference to the
GemfireTemplateused by thisGemfireRepository. - See Also:
-
save
- Specified by:
savein interfaceCrudRepository<T,ID>
-
save
Description copied from interface:GemfireRepositorySave the entity wrapped by the givenWrapper. -
saveAll
- Specified by:
saveAllin interfaceCrudRepository<T,ID>
-
count
public long count()Counts the number of entities stored in theRegion. This method executes a SELECT count(*) FROM /Region OQL query.- Specified by:
countin interfaceCrudRepository<T,ID> - Returns:
- a count of the number of entities stored in the
Region.
-
existsById
Determines whether an entity with the given ID is stored in theRegion.- Specified by:
existsByIdin interfaceCrudRepository<T,ID> - Parameters:
id-Longvalue identifying the entity.- Returns:
- a boolean value indicating whether an entity with the given ID is stored in the
Region. - See Also:
-
findAll
- Specified by:
findAllin interfaceCrudRepository<T,ID>
-
findAll
- Specified by:
findAllin interfacePagingAndSortingRepository<T,ID>
-
findAll
- Specified by:
findAllin interfacePagingAndSortingRepository<T,ID>
-
findAllById
- Specified by:
findAllByIdin interfaceCrudRepository<T,ID>
-
findById
- Specified by:
findByIdin interfaceCrudRepository<T,ID>
-
delete
- Specified by:
deletein interfaceCrudRepository<T,ID>
-
deleteAll
public void deleteAll()- Specified by:
deleteAllin interfaceCrudRepository<T,ID>
-
deleteAll
- Specified by:
deleteAllin interfaceCrudRepository<T,ID>
-
deleteAllById
- Specified by:
deleteAllByIdin interfaceCrudRepository<T,ID>
-
deleteById
- Specified by:
deleteByIdin interfaceCrudRepository<T,ID>
-