Enum ConstraintType

    • Enum Constant Detail

      • PRIMARY_KEY

        public static final ConstraintType PRIMARY_KEY
        Primary key table and column constraint
      • UNIQUE

        public static final ConstraintType UNIQUE
        Unique table and column constraint
      • CHECK

        public static final ConstraintType CHECK
        Check table and column constraint
      • FOREIGN_KEY

        public static final ConstraintType FOREIGN_KEY
        Foreign key table and column constraint
      • NOT_NULL

        public static final ConstraintType NOT_NULL
        Not null column constraint
      • DEFAULT

        public static final ConstraintType DEFAULT
        Default column constraint
      • COLLATE

        public static final ConstraintType COLLATE
        Collate column constraint
      • AUTOINCREMENT

        public static final ConstraintType AUTOINCREMENT
        Autoincrement column constraint
    • Field Detail

      • TABLE_CONSTRAINTS

        public static final Set<ConstraintType> TABLE_CONSTRAINTS
        Table constraints
      • COLUMN_CONSTRAINTS

        public static final Set<ConstraintType> COLUMN_CONSTRAINTS
        Column constraints
    • Method Detail

      • values

        public static ConstraintType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (ConstraintType c : ConstraintType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static ConstraintType valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • getTableType

        public static ConstraintType getTableType​(String value)
        Get a matching table constraint type from the value
        Parameters:
        value - table constraint name value
        Returns:
        constraint type or null
      • getColumnType

        public static ConstraintType getColumnType​(String value)
        Get a matching column constraint type from the value
        Parameters:
        value - column constraint name value
        Returns:
        constraint type or null
      • getType

        public static ConstraintType getType​(String value)
        Get a matching constraint type from the value
        Parameters:
        value - constraint name value
        Returns:
        constraint type or null