Package sonia.scm.store
Interface QueryableStore<T>
- Type Parameters:
T
- The type of the objects to query.
- All Superinterfaces:
AutoCloseable
- All Known Subinterfaces:
QueryableMutableStore<T>
This interface is used to query 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 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
Query fields implementing this can compute aggregates like sum or average.static interface
Query fields implementing this can compute aggregates like minimum or maximum.static class
static class
This class is used to create conditions for queries.static class
This class is used to create conditions for queries.static class
This class is used to create conditions for queries, based on the size of a collection.static class
static class
QueryableStore.EnumQueryField<T,
E extends Enum<E>> This class is used to create conditions for queries.static class
static class
This class is used to create conditions for queries.static class
This class is used to create conditions for queries.static class
static class
static class
This class is used to create conditions for queries.static class
This class is used to create conditions for queries, based on the size of a map.static class
QueryableStore.NumberQueryField<T,
N extends Number> This class is used to create conditions for queries.static enum
Used to specify the order of the result of a query.static interface
The terminal interface for a query build byquery(Condition[])
.static interface
Instances of this class will be created by the annotation processor for each class annotated withQueryableType
.static interface
The result of a query that was built byQueryableStore.Query.withIds()
.static class
This class is used to create conditions for queries.static class
An exception occurring, if the client queried for one result withQueryableStore.Query.findOne()
, but the query returned multiple results. -
Method Summary
Methods inherited from interface java.lang.AutoCloseable
close
-
Method Details
-
query
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.- Parameters:
conditions
- The conditions to filter the objects.- Returns:
- The query object to retrieve the result.
-