Package org.hibernate.mapping
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:
-
ClassDescriptionAn aggregate column is a column of type
SqlTypes.STRUCT
,SqlTypes.JSON
orSqlTypes.SQLXML
that aggregates a component into a single column.A mapping model object representing a polymorphic association to one of several tables.An array mapping has a primary key consisting of the key columns + index column.Identifies a mapping model object which may have attributes (fields or properties).A mapping model object representing a collection of typeCollection
which may contain duplicates.Resolved form ofBasicValue
as part of interpreting the boot-time model into the run-time modelRepresents a table or column levelcheck
constraint.A mapping model object representing a collection.A mapping model object that represents an embeddable class.A mapping model object representing a constraint on a relational database table.Parts of the mapping model which are associated with a contributor (ORM, Envers, etc).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).Any mapping with an outer-join attributeA mapping model object representing aFetchProfile
.An individual association fetch within the given profile.Defines mapping elements to which filters may be applied.A mapping model object representing a foreign key constraint.A bag with a generated (surrogate) key.A mapping model object representing a collection with a synthetic "identifier" column, that is, a surrogate key.Deprecated.this class is no longer usedA mapping model object representing an index on a relational database table.IndexedBiConsumer<T,U> Deprecated.UseIndexedBiConsumer
insteadIndexed collections include Lists, Maps, arrays and primitive arrays.Deprecated.UseIndexedConsumer
insteadA 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.A mapping model object that represents a subclass in a "joined" or "table per subclass" inheritance hierarchy.A mapping modelValue
which may be treated as an identifying key of a relational database table.A mapping model object representing a collection of typeList
.A mapping model object representing a many-to-one association.A mapping model object representing a collection of typeMap
.A mapping model object representing a mapped superclass of an entity class.Common interface for things that can handle meta attributes.A meta attribute is a named value or values.Enumeration of the known places from which a piece of metadata may come.A mapping model object representing a many-to-one association.A mapping model object representing a many-to-one association.A mapping model object that represents an entity class.A mapping model object representing a primary key constraint.A primitive array has a primary key consisting of the key columns + index column.A mapping model object representing a property or field of an entity or embeddable class.Deprecated.This is replaced byValueGeneration
andGenerationTiming
, and is no longer usedA mapping model object that represents the root class in an entity class inheritance hierarchy.Deprecated.this is no longer usedA mapping model object representing a collection of typeList
.A mapping model object that represents any value that maps to columns.A mapping model object that represents a subclass in a single table inheritance hierarchy.A mapping model object that represents a subclass in an entity class inheritance hierarchy.Models a property which does not actually exist in the model.A mapping model object representing a relational database table.Container for Table and Join referenceOptional contract implemented by some subtypes ofPersistentClass
.A mapping model object representing an association where the target side has cardinality one.Deprecated.no longer usedA mapping model object that represents a subclass in a "union" or "table per concrete class" inheritance hierarchy.A mapping model object representing a unique key constraint on a relational database table.A mapping model object representing a named relational database array type.A mapping model object representing a relational database UDT.A mapping model object which represents a user defined type.A mapping model object which represents something that's persisted "by value", instead of "by reference", that is, anything with no primary key.