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
-
Constructor Summary
ConstructorDescriptionSimpleGemfireRepository
(GemfireTemplate template, 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()
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 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:
-
-
Method Details
-
getEntityInformation
Returns a reference to theEntityInformation
type describing the entity.- Returns:
- a reference to the
EntityInformation
type describing the entity. - See Also:
-
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:
-
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
- Specified by:
save
in interfaceCrudRepository<T,
ID>
-
save
Description copied from interface:GemfireRepository
Save the entity wrapped by the givenWrapper
. -
saveAll
- Specified by:
saveAll
in 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:
count
in 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:
existsById
in interfaceCrudRepository<T,
ID> - Parameters:
id
-Long
value 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:
findAll
in interfaceCrudRepository<T,
ID>
-
findAll
- Specified by:
findAll
in interfacePagingAndSortingRepository<T,
ID>
-
findAll
- Specified by:
findAll
in interfacePagingAndSortingRepository<T,
ID>
-
findAllById
- Specified by:
findAllById
in interfaceCrudRepository<T,
ID>
-
findById
- Specified by:
findById
in interfaceCrudRepository<T,
ID>
-
delete
- Specified by:
delete
in interfaceCrudRepository<T,
ID>
-
deleteAll
public void deleteAll()- Specified by:
deleteAll
in interfaceCrudRepository<T,
ID>
-
deleteAll
- Specified by:
deleteAll
in interfaceCrudRepository<T,
ID>
-
deleteAllById
- Specified by:
deleteAllById
in interfaceCrudRepository<T,
ID>
-
deleteById
- Specified by:
deleteById
in interfaceCrudRepository<T,
ID>
-