Top Annotations Enums
[default module]

Package org.hibernate.annotations


Annotation Summary

Modifier and TypeAnnotation and Description
public @interface
AccessType

Property Access type Prefer the standard javax.persistence.Access annotation

public @interface
Any

Define a ToOne association pointing to several entity types.

public @interface
AnyMetaDef

Defines @Any and @manyToAny metadata

public @interface
AnyMetaDefs

Defines @Any and @ManyToAny set of metadata.

public @interface
BatchSize

Batch size for SQL loading

public @interface
Cache

Add caching strategy to a root entity or a collection

public @interface
Cascade

Apply a cascade strategy on an association

public @interface
Check

Arbitrary SQL check constraints which can be defined at the class, property or collection level

public @interface
CollectionId

Describe an identifier column for a bag (ie an idbag) EXPERIMENTAL: the structure of this annotation might slightly change (generator() mix strategy and generator

public @interface
CollectionOfElements

Deprecated use @ElementCollection
Annotation used to mark a collection as a collection of elements or a collection of embedded objects
public @interface
Columns

Support an array of columns.

public @interface
ColumnTransformer

Custom SQL expression used to read the value from and write a value to a column.

public @interface
ColumnTransformers

Plural annotation for @ColumnTransformer.

public @interface
DiscriminatorFormula

Discriminator formula To be placed at the root entity.

public @interface
DiscriminatorOptions

Optional annotation to express Hibernate specific discrimintor properties.

public @interface
Entity

Extends javax.persistence.Entity with Hibernate features

public @interface
Fetch

Define the fetching strategy used for the given association

public @interface
FetchProfile

Define the fetching strategy profile.

public @interface
public @interface
Filter

Add filters to an entity or a target entity of a collection

public @interface
FilterDef

Filter definition

public @interface
FilterDefs

Array of filter definitions

public @interface
FilterJoinTable

Add filters to a join table collection

public @interface
FilterJoinTables

Add multiple @FilterJoinTable to a collection

public @interface
Filters

Add multiple @Filters

public @interface
ForceDiscriminator

ForceDiscriminator flag To be placed at the root entity near @DiscriminatorColumn or @DiscriminatorFormula
public @interface
public @interface
Formula

Formula.

public @interface
Generated

The annotated property is generated by the database

public @interface
GenericGenerator

Generator annotation describing any kind of Hibernate generator in a detyped manner

public @interface
GenericGenerators

Array of generic generator definitions

public @interface
Immutable

Mark an Entity or a Collection as immutable.

public @interface
Index

Define a DB index

public @interface
IndexColumn

Describe an index column of a List Prefer the standard javax.persistence.OrderColumn annotation

public @interface
public @interface
public @interface
JoinFormula

JoinFormula.

public @interface
LazyCollection

Define the lazy status of a collection

public @interface
LazyToOne

Define the lazy status of a ToOne association (ie OneToOne or ManyToOne)

public @interface
Loader

Loader Annotation for overwriting Hibernate default FIND method

public @interface
ManyToAny

Defined a ToMany association pointing to different entity types.

public @interface
MapKey

Deprecated Use javax.persistence.MapKeyColumn This is the default behavior for Map properties marked as @OneToMany, @ManyToMany or @ElementCollection
Define the map key columns as an explicit column holding the map key This is completely different from javax.persistence.MapKey which use an existing column This annotation and javax.persistence.MapKey are mutually exclusive
public @interface
MapKeyManyToMany

Deprecated Use javax.persistence.MapKeyJoinColumn javax.persistence.MapKeyJoinColumns This is the default behavior for Map properties marked as @OneToMany, @ManyToMany or @ElementCollection
Define the map key columns as an explicit column holding the map key This is completely different from javax.persistence.MapKey which use an existing column This annotation and javax.persistence.MapKey are mutually exclusive
public @interface
MapKeyType

Allows defining the type of the key of a persistent map.

public @interface
MetaValue

Represent a discriminator value associated to a given entity type

public @interface
NamedNativeQueries

Extends javax.persistence.NamedNativeQueries to hold hibernate NamedNativeQuery objects

public @interface
public @interface
NamedQueries

Extends javax.persistence.NamedQueries to hold hibernate NamedQuery objects

public @interface
NamedQuery

Extends javax.persistence.NamedQuery with Hibernate features

public @interface
NaturalId

This specifies that a property is part of the natural id of the entity.

public @interface
NotFound

Action to do when an element is not found on a association whiel beeing expected

public @interface
OnDelete

Strategy to use on collections, arrays and on joined subclasses delete OnDelete of secondary tables currently not supported.

public @interface
OptimisticLock

Whether or not update entity's version on property's change If the annotation is not present, the property is involved in the optimistic lock srategy (default)

public @interface
OrderBy

Order a collection using SQL ordering (not HQL ordering)

public @interface
ParamDef

A parameter definition

public @interface
Parameter

Parameter (basically key/value pattern)

public @interface
Parent

Reference the property as a pointer back to the owner (generally the owning entity)

public @interface
Persister

Specify a custom persister.

public @interface
Proxy

Lazy and proxy configuration of a particular class

public @interface
Sort

Collection sort (Java level sorting)

public @interface
Source

Optional annotation in conjunction with javax.persistence.Version and timestamp version properties.

public @interface
SQLDelete

SqlDelete Annotation for overwriting Hibernate default DELETE method

public @interface
SQLDeleteAll

SqlDelete Annotation for overwriting Hibernate default DELETE ALL method

public @interface
SQLInsert

SqlInsert Annotation for overwriting Hibernate default INSERT INTO method

public @interface
SQLUpdate

SqlUpdate Annotation for overwriting Hibernate default UPDATE method

public @interface
Subselect

Map an immutable and read-only entity to a given SQL subselect expression:

public @interface
Synchronize

Ensures that auto-flush happens correctly and that queries against the derived entity do not return stale data.

public @interface
Table

Complementary information to a table either primary or secondary

public @interface
Tables

Plural of Table

public @interface
Target

Define an explicit target,a voiding reflection and generics resolving

public @interface
Tuplizer

Define a tuplizer for an entity or a component

public @interface
Tuplizers

Define a set of tuplizer for an entity or a component

public @interface
Type

hibernate type

public @interface
TypeDef

Type definition

public @interface
TypeDefs

Type definition array

public @interface
Where

Where clause to add to the element Entity or target entity of a collection The clause is written in SQL

public @interface
WhereJoinTable

Where clause to add to the colleciton join table The clause is written in SQL

Enum Summary

Modifier and TypeEnum and Description
public enum
CacheConcurrencyStrategy

Cache concurrency strategy

public enum
CacheModeType

Enumeration for the different interaction modes between the session and the Level 2 Cache.

public enum
CascadeType

Cascade types (can override default EJB3 cascades

public enum
FetchMode

Fetch options on associations

public enum
FlushModeType

Enumeration extending javax.persistence flush modes.

public enum
GenerationTime

When should the generation occurs

public enum
LazyCollectionOption

Lazy options available for a collection

public enum
LazyToOneOption

Lazy options available for a ToOne association

public enum
NotFoundAction

Actoin to use when an element is not found in DB while beeing expected

public enum
OnDeleteAction

Possible actions on deletes

public enum
OptimisticLockType

Optimistic locking strategy VERSION is the default and recommanded one

public enum
PolymorphismType

Type of available polymorphism for a particular entity

public enum
ResultCheckStyle

Possible checks on Sql Insert, Delete, Update

public enum
SortType

Sort strategies

public enum
SourceType

Where should Hibernate retrieve the value from?