Package org.hibernate.mapping
This package defines the Hibernate configuration-time mapping model.
The objects defined in this package are produced by the annotation
binding process, and consumed by the code with builds persisters and
loaders. They do not outlive the configuration process.
The mapping model objects represent:
- Java elements with a persistent representation, for example,
a
PersistentClass
,Collection
, orProperty
, and - objects in a relational database, for example,
a
Table
,Column
, orForeignKey
.
The lifecycle of these mapping objects is outlined below.
- It is the responsibility of the metadata binders in the package
org.hibernate.boot.model.internal
to process a set of annotated classes and produce fully-initialized mapping model objects. This is in itself a complicated multi-phase process, since, for example, the type of an association mapping in one entity cannot be fully assigned until the target entity has been processed. - The mapping model objects are then passed to the constructor
of
SessionFactoryImpl
, which simply passes them along on to an object which implementsMappingMetamodel
and uses them to create persister objects for entities and collections. - The model objects are used directly in the constructors of
EntityMetamodel
,AbstractEntityPersister
,AbstractCollectionPersister
, and friends, to build up the internal data structures used by these objects at runtime. Once the persisters are fully-constructed, the mapping model objects are no longer useful. - The mapping model objects are also passed to the schema export tooling which uses them directly to produce DDL.
- See Also:
org.hibernate.boot
-
Interface Summary Interface Description AttributeContainer Identifies a mapping model object which may have attributes (fields or properties).BasicValue.Resolution<J> Resolved form ofBasicValue
as part of interpreting the boot-time model into the run-time modelContributable Parts of the mapping model which are associated with a contributor (ORM, Envers, etc).Fetchable Any mapping with an outer-join attributeFilterable Defines mapping elements to which filters may be applied.GeneratorCreator IdentifiableTypeClass IdentifierGeneratorCreator IndexedBiConsumer<T,U> Deprecated. UseIndexedBiConsumer
insteadIndexedConsumer<T> Deprecated. UseIndexedConsumer
insteadKeyValue A mapping modelValue
which may be treated as an identifying key of a relational database table.MetaAttributable Common interface for things that can handle meta attributes.PersistentClassVisitor Resolvable Selectable SemanticsResolver Deprecated. this is no longer usedSoftDeletable SortableValue TableContainer Container for Table and Join referenceTableOwner Optional contract implemented by some subtypes ofPersistentClass
.UserDefinedType A mapping model object which represents a user defined type.Value A mapping model object which represents something that's persisted "by value", instead of "by reference", that is, anything with no primary key.ValueVisitor -
Class Summary Class Description AbstractUserDefinedType AggregateColumn An aggregate column is a column of typeSqlTypes.STRUCT
,SqlTypes.JSON
orSqlTypes.SQLXML
that aggregates a component into a single column.Any A mapping model object representing a polymorphic association to one of several tables.Any.KeyValue Any.MetaValue Array An array mapping has a primary key consisting of the key columns + index column.Backref Bag A mapping model object representing a collection of typeCollection
which may contain duplicates.BasicValue CheckConstraint Represents a table or column levelcheck
constraint.Collection A mapping model object representing a collection.Column Component A mapping model object that represents an embeddable class.Component.StandardGenerationContextLocator Component.ValueGenerationPlan Constraint A mapping model object representing a constraint on a relational database table.DenormalizedTable DependantBasicValue DependantValue A mapping model object representing a value which is "typed" by reference to some other value (for example, a foreign key is typed by the referenced primary key).FetchProfile A mapping model object representing aFetchProfile
.FetchProfile.Fetch An individual association fetch within the given profile.ForeignKey A mapping model object representing a foreign key constraint.Formula IdentifierBag A bag with a generated (surrogate) key.IdentifierCollection A mapping model object representing a collection with a synthetic "identifier" column, that is, a surrogate key.IdGenerator Deprecated. this class is no longer usedIndex A mapping model object representing an index on a relational database table.IndexBackref IndexedCollection Indexed collections include Lists, Maps, arrays and primitive arrays.Join A mapping model object representing some sort of auxiliary table, for example, an association table, a secondary table, or a table belonging to a joined subclass.JoinedSubclass A mapping model object that represents a subclass in a "joined" or "table per subclass" inheritance hierarchy.List A mapping model object representing a collection of typeList
.ManyToOne A mapping model object representing a many-to-one association.Map A mapping model object representing a collection of typeMap
.MappedSuperclass A mapping model object representing a mapped superclass of an entity class.MappingHelper MetaAttribute A meta attribute is a named value or values.OneToMany A mapping model object representing a many-to-one association.OneToOne A mapping model object representing a many-to-one association.PersistentClass A mapping model object that represents an entity class.PrimaryKey A mapping model object representing a primary key constraint.PrimitiveArray A primitive array has a primary key consisting of the key columns + index column.Property A mapping model object representing a property or field of an entity or embeddable class.PropertyGeneration Deprecated. This is replaced byValueGeneration
andGenerationTiming
, and is no longer usedRootClass A mapping model object that represents the root class in an entity class inheritance hierarchy.Set A mapping model object representing a collection of typeList
.SimpleValue A mapping model object that represents any value that maps to columns.SingleTableSubclass A mapping model object that represents a subclass in a single table inheritance hierarchy.Subclass A mapping model object that represents a subclass in an entity class inheritance hierarchy.SyntheticProperty Models a property which does not actually exist in the model.Table A mapping model object representing a relational database table.Table.ForeignKeyKey ToOne A mapping model object representing an association where the target side has cardinality one.TypeDef Deprecated. no longer usedUnionSubclass A mapping model object that represents a subclass in a "union" or "table per concrete class" inheritance hierarchy.UniqueKey A mapping model object representing a unique key constraint on a relational database table.UserDefinedArrayType A mapping model object representing a named relational database array type.UserDefinedObjectType A mapping model object representing a relational database UDT. -
Enum Summary Enum Description MetadataSource Enumeration of the known places from which a piece of metadata may come.