Top Description Methods
org.hibernate.annotations

public @Interface Table

extends Annotation
Annotations
@Target:TYPE
@Retention:RUNTIME
@Repeatable:Tables
Imports
java.lang.annotation.Repeatable, .Retention, .Target

Complementary information to a table either primary or secondary.
Author
Emmanuel Bernard

Method Summary

Modifier and TypeMethod and Description
public String
appliesTo()

name of the targeted table.

public String
comment()

define a table comment.

public FetchMode
fetch()

If set to JOIN, the default, Hibernate will use an inner join to retrieve a secondary table defined by a class or its superclasses and an outer join for a secondary table defined by a subclass.

public ForeignKey
foreignKey()

Deprecated as a consequence of ForeignKey being deprecated.
Defines the Foreign Key name of a secondary table pointing back to the primary table.
public Index[]
indexes()

Deprecated as a consequence of Index being deprecated.
Indexes.
public boolean
inverse()

If true, Hibernate will not try to insert or update the properties defined by this join.

public boolean
optional()

If enabled, Hibernate will insert a row only if the properties defined by this join are non-null and will always use an outer join to retrieve the properties.

public SQLDelete
sqlDelete()

Defines a custom SQL delete statement.

public SQLInsert
sqlInsert()

Defines a custom SQL insert statement.

public SQLUpdate
sqlUpdate()

Defines a custom SQL update statement.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

appliesToback to summary
public String appliesTo()

name of the targeted table.

commentback to summary
public String comment()

define a table comment.

fetchback to summary
public FetchMode fetch()

If set to JOIN, the default, Hibernate will use an inner join to retrieve a secondary table defined by a class or its superclasses and an outer join for a secondary table defined by a subclass. If set to select then Hibernate will use a sequential select for a secondary table defined on a subclass, which will be issued only if a row turns out to represent an instance of the subclass. Inner joins will still be used to retrieve a secondary defined by the class and its superclasses. Only applies to secondary tables

foreignKeyback to summary
public ForeignKey foreignKey()

Deprecated

as a consequence of ForeignKey being deprecated. See corresponding docs for further information.

Defines the Foreign Key name of a secondary table pointing back to the primary table.

indexesback to summary
public Index[] indexes()

Deprecated

as a consequence of Index being deprecated. See corresponding docs for further information.

Indexes.

inverseback to summary
public boolean inverse()

If true, Hibernate will not try to insert or update the properties defined by this join. Only applies to secondary tables

optionalback to summary
public boolean optional()

If enabled, Hibernate will insert a row only if the properties defined by this join are non-null and will always use an outer join to retrieve the properties. Only applies to secondary tables

sqlDeleteback to summary
public SQLDelete sqlDelete()

Defines a custom SQL delete statement. Only applies to secondary tables

sqlInsertback to summary
public SQLInsert sqlInsert()

Defines a custom SQL insert statement. Only applies to secondary tables

sqlUpdateback to summary
public SQLUpdate sqlUpdate()

Defines a custom SQL update statement. Only applies to secondary tables