Interface QueryableMutableStore<T>

Type Parameters:
T - The type of the objects to query.
All Superinterfaces:
AutoCloseable, DataStore<T>, MultiEntryStore<T>, QueryableStore<T>

public interface QueryableMutableStore<T> extends DataStore<T>, QueryableStore<T>, AutoCloseable
This interface is used to store objects annotated with 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
  • Method Details

    • transactional

      void transactional(BooleanSupplier callback)
    • query

      QueryableMutableStore.MutableQuery<T,?> query(Condition<T>... conditions)
      Description copied from interface: QueryableStore
      Creates a query for the objects of the type T with the given conditions. Conditions should be created by either using the static methods of the Conditions class or by using the query fields of the type T that will be created by the annotation processor in a separate class. If your annotated type is named MyType, the query fields class will be named MyTypeQueryFields.
      If no conditions are given, all objects of the type T 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 interface QueryableStore<T>
      Parameters:
      conditions - The conditions to filter the objects.
      Returns:
      The query object to retrieve the result.
    • close

      void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface QueryableStore<T>