public interface KeyValueOperations
extends org.springframework.beans.factory.DisposableBean
KeyValueTemplate
.Modifier and Type | Method and Description |
---|---|
long |
count(Class<?> type)
Total number of elements with given type available.
|
long |
count(KeyValueQuery<?> query,
Class<?> type)
Total number of elements matching given query.
|
void |
delete(Class<?> type)
Remove all elements of type.
|
<T> T |
delete(Serializable id,
Class<T> type)
Delete item of type with given id.
|
<T> T |
delete(T objectToDelete) |
<T> T |
execute(KeyValueCallback<T> action)
Execute operation against underlying store.
|
<T> Iterable<T> |
find(KeyValueQuery<?> query,
Class<T> type)
Get all elements matching the given query.
|
<T> Iterable<T> |
findAll(Class<T> type)
Get all elements of given type.
|
<T> Iterable<T> |
findAll(org.springframework.data.domain.Sort sort,
Class<T> type)
Get all elements ordered by sort.
|
<T> T |
findById(Serializable id,
Class<T> type)
Get element of given type with given id.
|
<T> Iterable<T> |
findInRange(int offset,
int rows,
Class<T> type)
Get all elements in given range.
|
<T> Iterable<T> |
findInRange(int offset,
int rows,
org.springframework.data.domain.Sort sort,
Class<T> type)
Get all elements in given range ordered by sort.
|
org.springframework.data.mapping.context.MappingContext<?,?> |
getMappingContext() |
void |
insert(Serializable id,
Object objectToInsert)
Add object with given id.
|
<T> T |
insert(T objectToInsert)
Add given object.
|
void |
update(Object objectToUpdate) |
void |
update(Serializable id,
Object objectToUpdate) |
<T> T insert(T objectToInsert)
objectToInsert
- void insert(Serializable id, Object objectToInsert)
id
- must not be null.objectToInsert
- must not be null.<T> Iterable<T> findAll(Class<T> type)
KeySpace
if present and therefore returns all elements that can be
assigned to requested type.type
- must not be null.<T> Iterable<T> findAll(org.springframework.data.domain.Sort sort, Class<T> type)
KeySpace
if present and therefore returns all elements that can
be assigned to requested type.sort
- must not be null.type
- must not be null.<T> T findById(Serializable id, Class<T> type)
KeySpace
if present and therefore returns all elements
that can be assigned to requested type.id
- must not be null.type
- must not be null.<T> T execute(KeyValueCallback<T> action)
action
- must not be null.<T> Iterable<T> find(KeyValueQuery<?> query, Class<T> type)
KeySpace
if present and therefore returns all elements that can be assigned to requested type..query
- must not be null.type
- must not be null.<T> Iterable<T> findInRange(int offset, int rows, Class<T> type)
KeySpace
if present and therefore returns all elements that can
be assigned to requested type.offset
- rows
- type
- must not be null.<T> Iterable<T> findInRange(int offset, int rows, org.springframework.data.domain.Sort sort, Class<T> type)
KeySpace
if present and therefore returns all
elements that can be assigned to requested type.offset
- rows
- sort
- type
- void update(Object objectToUpdate)
objectToUpdate
- must not be null.void update(Serializable id, Object objectToUpdate)
id
- must not be null.objectToUpdate
- must not be null.void delete(Class<?> type)
KeySpace
if present and therefore removes all elements that can be
assigned to requested type.type
- must not be null.<T> T delete(T objectToDelete)
objectToDelete
- must not be null.<T> T delete(Serializable id, Class<T> type)
id
- must not be null.type
- must not be null.long count(Class<?> type)
KeySpace
if present and therefore counts all
elements that can be assigned to requested type.type
- must not be null.long count(KeyValueQuery<?> query, Class<?> type)
KeySpace
if present and therefore counts all
elements that can be assigned to requested type.query
- type
- org.springframework.data.mapping.context.MappingContext<?,?> getMappingContext()
Copyright © 2011–2017 Pivotal Software, Inc.. All rights reserved.