Uses of Interface
st.orm.Metamodel

Packages that use Metamodel
Package
Description
Foundation of the data model: the mapping annotations and the record interfaces.
Java repository API.
Java client API: templates, query builders and transactions.
  • Uses of Metamodel in st.orm

    Subinterfaces of Metamodel in st.orm
    Modifier and Type
    Interface
    Description
    static interface 
    Metamodel.Key<T extends Data,E>
    Marker interface for metamodel fields that correspond to columns known to be unique.
    interface 
    TypedMetamodel<T extends Data,E,V extends @Nullable Object>
    A Metamodel that also carries the declared component type of the field it represents.
    Classes in st.orm that implement Metamodel
    Modifier and Type
    Class
    Description
    class 
    AbstractKeyMetamodel<T extends Data,E,V extends @Nullable Object>
    Extension of AbstractMetamodel that implements Metamodel.Key, indicating that the field has a uniqueness constraint.
    class 
    AbstractMetamodel<T extends Data,E,V extends @Nullable Object>
    Implementation that is used by the generated models.
    static final record 
    Delegating wrapper that adds the Metamodel.Key marker to an existing Metamodel instance.
    Methods in st.orm that return Metamodel
    Modifier and Type
    Method
    Description
    default Metamodel<T,E>
    Navigable.asMetamodel()
    Returns this navigable as a metamodel that can locate a column.
    default Metamodel<? extends Data,E>
    Navigable.canonical()
    Returns the canonical metamodel for the field represented by this.
    Metamodel.KeyDelegate.delegate()
    Returns the value of the delegate record component.
    Pageable.Order.field()
    Returns the value of the field record component.
    static <T extends Data, E>
    Metamodel<T,E>
    Metamodel.of(Class<T> rootTable, String path)
    Creates a new metamodel for the given root rootTable and path.
    static <T extends Data>
    Metamodel<T,T>
    Metamodel.root(Class<T> table)
    Creates a new metamodel for the given record type.
    @Nullable Metamodel<T,?>
    Scrollable.sort()
    Returns the value of the sort record component.
    Metamodel<T,? extends Data>
    AbstractMetamodel.table()
    Returns the table that holds the column to which this metamodel is pointing.
    Metamodel<T,? extends Data>
    Metamodel.KeyDelegate.table()
     
    Metamodel<T,? extends Data>
    Metamodel.table()
    Returns the table that holds the column to which this metamodel is pointing.
    Methods in st.orm that return types with arguments of type Metamodel
    Modifier and Type
    Method
    Description
    Metamodel.KeyDelegate.flatten()
     
    default List<Metamodel<T,?>>
    Navigable.flatten()
    Returns a flat list of leaf metamodels for this navigable.
    Methods in st.orm with parameters of type Metamodel
    Modifier and Type
    Method
    Description
    static <T extends Data, E, S>
    Scrollable<T>
    Scrollable.fromCursor(Metamodel.Key<T,E> key, @Nullable Metamodel<T,S> sort, String cursor)
    Deserializes a cursor string (produced by Scrollable.toCursor()) into a Scrollable for composite scrolling with a sort field.
    static <T extends Data, E>
    Metamodel.Key<T,E>
    Metamodel.key(Metamodel<T,E> metamodel)
    Returns a Key view of the given metamodel.
    static <T extends Data, E, S>
    Scrollable<T>
    Scrollable.of(Metamodel.Key<T,E> key, E keyCursor, Metamodel<T,S> sort, S sortCursor, int size)
    Creates a scrollable request starting after the given cursor values, in ascending key order, sorted by the given field.
    static <T extends Data, E, S>
    Scrollable<T>
    Scrollable.of(Metamodel.Key<T,E> key, Metamodel<T,S> sort, int size)
    Creates a scrollable request for the first page in ascending key order, sorted by the given field.
    Pageable.sortBy(Metamodel<?,?> field)
    Returns a new pageable with an ascending sort order appended for the given field.
    Pageable.sortByDescending(Metamodel<?,?> field)
    Returns a new pageable with a descending sort order appended for the given field.
    Constructors in st.orm with parameters of type Metamodel
    Modifier
    Constructor
    Description
     
    AbstractKeyMetamodel(Class<E> fieldType, String path, String field, boolean inline, @Nullable Metamodel<T,?> parent)
     
    protected
    AbstractKeyMetamodel(Class<E> fieldType, String path, String field, boolean inline, @Nullable Metamodel<T,?> parent, boolean isColumn)
     
     
    AbstractKeyMetamodel(Class<E> fieldType, String path, String field, boolean inline, @Nullable Metamodel<T,?> parent, boolean isColumn, boolean nullable)
    Constructs a key metamodel with explicit column and nullable flags.
     
    AbstractMetamodel(Class<E> fieldType, String path, String field, boolean inline, @Nullable Metamodel<T,?> parent)
     
    protected
    AbstractMetamodel(Class<E> fieldType, String path, String field, boolean inline, @Nullable Metamodel<T,?> parent, boolean isColumn)
     
     
    KeyDelegate(Metamodel<T,E> delegate)
    Creates an instance of a KeyDelegate record class.
     
    Order(Metamodel<?,?> field, boolean descending)
    Creates an instance of a Order record class.
     
    Scrollable(Metamodel.Key<T,?> key, @Nullable Object keyCursor, @Nullable Metamodel<T,?> sort, @Nullable Object sortCursor, int size, boolean isForward)
    Creates an instance of a Scrollable record class.
  • Uses of Metamodel in st.orm.repository

    Methods in st.orm.repository with parameters of type Metamodel
    Modifier and Type
    Method
    Description
    default <V extends Data>
    long
    EntityRepository.countBy(Metamodel<E,V> field, Ref<V> value)
    Counts entities matching the specified field and referenced value.
    default <V> long
    EntityRepository.countBy(Metamodel<E,V> field, V value)
    Counts entities matching the specified field and value.
    default <V extends Data>
    long
    ProjectionRepository.countBy(Metamodel<P,V> field, Ref<V> value)
    Counts projections matching the specified field and referenced value.
    default <V> long
    ProjectionRepository.countBy(Metamodel<P,V> field, V value)
    Counts projections matching the specified field and value.
    default <V extends Data>
    boolean
    EntityRepository.existsBy(Metamodel<E,V> field, Ref<V> value)
    Checks if any entity matching the specified field and referenced value exists.
    default <V> boolean
    EntityRepository.existsBy(Metamodel<E,V> field, V value)
    Checks if any entity matching the specified field and value exists.
    default <V extends Data>
    boolean
    ProjectionRepository.existsBy(Metamodel<P,V> field, Ref<V> value)
    Checks if any projection matching the specified field and referenced value exists.
    default <V> boolean
    ProjectionRepository.existsBy(Metamodel<P,V> field, V value)
    Checks if any projection matching the specified field and value exists.
    default <V> List<E>
    EntityRepository.findAllBy(Metamodel<E,V> field, Iterable<? extends V> values)
    Retrieves entities matching a single field against multiple values.
    default <V extends Data>
    List<E>
    EntityRepository.findAllBy(Metamodel<E,V> field, Ref<V> value)
    Retrieves entities matching a single field and a single referenced value.
    default <V> List<E>
    EntityRepository.findAllBy(Metamodel<E,V> field, V value)
    Retrieves entities matching a single field and a single value.
    default <V> List<P>
    ProjectionRepository.findAllBy(Metamodel<P,V> field, Iterable<? extends V> values)
    Retrieves projections matching a single field against multiple values.
    default <V extends Data>
    List<P>
    ProjectionRepository.findAllBy(Metamodel<P,V> field, Ref<V> value)
    Retrieves projections matching a single field and a single referenced value.
    default <V> List<P>
    ProjectionRepository.findAllBy(Metamodel<P,V> field, V value)
    Retrieves projections matching a single field and a single value.
    default <V extends Data>
    List<E>
    EntityRepository.findAllByRef(Metamodel<E,V> field, Iterable<? extends Ref<V>> values)
    Retrieves entities matching a single field against multiple referenced values.
    default <V extends Data>
    List<P>
    ProjectionRepository.findAllByRef(Metamodel<P,V> field, Iterable<? extends Ref<V>> values)
    Retrieves projections matching a single field against multiple referenced values.
    default <V> List<Ref<E>>
    EntityRepository.findAllRefBy(Metamodel<E,V> field, Iterable<? extends V> values)
    Retrieves refs to entities matching a single field against multiple values.
    default <V extends Data>
    List<Ref<E>>
    EntityRepository.findAllRefBy(Metamodel<E,V> field, Ref<V> value)
    Retrieves refs to entities matching a single field and a single referenced value.
    default <V> List<Ref<E>>
    EntityRepository.findAllRefBy(Metamodel<E,V> field, V value)
    Retrieves refs to entities matching a single field and a single value.
    default <V> List<Ref<P>>
    ProjectionRepository.findAllRefBy(Metamodel<P,V> field, Iterable<? extends V> values)
    Retrieves refs to projections matching a single field against multiple values.
    default <V extends Data>
    List<Ref<P>>
    ProjectionRepository.findAllRefBy(Metamodel<P,V> field, Ref<V> value)
    Retrieves refs to projections matching a single field and a single referenced value.
    default <V> List<Ref<P>>
    ProjectionRepository.findAllRefBy(Metamodel<P,V> field, V value)
    Retrieves refs to projections matching a single field and a single value.
    default <V extends Data>
    List<Ref<E>>
    EntityRepository.findAllRefByRef(Metamodel<E,V> field, Iterable<? extends Ref<V>> values)
    Retrieves refs to entities matching a single field against multiple referenced values.
    default <V extends Data>
    List<Ref<P>>
    ProjectionRepository.findAllRefByRef(Metamodel<P,V> field, Iterable<? extends Ref<V>> values)
    Retrieves refs to projections matching a single field against multiple referenced values.
    default <V extends Data>
    Optional<E>
    EntityRepository.findBy(Metamodel<E,V> field, Ref<V> value)
    Retrieves an entity based on a single field and its referenced value.
    default <V> Optional<E>
    EntityRepository.findBy(Metamodel<E,V> field, V value)
    Retrieves an entity based on a single field and its value.
    default <V extends Data>
    Optional<P>
    ProjectionRepository.findBy(Metamodel<P,V> field, Ref<V> value)
    Retrieves a projection based on a single field and its referenced value.
    default <V> Optional<P>
    ProjectionRepository.findBy(Metamodel<P,V> field, V value)
    Retrieves a projection based on a single field and its value.
    default <V extends Data>
    Optional<Ref<E>>
    EntityRepository.findRefBy(Metamodel<E,V> field, Ref<V> value)
    Retrieves a ref to an entity based on a single field and its referenced value.
    default <V> Optional<Ref<E>>
    EntityRepository.findRefBy(Metamodel<E,V> field, V value)
    Retrieves a ref to an entity based on a single field and its value.
    default <V extends Data>
    Optional<Ref<P>>
    ProjectionRepository.findRefBy(Metamodel<P,V> field, Ref<V> value)
    Retrieves a ref to a projection based on a single field and its referenced value.
    default <V> Optional<Ref<P>>
    ProjectionRepository.findRefBy(Metamodel<P,V> field, V value)
    Retrieves a ref to a projection based on a single field and its value.
    default <V extends Data>
    E
    EntityRepository.getBy(Metamodel<E,V> field, Ref<V> value)
    Retrieves exactly one entity based on a single field and its referenced value.
    default <V> E
    EntityRepository.getBy(Metamodel<E,V> field, V value)
    Retrieves exactly one entity based on a single field and its value.
    default <V extends Data>
    P
    ProjectionRepository.getBy(Metamodel<P,V> field, Ref<V> value)
    Retrieves exactly one projection based on a single field and its referenced value.
    default <V> P
    ProjectionRepository.getBy(Metamodel<P,V> field, V value)
    Retrieves exactly one projection based on a single field and its value.
    default <V extends Data>
    Ref<E>
    EntityRepository.getRefBy(Metamodel<E,V> field, Ref<V> value)
    Retrieves a ref to exactly one entity based on a single field and its referenced value.
    default <V> Ref<E>
    EntityRepository.getRefBy(Metamodel<E,V> field, V value)
    Retrieves a ref to exactly one entity based on a single field and its value.
    default <V extends Data>
    Ref<P>
    ProjectionRepository.getRefBy(Metamodel<P,V> field, Ref<V> value)
    Retrieves a ref to exactly one projection based on a single field and its referenced value.
    default <V> Ref<P>
    ProjectionRepository.getRefBy(Metamodel<P,V> field, V value)
    Retrieves a ref to exactly one projection based on a single field and its value.
    default <V> int
    EntityRepository.removeAllBy(Metamodel<E,V> field, Iterable<? extends V> values)
    Removes entities matching the specified field against multiple values.
    default <V extends Data>
    int
    EntityRepository.removeAllBy(Metamodel<E,V> field, Ref<V> value)
    Removes entities matching the specified field and referenced value.
    default <V> int
    EntityRepository.removeAllBy(Metamodel<E,V> field, V value)
    Removes entities matching the specified field and value.
    default <V extends Data>
    int
    EntityRepository.removeAllByRef(Metamodel<E,V> field, Iterable<? extends Ref<V>> values)
    Removes entities matching the specified field against multiple referenced values.
  • Uses of Metamodel in st.orm.template

    Methods in st.orm.template that return Metamodel
    Modifier and Type
    Method
    Description
    Column.metamodel()
    Gets the metamodel of the column.
    Methods in st.orm.template with parameters of type Metamodel
    Modifier and Type
    Method
    Description
    static Element
    Templates.column(Metamodel<?,?> path)
    Generates a column element for a column specified by the given metamodel in a type safe manner.
    static Element
    Templates.column(Metamodel<?,?> path, ResolveScope scope)
    Generates a column element for a column specified by the given metamodel in a type safe manner.
    abstract <V extends Data>
    SequencedMap<Ref<V>,List<R>>
    QueryBuilder.getResultGroupedByRef(Metamodel<T,V> path)
    Executes the query and returns the results grouped by a lightweight ref to the record reached via path, typically the parent entity of a foreign key.
    static <V> Element
    Templates.where(Metamodel<?,V> path, Operator operator, Iterable<? extends V> it)
    Generates a WHERE clause based on the provided path, operator, and iterable of values or records.
    static <V> Element
    Templates.where(Metamodel<?,V> path, Operator operator, V... o)
    Generates a WHERE clause based on the provided path, operator, and values or records.
    Method parameters in st.orm.template with type arguments of type Metamodel
    Modifier and Type
    Method
    Description
    static Element
    Templates.set(BindVars bindVars, Collection<Metamodel<?,?>> fields)
    Generates a SET clause using the specified BindVars.
    static Element
    Templates.set(Data record, Collection<Metamodel<?,?>> fields)
    Generates a SET clause for the specified record.