Package sonia.scm.store
Interface QueryableMutableStore<T>
- Type Parameters:
T
- The type of the objects to query.
- All Superinterfaces:
AutoCloseable
,DataStore<T>
,MultiEntryStore<T>
,QueryableStore<T>
This interface is used to store objects annotated with
It is not meant to be instantiated by users of the API. Instead, use the query factory created by the annotation processor for the annotated type.
QueryableType
.
It combines the functionality of a DataStore
and a QueryableStore
.
In contrast to the QueryableStore
, instances are always scoped to a specific parent (if the type this store
is created for as parent types specified in its annotation).
It will be created by the QueryableStoreFactory
.
It is not meant to be instantiated by users of the API. Instead, use the query factory created by the annotation processor for the annotated type.
- Since:
- 3.8.0
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
Nested classes/interfaces inherited from interface sonia.scm.store.QueryableStore
QueryableStore.AggregatableNumberQueryField<T,
A>, QueryableStore.AggregatableQueryField<T, A>, QueryableStore.BaseQueryField<T, F>, QueryableStore.BooleanQueryField<T>, QueryableStore.CollectionQueryField<T>, QueryableStore.CollectionSizeQueryField<T>, QueryableStore.DoubleQueryField<T>, QueryableStore.EnumQueryField<T, E extends Enum<E>>, QueryableStore.FloatQueryField<T>, QueryableStore.IdQueryField<T>, QueryableStore.InstantQueryField<T>, QueryableStore.IntegerQueryField<T>, QueryableStore.LongQueryField<T>, QueryableStore.MapQueryField<T>, QueryableStore.MapSizeQueryField<T>, QueryableStore.NumberQueryField<T, N extends Number>, QueryableStore.Order, QueryableStore.OrderOptions, QueryableStore.Query<T, T_RESULT, SELF extends QueryableStore.Query<T, T_RESULT, SELF>>, QueryableStore.QueryField<T, F>, QueryableStore.Result<T>, QueryableStore.StringQueryField<T>, QueryableStore.TooManyResultsException -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Creates a query for the objects of the typeT
with the given conditions.void
transactional
(BooleanSupplier callback) Methods inherited from interface sonia.scm.store.MultiEntryStore
clear, get, getOptional, remove
-
Method Details
-
transactional
-
query
Description copied from interface:QueryableStore
Creates a query for the objects of the typeT
with the given conditions. Conditions should be created by either using the static methods of theConditions
class or by using the query fields of the typeT
that will be created by the annotation processor in a separate class. If your annotated type is namedMyType
, the query fields class will be namedMyTypeQueryFields
.
If no conditions are given, all objects of the typeT
will be returned (limited by the ids of the parent objects that had been specified when this instance of the store had been created by the factory). If more than one condition is given, the conditions will be combined with a logical AND.- Specified by:
query
in interfaceQueryableStore<T>
- Parameters:
conditions
- The conditions to filter the objects.- Returns:
- The query object to retrieve the result.
-
close
void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceQueryableStore<T>
-