Annotation Type UniqueConstraint


  • @Target({})
    @Retention(RUNTIME)
    public @interface UniqueConstraint
    Specifies that a unique constraint is to be included in the generated DDL for a primary or secondary table.

    Example: {@snippet :

    Since:
    1.0
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      java.lang.String[] columnNames
      (Required) The names of the column which make up the constraint.
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      java.lang.String name
      (Optional) The name of the constraint.
      java.lang.String options
      (Optional) A SQL fragment appended to the generated DDL which creates this constraint.
    • Element Detail

      • columnNames

        java.lang.String[] columnNames
        (Required) The names of the column which make up the constraint.
      • name

        java.lang.String name
        (Optional) The name of the constraint.

        Defaults to a provider-generated name.

        Since:
        2.0
        Default:
        ""
      • options

        java.lang.String options
        (Optional) A SQL fragment appended to the generated DDL which creates this constraint.
        Since:
        3.2
        Default:
        ""