java.lang.Object
st.orm.AbstractMetamodel<T,E,V>
- Type Parameters:
T- the primary table type.E- the field type of the designated element.V- the value type of the designated element.
- All Implemented Interfaces:
Metamodel<T,E>
- Direct Known Subclasses:
AbstractKeyMetamodel
public abstract class AbstractMetamodel<T extends Data,E,V>
extends Object
implements Metamodel<T,E>
Implementation that is used by the generated models.
- Since:
- 1.2
-
Nested Class Summary
Nested classes/interfaces inherited from interface st.orm.Metamodel
Metamodel.Key<T extends Data,E>, Metamodel.KeyDelegate<T extends Data, E> -
Constructor Summary
ConstructorsModifierConstructorDescriptionAbstractMetamodel(Class<E> fieldType) AbstractMetamodel(Class<E> fieldType, String path) AbstractMetamodel(Class<E> fieldType, String path, String field, boolean inline, Metamodel<T, ?> parent) protectedAbstractMetamodel(Class<E> fieldType, String path, String field, boolean inline, Metamodel<T, ?> parent, boolean isColumn) -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanfield()Returns the field name.Returns the field type of the designated element.final inthashCode()booleanisColumn()Returnstrueif the metamodel corresponds to a database column, returnsfalseotherwise, for example, if the metamodel refers to the root metamodel or an inline record.booleanisInline()Returnstrueif the metamodel corresponds to an inline record, returnsfalseotherwise.path()Returns the path to the database table.root()Returns the root metamodel.table()Returns the table that holds the column to which this metamodel is pointing.toString()
-
Constructor Details
-
AbstractMetamodel
-
AbstractMetamodel
-
AbstractMetamodel
-
AbstractMetamodel
-
-
Method Details
-
equals
-
hashCode
public final int hashCode() -
isColumn
public boolean isColumn()Returnstrueif the metamodel corresponds to a database column, returnsfalseotherwise, for example, if the metamodel refers to the root metamodel or an inline record.Note that a column can also be a table, for example, in the case of a foreign key.
-
root
Returns the root metamodel. This is typically the table specified in the FROM clause of a query. -
table
Returns 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. -
isInline
public boolean isInline()Returnstrueif the metamodel corresponds to an inline record, returnsfalseotherwise. -
fieldType
Returns the field type of the designated element. -
path
Returns the path to the database table. -
field
Returns the field name. -
toString
-