Top Description Methods
jakarta.persistence

public @Interface CheckConstraint

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

Used to specify a SQL check constraint on a column or table when schema generation is in effect.
Since
3.2
See Also
Table#check(), Column#check()

Method Summary

Modifier and TypeMethod and Description
public String
constraint()

(Required) The native SQL expression to be checked.

public String
name()

(Optional) The name of the constraint.

public String
options()

(Optional) A SQL fragment appended to the generated DDL which creates this constraint.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

constraintback to summary
public String constraint()

(Required) The native SQL expression to be checked.

nameback to summary
public String name()

(Optional) The name of the constraint.

Defaults to a provider-generated name.

optionsback to summary
public String options()

(Optional) A SQL fragment appended to the generated DDL which creates this constraint.

Since
3.2