Class SimpleGemfireRepository<T,ID>
java.lang.Object
org.springframework.data.gemfire.repository.support.SimpleGemfireRepository<T,ID>
- All Implemented Interfaces:
GemfireRepository<T,
,ID> org.springframework.data.repository.CrudRepository<T,
,ID> org.springframework.data.repository.PagingAndSortingRepository<T,
,ID> org.springframework.data.repository.Repository<T,
ID>
Simple, basic
PagingAndSortingRepository
/ CrudRepository
implementation for Apache Geode.- See Also:
-
Cache
CacheTransactionManager
Region
GemfireTemplate
GemfireRepository
CrudRepository
PagingAndSortingRepository
EntityInformation
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSimpleGemfireRepository
(GemfireTemplate template, org.springframework.data.repository.core.EntityInformation<T, ID> entityInformation) Constructs a new instance ofSimpleGemfireRepository
initialized with theGemfireTemplate
andEntityInformation
. -
Method Summary
Modifier and TypeMethodDescriptionlong
count()
Counts the number of entities stored in theRegion
.void
void
void
void
deleteAllById
(Iterable<? extends ID> ids) void
deleteById
(ID id) boolean
existsById
(ID id) Determines whether an entity with the given ID is stored in theRegion
.findAll()
org.springframework.data.domain.Page<T>
findAll
(org.springframework.data.domain.Pageable pageable) findAll
(org.springframework.data.domain.Sort sort) findAllById
(Iterable<ID> ids) Returns a reference to theEntityInformation
type describing the entity.org.slf4j.Logger
Returns a reference to the SLF4JLogger
used to log the operations of thisGemfireRepository
.Gets theRegion
to which thisGemfireRepository
performs all data access operations.Returns a reference to theGemfireTemplate
used by thisGemfireRepository
to 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 org.springframework.data.repository.core.EntityInformation<T, ID> entityInformation) Constructs a new instance ofSimpleGemfireRepository
initialized with theGemfireTemplate
andEntityInformation
.- Parameters:
template
-GemfireTemplate
used to perform basic data access operations and simple OQL queries; must not be null.entityInformation
-EntityInformation
that describes the entity; must not be null.- Throws:
IllegalArgumentException
- ifGemfireTemplate
orEntityInformation
is null.- See Also:
-
GemfireTemplate
EntityInformation
-
-
Method Details
-
getEntityInformation
@NonNull public org.springframework.data.repository.core.EntityInformation<T,ID> getEntityInformation()Returns a reference to theEntityInformation
type describing the entity.- Returns:
- a reference to the
EntityInformation
type describing the entity. - See Also:
-
EntityInformation
-
getLogger
@NonNull public org.slf4j.Logger getLogger()Returns a reference to the SLF4JLogger
used to log the operations of thisGemfireRepository
.- Returns:
- a reference to the SLF4J
Logger
used to log the operations of thisGemfireRepository
. - See Also:
-
Logger
-
getRegion
Gets theRegion
to which thisGemfireRepository
performs all data access operations.- Returns:
- a reference to the
Region
on which thisGemfireRepository
operates. - See Also:
-
Region
getTemplate()
-
getTemplate
Returns a reference to theGemfireTemplate
used by thisGemfireRepository
to perform basic CRUD and simple OQL queries data access operations- Returns:
- a reference to the
GemfireTemplate
used by thisGemfireRepository
. - See Also:
-
save
-
save
Description copied from interface:GemfireRepository
Save the entity wrapped by the givenWrapper
. -
saveAll
-
count
public long count()Counts the number of entities stored in theRegion
. This method executes a SELECT count(*) FROM /Region OQL query. -
existsById
Determines whether an entity with the given ID is stored in theRegion
. -
findAll
-
findAll
public org.springframework.data.domain.Page<T> findAll(@NonNull org.springframework.data.domain.Pageable pageable) -
findAll
-
findAllById
-
findById
-
delete
-
deleteAll
public void deleteAll() -
deleteAll
-
deleteAllById
-
deleteById
-