Package containing all the Hibernate specific annotations.
Class Summary Class Description QueryHintsConsolidation of hints available to Hibernate JPA queries.
Enum Summary Enum Description CacheConcurrencyStrategyCache concurrency strategy. CacheModeTypeEnumeration for the different interaction modes between the session and the Level 2 Cache. CascadeTypeCascade types (can override default JPA cascades). FetchModeDefines how the association should be fetched, compared to
FetchTypewhich defines when it should be fetched
FlushModeTypeEnumeration extending javax.persistence flush modes. GenerationTimeAt what time(s) will the generation occur? LazyCollectionOptionLazy options available for a collection. LazyToOneOptionLazy options available for a ToOne association. NotFoundActionPossible actions when the database contains a non-null fk with no matching target. OnDeleteActionPossible actions for on-delete. OptimisticLockTypePossible optimistic locking strategies. PolymorphismTypeType of available polymorphism for a particular entity. ResultCheckStylePossible styles of checking return codes on SQL INSERT, UPDATE and DELETE queries. SortType Deprecated.Since
SourceTypeWhere should Hibernate retrieve the value from? From the database, or from the current JVM?
Annotation Types Summary Annotation Type Description AccessType Deprecated. AnyDefines a ToOne-style association pointing to one of several entity types depending on a local discriminator, as opposed to discriminated inheritance where the discriminator is kept as part of the entity hierarchy. AnyMetaDef Deprecated.To be removed in 6.0 AnyMetaDefs Deprecated.To be removed in 6.0 AttributeAccessorNames a persistent property access strategy (
PropertyAccessStrategy) to use.
BatchSizeDefines size for batch loading of collections or lazy entities. CacheAdd caching strategy to a root entity or a collection. CascadeApply a cascade strategy on an association. CheckArbitrary SQL CHECK constraints which can be defined at the class, property or collection level. CollectionIdDescribe an identifier column for a bag (ie an idbag). CollectionType Deprecated.Custom handling for "collection types" will be handled differently in 6.0 ColumnDefaultIdentifies the DEFAULT value to apply to the associated column via DDL. ColumnsSupport an array of columns. ColumnTransformerCustom SQL expression used to read the value from and write a value to a column. ColumnTransformersPlural annotation for @ColumnTransformer. CommentSQL column comment which can be defined at property level. CreationTimestampMarks a property as the creation timestamp of the containing entity. DiscriminatorFormulaUsed to apply a Hibernate formula (derived value) as the inheritance discriminator "column". DiscriminatorOptionsOptional annotation to express Hibernate specific discriminator properties. DynamicInsertFor inserting, should this entity use dynamic sql generation where only non-null columns get referenced in the prepared sql statement? DynamicUpdateFor updating, should this entity use dynamic sql generation where only changed columns get referenced in the prepared sql statement? Entity Deprecated.See individual attributes for intended replacements. FetchDefine the fetching strategy used for the given association. FetchProfileDefine the fetching strategy profile. FetchProfile.FetchOverrideDescriptor for a particular association override. FetchProfilesCollects together multiple fetch profiles. FilterAdd filters to an entity or a target entity of a collection. FilterDefFilter definition. FilterDefsArray of filter definitions. FilterJoinTableAdd filters to a join table collection. FilterJoinTablesAdd multiple
@FilterJoinTableto a collection.
ForeignKey Deprecated.Prefer the JPA 2.1 introduced
FormulaDefines a formula (derived value) which is a SQL fragment that acts as a @Column alternative in most cases. GeneratedThe annotated property is generated by the database. GeneratorTypeMarks a property as generated, specifying the
ValueGeneratortype to be used for generating the value.
GenericGeneratorGenerator annotation describing any kind of Hibernate generator in a generic (de-typed) manner. GenericGeneratorsArray of generic generator definitions. ImmutableMark an Entity, a Collection, or an Attribute type as immutable. Index Deprecated.Using
IndexColumn Deprecated. JoinColumnOrFormulaAllows joins based on column or a formula. JoinColumnsOrFormulasCollection of
JoinFormulaTo be used as a replacement for
@JoinColumnin most places.
LazyCollectionDefine the lazy status of a collection. LazyGroupFor use with bytecode-enhanced lazy-loading support. LazyToOneDefine the laziness options available for a ToOne (ie OneToOne or ManyToOne) association. ListIndexBaseDefines the start index value for a list index as stored on the database. LoaderUsed to override how Hibernate performs load operations. ManyToAnyThis is the collection-valued form of @Any definitions. MapKeyType Deprecated.6.0 will introduce a new type-safe
MetaValueMaps a given discriminator value to the corresponding entity type. NamedNativeQueriesA grouping of Hibernate-specific
NamedNativeQuerywith Hibernate features.
NamedQueriesA grouping of Hibernate-specific
NamedQuerywith Hibernate features.
NationalizedMarks a character data type (String, Character, character, Clob) as being a nationalized variant (NVARCHAR, NCHAR, NCLOB, etc). NaturalIdThis specifies that a property is part of the natural id of the entity. NaturalIdCacheUsed to specify that the natural id values associated with the annotated entity should be cached in Hibernate's shared (L2) cache. NotFoundAction to do when an element is not found on a association. OnDeleteStrategy to use on collections, arrays and on joined subclasses delete. OptimisticLockWhether or not a change of the annotated property will trigger an entity version increment. OptimisticLockingUsed to define the style of optimistic locking to be applied to an entity. OrderByOrder a collection using SQL ordering (not HQL ordering). ParamDefA parameter definition. ParameterGeneric parameter (basically a key/value combination) used to parametrize other annotations. ParentReference the property as a pointer back to the owner (generally the owning entity). PersisterSpecify a custom persister. PolymorphismUsed to define the type of polymorphism Hibernate will apply to entity hierarchies. ProxyLazy and proxy configuration of a particular class. RowIdSupport for
ROWIDmapping feature of Hibernate.
SelectBeforeUpdateShould the entity's current state be selected from the database when determining whether to perform an update when re-attaching detached entities? Sort Deprecated. SortComparatorSpecifies in-memory Set/Map sorting using a specified
SortNaturalSpecifies in-memory Set/Map sorting using natural sorting. SourceOptional annotation in conjunction with
Versionand timestamp version properties indicating the source of the timestamp value.
SQLDeleteCustom SQL statement for delete of an entity/collection. SQLDeleteAllCustom SQL statement for delete of all of a collection's elements. SqlFragmentAliasDescribe aliases for filters. SQLInsertCustom SQL statement for insertion of an entity/collection. SQLUpdateCustom SQL statement for update of an entity/collection. SubselectMap an immutable and read-only entity to a given SQL select expression. SynchronizeEnsures that auto-flush happens correctly and that queries against the derived entity do not return stale data. TableComplementary information to a table either primary or secondary. TablesA grouping of tables. TargetDefine an explicit target, avoiding reflection and generics resolving. TuplizerDefine a tuplizer for an entity or a component. TuplizersGrouping of tuplizers. TypeDefines a Hibernate type mapping. TypeDefA type definition. TypeDefsPlural form of
UpdateTimestampMarks a property as the update timestamp of the containing entity. ValueGenerationTypeMarks an annotation type as a generator annotation type. WhereWhere clause to add to the element Entity or target entity of a collection. WhereJoinTableWhere clause to add to the collection join table.