Class AnnotatedColumns
java.lang.Object
org.hibernate.boot.model.internal.AnnotatedColumns
- Direct Known Subclasses:
AnnotatedJoinColumns
A list of columns that are mapped to a single Java property
or field. This is a slightly uncomfortable abstraction here,
because this concept is arguably missing from JPA (where
there's no equivalent of the Hibernate-defined
Columns annotation) and
so JPA lets each Column specify
its own table.
That leaves us having to enforce the requirement that every
column mapped to a given property must belong to the same
table.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddColumn(AnnotatedColumn child) voidgetJoin()A property path relative to thePropertyHolder.getTable()Find the table to which these columns belong, taking into account secondary tables.booleanvoidsetBuildingContext(MetadataBuildingContext buildingContext) voidvoidsetPropertyHolder(PropertyHolder propertyHolder) voidsetPropertyName(String propertyName) void
-
Constructor Details
-
AnnotatedColumns
public AnnotatedColumns()
-
-
Method Details
-
getColumns
-
getPropertyHolder
-
setPropertyHolder
-
getPropertyName
A property path relative to thePropertyHolder. -
setPropertyName
-
setBuildingContext
-
getBuildingContext
-
setJoins
-
getJoin
-
isSecondary
public boolean isSecondary() -
getTable
Find the table to which these columns belong, taking into account secondary tables.- Returns:
- the
Tablegiven in the code byColumn.table()and held here byexplicitTableName. - Throws:
AnnotationException- if the table named byexplicitTableNameis not found among the secondary tables injoins.
-
setTable
-
addColumn
-
checkPropertyConsistency
public void checkPropertyConsistency()
-