Uses of Package
org.hibernate.annotations
Packages that use org.hibernate.annotations
Package
Description
A set of mapping annotations which extend the O/R mapping annotations defined by JPA.
This package contains the interfaces that make up the bootstrap API
for Hibernate.
Overall, this module is responsible for taking a
managed-resources and
table them into Hibernate's boot-time model.
A range of SPIs allowing integration with—and customization of—the process of building metadata.
This package contains classes which are "shared" by other subsystems,
and implementations of some key algorithms.
Models the fetch profiles defined by the application.
This package defines some central internal SPI abstractions
used throughout the implementation of Hibernate.
Contains the
UuidGenerator
.This package defines the Hibernate configuration-time mapping model.
Most contracts here have been replaced by the new runtime
mapping model.
-
Classes in org.hibernate.annotations used by org.hibernate.annotationsClassDescriptionAssociates a user-defined annotation with an
AttributeBinder
, allowing the annotation to drive some custom model binding.Identifies policies for managing concurrent access to the shared second-level cache.Describes the data layout used for storing an object into the query cache.Deprecated.Enumerates the persistence operations which may be cascaded from one entity instance to associated entity instances.Marks an annotation type as a dialect-specific override for some other annotation type.Enumerates methods for fetching an association from the database.Enumeration extending the JPA flush modes with flush modes specific to Hibernate, and a "null" mode,FlushModeType.PERSISTENCE_CONTEXT
, for use as a default annotation value.Deprecated.useEventType
andEventTypeSets
insteadMeta-annotation used to mark another annotation as providing configuration for a custom identifier generator.Deprecated.Use the JPA-definedFetchType.EAGER
instead ofLazyCollection(FALSE)
.Specifies how Hibernate should handle the case of an orphaned foreign key with no associated row in the referenced table.Enumerates the possible actions for theon delete
clause of a foreign key constraint.Enumerates the possible optimistic lock checking strategies.Deprecated.sincePolymorphism
is deprecatedDeprecated.Use anExpectation
class instead.Enumeration of defines styles of soft-deleteSpecifies the source of a generated value, either the virtual machine, or the database.Describes the storage of timezone information for zoned datetime types, in particular, for the typesOffsetDateTime
andZonedDateTime
.Associates a user-defined annotation with aTypeBinder
, allowing the annotation to drive some custom model binding.Represents a kind of UUID, that is, what RFC 4122 calls a "version".Meta-annotation used to mark another annotation as providing configuration for a custom value generation strategy. -
Classes in org.hibernate.annotations used by org.hibernate.bootClassDescriptionDescribes the data layout used for storing an object into the query cache.
-
Classes in org.hibernate.annotations used by org.hibernate.boot.jaxb.mapping.spiClassDescriptionSpecifies how Hibernate should handle the case of an orphaned foreign key with no associated row in the referenced table.Enumerates the possible actions for the
on delete
clause of a foreign key constraint.Deprecated.sincePolymorphism
is deprecatedRepresents a kind of UUID, that is, what RFC 4122 calls a "version". -
Classes in org.hibernate.annotations used by org.hibernate.boot.modelsClassDescriptionMaps a to-one cardinality association taking values over several entity types which are not related by the usual entity inheritance, using a discriminator value stored on the referring side of the relationship.A simplified way to specify the type of the discriminator in an
Any
mapping, using the JPA-definedDiscriminatorType
.Specifies the mapping of a single any-valued discriminator value to its corresponding entity type.List ofAnyDiscriminatorValue
s.Specifies the Java class to use for the foreign key handling related to anAny
mapping.Form ofJavaType
used to describe the foreign-key part of an ANY mapping.Form ofJdbcTypeCode
used to describe the foreign key part of anAny
mapping.Specifies an attribute access strategy to use.Associates a user-defined annotation with anAttributeBinder
, allowing the annotation to drive some custom model binding.Specifies a maximum batch size for batch fetching of the annotated entity or collection.Marks a root entity or collection for second-level caching, and specifies: a named cache region in which to store the state of instances of the entity or collection, and an appropriate cache concurrency policy, given the expected data access patterns affecting the entity or collection.Specifies the persistence operations that should cascade to associated entity instances.Specifies acheck
constraint to be included in the generated DDL.A list ofCheck
s.Describe an identifier column for a bag.Form ofJavaType
for describing the id of an id-bag mapping.Form ofJdbcType
for describing the id of an id-bag mapping.Form ofJdbcTypeCode
for describing the id of an id-bag mapping.Form ofMutability
for describing the id of an id-bag mappingForm ofType
for describing the id of an id-bag mapping.Names a custom collection type for a persistent collection.Allows to register aUserCollectionType
to use as the default for the specified classification of collection.Repeatable container forCollectionTypeRegistration
Specifies that a column has adefault
value specified in DDL.Specifies custom SQL expressions used to read and write to the column mapped by the annotated persistent attribute in all generated SQL involving the annotated persistent attribute.Plural annotation for @ColumnTransformer.Deprecated.Prefer Table.comment()Specifies a customCompositeUserType
for the annotated attribute mapping.Registers a custom composite user type implementation to be used by default for all references to a particular embeddable class.Grouping ofCompositeTypeRegistration
Registers anAttributeConverter
.Specifies that the annotated field of property is a generated creation timestamp.Specifies that the annotated field of property is a generated timestamp, and also specifies the timing of the timestamp generation, and whether it is generated in Java or by the database:source = VM
indicates that the virtual machine current instant is used, andsource = DB
indicates that the databasecurrent_timestamp
function should be used.Specializes aCheck
in a certain dialect.Specializes aColumnDefault
in a certain dialect.Specializes aDiscriminatorFormula
in a certain dialect.SpecializesFilterDefs
in a certain dialect.SpecializesFilters
in a certain dialect.Specializes aFormula
in a certain dialect.Specializes aGeneratedColumn
in a certain dialect.Specializes aJoinFormula
in a certain dialect.Deprecated, for removal: This API element is subject to removal in a future version.Specializes aSQLDelete
in a certain dialect.Specializes aSQLDeleteAll
in a certain dialect.Specializes aSQLInsert
in a certain dialect.Specializes aSQLUpdate
in a certain dialect.Identifies a database version.Deprecated.Specifies an expression written in native SQL as the discriminator for an entity inheritance hierarchy.Optional annotation used in conjunction with the JPA-definedDiscriminatorColumn
annotation to express Hibernate-specific discriminator properties.Specifies that SQLinsert
statements for the annotated entity are generated dynamically, and only include the columns to which a non-null value must be assigned.Specifies that SQLupdate
statements for the annotated entity are generated dynamically, and only include columns which are actually being updated.Specifies a custom instantiator for a specific embeddedRegisters a custom instantiator implementation to be used for all references to a particularEmbeddable
.Grouping ofEmbeddableInstantiatorRegistration
Specifies the default fetching method for the annotated association.Defines a fetch profile, by specifying itsFetchProfile.name()
, together with a list of fetch strategy overrides.Collects together multiple fetch profiles.Specifies that an entity or collection is affected by a named filter declared usingFilterDef
, and allows the default filter condition to be overridden for the annotated entity or collection role.Declares a filter, specifying its FilterDef.name(), optionally, a default condition, and its parameter names and types, if it has parameters.Array of filter definitions.Specifies that the join table of a collection is affected by a named filter declared usingFilterDef
, and allows the default filter condition to be overridden for the annotated entity or collection role.Add multiple@FilterJoinTable
to a collection.Add multiple@Filters
.Deprecated, for removal: This API element is subject to removal in a future version.use the JPA 2.1ForeignKey
annotationSpecifies an expression written in native SQL that is used to read the value of an attribute instead of storing the value in aColumn
.Specifies that the value of the annotated property is generated by the database.Specifies that a column is defined using a DDLgenerated always as
clause or equivalent, and that Hibernate should fetch the generated value from the database after each SQLINSERT
orUPDATE
.Deprecated.ValueGenerationType
andAnnotationValueGeneration
now provide a much more powerful and typesafe alternativeDeprecated.Use the new approach based onIdGeneratorType
.Deprecated.sinceGenericGenerator
is deprecated.Meta-annotation used to mark another annotation as providing configuration for a custom identifier generator.Marks an entity, collection, or attribute of an entity as immutable.Marks an arbitrary class as available for use in HQL queries by its unqualified name.Deprecated.UseIndex
instead.Deprecated.Marks the canonical constructor to be used for instantiation of an embeddable.Specify an explicitBasicJavaType
to use for a particular column mapping.Registers aBasicJavaType
as the default Java type descriptor for the givenJavaTypeRegistration.javaType()
.Grouping ofJavaTypeRegistration
See notes onJavaTypeRegistration
about using on packages versus use on classesSpecifies an explicitJdbcType
to use for a particular column mapping. When applied to a Map-valued attribute, describes the Map value.Specifies the JDBC type-code to use for the column mapping. When applied to a Map-valued attribute, describes the Map value.Grouping ofJdbcTypeRegistration
See notes onJdbcTypeRegistration
about using on packages versus use on classesSpecifies a join condition based on an arbitrary native SQL formula instead of a column name.Deprecated.Use the JPA-definedFetchType.EAGER
instead ofLazyCollection(FALSE)
.Specifies the fetch group for a persistent attribute of an entity class.Deprecated.use JPA annotations to specify theFetchType
Specifies the base value for theorder column
of a persistent list or array, that is, the order column value of the first element of the list or array.Form ofJavaType
for describing the column mapping for the index of aList
or array.Form ofJdbcType
for describing the column mapping for the index of aList
or array.Form ofJdbcTypeCode
for describing the column mapping for the index of aList
or array.Maps a to-many cardinality association taking values over several entity types which are not related by the usual entity inheritance, using a discriminator value stored in an association table.Form ofCompositeType
for use with map-keysForm ofJavaType
for describing the key of a MapForm ofJdbcType
for describing the key of a MapForm ofJdbcTypeCode
for describing the key of a MapForm ofMutability
for describing the key of a MapForm ofType
for use with map keys.Specifies aMutabilityPlan
for a basic value mapping.A grouping ofNamedNativeQuery
definitions.Declares a named query written in native SQL.A grouping ofNamedQuery
definitions.Declares a named query written in HQL or JPQL.Specifies that the annotated character data should be stored with nationalization support.Specifies that a field or property of an entity class is part of the natural id of the entity.Specifies that mappings from the natural id values of the annotated entity to the corresponding entity id values should be cached in the shared second-level cache.Indicates that a many to one, one to one, or many to many association maps to a column holding foreign keys, but without a foreign key constraint, and which may therefore violate referential integrity.Specifies anon delete
action for a foreign key constraint.Specifies whether mutating the annotated attribute should trigger an increment to theversion
of the entity instance.Specifies how optimistic lock checking works for the annotated entity.Deprecated, for removal: This API element is subject to removal in a future version.UseSQLOrder
instead.Details about a parameter declared in aFilterDef
.Generic parameter (basically a key/value combination) used to parametrize other annotations.Reference the property as a pointer back to the owner (generally the owning entity).Identifies a field of an entity that holds the partition key of a table.Deprecated.This annotation is hardly ever useful.Deprecated.This annotation is almost never useful.Specifies that arowid
-like column or pseudo-column should be used as the row locator in CRUD operations for an entity, instead of the primary key of the table.Specifies how the row of aSecondaryTable
should be managed.A grouping ofSecondaryRow
s.Deprecated.SinceSession.update(Object)
is deprecatedDeprecated.useCurrentTimestamp
insteadSpecifies a custom SQL DML statement to be used in place of the default SQL generated by Hibernate when an entity or collection row is deleted from the database.Specifies a custom SQL DML statement to be used in place of the default SQL generated by Hibernate when an entire collection is deleted from the database.A grouping ofSQLDelete
s.Defines an interpolated alias occurring in a SQL filter condition.Specifies a custom SQL DML statement to be used in place of the default SQL generated by Hibernate when an entity or collection row is inserted in the database.A grouping ofSQLInsert
s.Specifies a custom SQL DML statement to be used in place of the default SQL generated by Hibernate when an entity or collection row is updated in the database.A grouping ofSQLUpdate
s.Specifies the UDT (user defined type) name for the annotated embeddable type or embedded attribute.Maps an immutable and read-only entity to a given SQLselect
expression.Specifies a table or tables that hold state mapped by the annotated entity or collection.Deprecated, for removal: This API element is subject to removal in a future version.The options available here are all now offered by other newer and better-designed annotations in this package.Deprecated, for removal: This API element is subject to removal in a future version.sinceTable
is deprecatedSpecifies the mapped column for storing the time zone information, for use in conjunction withTimeZoneStorageType.COLUMN
orTimeZoneStorageType.AUTO
.Specifies how the time zone information of a persistent property or field should be persisted.Specifies a customUserType
for the annotated attribute mapping.Associates a user-defined annotation with aTypeBinder
, allowing the annotation to drive some custom model binding.Registers a custom user type implementation to be used by default for all references to a particular class of basic type.Grouping ofTypeRegistration
Specifies that the annotated field of property is a generated update timestamp. The timestamp is regenerated every time an entity instance is updated in the database.Specifies that an entity identifier is generated as an IETF RFC 4122 UUID.Meta-annotation used to mark another annotation as providing configuration for a custom value generation strategy.Deprecated.UseSQLRestriction
Deprecated. -
Classes in org.hibernate.annotations used by org.hibernate.boot.models.categorize.spiClassDescriptionMarks a root entity or collection for second-level caching, and specifies: a named cache region in which to store the state of instances of the entity or collection, and an appropriate cache concurrency policy, given the expected data access patterns affecting the entity or collection.Deprecated.Use the new approach based on
IdGeneratorType
.Specifies that mappings from the natural id values of the annotated entity to the corresponding entity id values should be cached in the shared second-level cache. -
Classes in org.hibernate.annotations used by org.hibernate.boot.models.xml.spiClassDescriptionEnumerates the persistence operations which may be cascaded from one entity instance to associated entity instances.
-
Classes in org.hibernate.annotations used by org.hibernate.boot.spiClassDescriptionDescribes the data layout used for storing an object into the query cache.Enumerates the persistence operations which may be cascaded from one entity instance to associated entity instances.Allows to register a
UserCollectionType
to use as the default for the specified classification of collection. -
Classes in org.hibernate.annotations used by org.hibernate.engine
-
Classes in org.hibernate.annotations used by org.hibernate.engine.profile
-
Classes in org.hibernate.annotations used by org.hibernate.engine.spi
-
Classes in org.hibernate.annotations used by org.hibernate.id.uuid
-
Classes in org.hibernate.annotations used by org.hibernate.mappingClassDescriptionDescribes the data layout used for storing an object into the query cache.Enumerates methods for fetching an association from the database.Specifies how Hibernate should handle the case of an orphaned foreign key with no associated row in the referenced table.Enumerates the possible actions for the
on delete
clause of a foreign key constraint.Enumeration of defines styles of soft-deleteDescribes the storage of timezone information for zoned datetime types, in particular, for the typesOffsetDateTime
andZonedDateTime
. -
Classes in org.hibernate.annotations used by org.hibernate.tupleClassDescriptionSpecifies that the annotated field of property is a generated creation timestamp.Deprecated.use
EventType
andEventTypeSets
insteadDeprecated.ValueGenerationType
andAnnotationValueGeneration
now provide a much more powerful and typesafe alternativeSpecifies that the annotated field of property is a generated update timestamp. The timestamp is regenerated every time an entity instance is updated in the database.
CacheMode
orCacheStoreMode
andCacheRetrieveMode
.