Class AnnotatedColumns

java.lang.Object
org.hibernate.boot.model.internal.AnnotatedColumns
Direct Known Subclasses:
AnnotatedJoinColumns

public class AnnotatedColumns extends Object
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 Details

    • AnnotatedColumns

      public AnnotatedColumns()
  • Method Details

    • getColumns

      public List<AnnotatedColumn> getColumns()
    • getPropertyHolder

      public PropertyHolder getPropertyHolder()
    • setPropertyHolder

      public void setPropertyHolder(PropertyHolder propertyHolder)
    • getPropertyName

      public String getPropertyName()
      A property path relative to the PropertyHolder.
    • setPropertyName

      public void setPropertyName(String propertyName)
    • setBuildingContext

      public void setBuildingContext(MetadataBuildingContext buildingContext)
    • getBuildingContext

      public MetadataBuildingContext getBuildingContext()
    • setJoins

      public void setJoins(Map<String,Join> joins)
    • getJoin

      public Join getJoin()
    • isSecondary

      public boolean isSecondary()
    • getTable

      public Table getTable()
      Find the table to which these columns belong, taking into account secondary tables.
      Returns:
      the Table given in the code by Column.table() and held here by explicitTableName.
      Throws:
      AnnotationException - if the table named by explicitTableName is not found among the secondary tables in joins.
    • setTable

      public void setTable(Table table)
    • addColumn

      public void addColumn(AnnotatedColumn child)
    • checkPropertyConsistency

      public void checkPropertyConsistency()