Jakarta Persistence (JPA) Annotation Type

jakarta.persistence.CheckConstraint

Implemented Interfaces:
Annotation

Used to specify a SQL check constraint on a column or table when schema generation is in effect.
See Also:
Since:
Jakarta Persistence (JPA) 3.2

Public Instance Methods

String constraint()
(Required) The native SQL expression to be checked.
Since:
Jakarta Persistence (JPA) 1.0
String name()
(Optional) The name of the constraint.

Defaults to a provider-generated name.

Since:
Jakarta Persistence (JPA) 1.0
String options()
(Optional) A SQL fragment appended to the generated DDL which creates this constraint.
Since:
Jakarta Persistence (JPA) 3.2

Annotation Elements

This is a marker annotation with no members/elements.

Additional JDK methods inherited from java.lang.annotation.Annotation

java.lang.annotation.Annotation/annotationType(), java.lang.annotation.Annotation/equals(Object), java.lang.annotation.Annotation/hashCode(), java.lang.annotation.Annotation/toString()