- Type Parameters:
T- the root table type.E- the field type.- Record Components:
column- the path to the column, or columns, of the enclosing query.
Metamodel.outer(Navigable). It describes
the column it wraps, and never equals it: the wrapped path names the subquery's own tables.
The column belongs to a row of the enclosing query, so a record of the subquery holds no value for it.
- Since:
- 1.16
-
Nested Class Summary
Nested classes/interfaces inherited from interface st.orm.Metamodel
Metamodel.Key<T extends Data,E>, Metamodel.KeyDelegate<T extends Data, E>, Metamodel.Outer<T extends Data, E> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncolumn()Returns the value of thecolumnrecord component.final booleanIndicates whether some other object is "equal to" this one.field()Returns the field name.Returns the field type of the designated element.flatten()Returns a flat list of leaf metamodels for this navigable.@Nullable ObjectExtracts the value from the given record as specified by this metamodel.final inthashCode()Returns a hash code value for this object.booleanisColumn()Returnstrueif this navigable corresponds to a database column,falseotherwise (for example the root navigable or an inline record).booleanisIdentical(T a, T b) Checks whether the value extracted fromais identical to the value extracted fromb.booleanisInline()Returnstrueif this navigable corresponds to an inline record,falseotherwise.booleanChecks whether the value extracted fromais the same as the value extracted fromb.path()Returns the path to the database table.root()Returns the root table type.table()Returns the table that holds the column to which this metamodel is pointing.toString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface st.orm.Navigable
asMetamodel, canonical, fieldPath, tableType
-
Constructor Details
-
Outer
Creates an instance of aOuterrecord class.- Parameters:
column- the value for thecolumnrecord component
-
-
Method Details
-
isColumn
public boolean isColumn()Description copied from interface:NavigableReturnstrueif this navigable corresponds to a database column,falseotherwise (for example the root navigable or an inline record). A foreign key column is also a column. -
isInline
public boolean isInline()Description copied from interface:NavigableReturnstrueif this navigable corresponds to an inline record,falseotherwise. -
root
Description copied from interface:NavigableReturns the root table type. This is typically the table specified in the FROM clause of a query. -
table
Description copied from interface:MetamodelReturns the table that holds the column to which this metamodel is pointing. If the metamodel points to an inline record, the table is the parent table of the inline record. If the metamodel is a root metamodel, the root table is returned. -
path
Description copied from interface:NavigableReturns the path to the database table. -
fieldType
Description copied from interface:NavigableReturns the field type of the designated element. -
field
Description copied from interface:NavigableReturns the field name. -
flatten
Description copied from interface:NavigableReturns a flat list of leaf metamodels for this navigable. An inline record is recursively expanded into its individual column metamodels; any other navigable returns a singleton list, because it names its own column(s): an entity node names the foreign key column(s) that reference it, and a scalar names its column. The returned metamodels keep their position in the graph, so they are not canonical.The query builder's
groupByandorderBymetamodel overloads do not use this expansion: they resolve a path to the same columns a predicate on that path would use, so a multi-column path (a compound foreign key, an inline record) expands during column resolution rather than here. -
getValue
Description copied from interface:MetamodelExtracts the value from the given record as specified by this metamodel.The returned value may be
nullif this metamodel represents a nullable field or if any parent metamodel in the access path resolves tonull(for example, when navigating through an optional or nullable nested record).Implementations may return a non-null value, but callers must not rely on that unless they statically know they are using a non-null metamodel variant.
-
isIdentical
Description copied from interface:MetamodelChecks whether the value extracted fromais identical to the value extracted fromb.Semantics: This method performs an identity comparison on the extracted field value. It returns
trueif and only if both extracted values refer to the same object instance.This operation is only meaningful for reference-typed fields. It is not defined for primitive-typed fields.
Performance guarantees:
- No boxing or unboxing is performed.
- No value coercion or conversion is performed.
- No
equals(...)or comparator logic is used.
- Specified by:
isIdenticalin interfaceMetamodel<T extends Data,E> - Parameters:
a- the instance from which the left-hand value is extracted, must not benull.b- the instance from which the right-hand value is extracted, must not benull.- Returns:
trueif both extracted values are the same object instance.
-
isSame
Description copied from interface:MetamodelChecks whether the value extracted fromais the same as the value extracted fromb.Semantics: This method performs a value comparison on the extracted field value. The comparison is defined by the field type:
- For primitive-typed fields, values are compared using
==. - For reference-typed fields, values are compared using their defined value semantics
(for example
equals(...)or an equivalent comparator).
Performance guarantees:
- No boxing or unboxing is performed.
- No identity comparison is performed.
- The comparison operates directly on the extracted values.
- For primitive-typed fields, values are compared using
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
column
Returns the value of thecolumnrecord component.- Returns:
- the value of the
columnrecord component
-