Top Description Methods
org.hibernate.annotations

public @Interface Check

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

Specifies a check constraint to be included in the generated DDL.

For an entity with secondary tables, a check constraint may involve columns of the primary table, or columns of any one of the secondary tables. But it may not involve columns of more than one table.

An entity may have multiple @Check annotations, each defining a different constraint.

Authors
Emmanuel Bernard, Gavin King
See Also
DialectOverride.Check

Method Summary

Modifier and TypeMethod and Description
public String
constraints()

The check constraint, written in native SQL.

public String
name()

The optional name of the check constraint.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

constraintsback to summary
public String constraints()

The check constraint, written in native SQL.

nameback to summary
public String name()

The optional name of the check constraint.