public interface DataStore
Implementations of this interface must be prototype beans. They are used by DataManager
, do not access
data stores directly from your application code.
Modifier and Type | Method and Description |
---|---|
long |
getCount(LoadContext<?> context)
Returns the number of entity instances for the given query passed in the
LoadContext . |
long |
getCount(ValueLoadContext context)
Returns the number of key-value pairs for the given query passed in the
ValueLoadContext . |
java.lang.String |
getName()
This data store instance name with which it is registered in
Stores . |
java.lang.Object |
load(LoadContext<?> context)
Loads a single entity instance.
|
java.util.List<java.lang.Object> |
loadList(LoadContext<?> context)
Loads collection of entity instances.
|
java.util.List<KeyValueEntity> |
loadValues(ValueLoadContext context)
Loads list of key-value pairs.
|
java.util.Set<?> |
save(SaveContext context)
Saves a collection of entity instances.
|
void |
setName(java.lang.String name)
Sets this data store instance name with which it is registered in
Stores . |
java.lang.String getName()
Stores
.void setName(java.lang.String name)
Stores
.@Nullable java.lang.Object load(LoadContext<?> context)
java.util.List<java.lang.Object> loadList(LoadContext<?> context)
long getCount(LoadContext<?> context)
LoadContext
.java.util.Set<?> save(SaveContext context)
java.util.List<KeyValueEntity> loadValues(ValueLoadContext context)
context
- defines a query for scalar values and a list of keys for returned KeyValueEntitylong getCount(ValueLoadContext context)
ValueLoadContext
.context
- defines the query