Top Description Methods
org.hibernate.annotations

public @Interface Table

extends Annotation
Annotations
@Target:TYPE
@Retention:RUNTIME
Static Imports
java.lang.annotation.ElementType.TYPE, .RetentionPolicy.RUNTIME

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()

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

public Index[]
indexes()

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 Only applies to secondary tables

public SQLInsert
sqlInsert()

Defines a custom SQL insert statement Only applies to secondary tables

public SQLUpdate
sqlUpdate()

Defines a custom SQL update statement Only applies to secondary tables

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()

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

indexesback to summary
public Index[] indexes()

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