Enum DbColumnConstraint
- java.lang.Object
-
- java.lang.Enum<DbColumnConstraint>
-
- com.feedzai.commons.sql.abstraction.ddl.DbColumnConstraint
-
- All Implemented Interfaces:
Serializable,Comparable<DbColumnConstraint>
public enum DbColumnConstraint extends Enum<DbColumnConstraint>
Represents the available column constraints.- Since:
- 2.0.0
- Author:
- Rui Vilao (rui.vilao@feedzai.com)
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract Stringtranslate()The default translation.static DbColumnConstraintvalueOf(String name)Returns the enum constant of this type with the specified name.static DbColumnConstraint[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
UNIQUE
public static final DbColumnConstraint UNIQUE
The unique constraint.
-
NOT_NULL
public static final DbColumnConstraint NOT_NULL
The not null constraint.
-
-
Method Detail
-
values
public static DbColumnConstraint[] 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 (DbColumnConstraint c : DbColumnConstraint.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DbColumnConstraint 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 nameNullPointerException- if the argument is null
-
translate
public abstract String translate()
The default translation.- Returns:
- The default translation.
-
-