Package mil.nga.geopackage.db.table
Enum ConstraintType
- java.lang.Object
-
- java.lang.Enum<ConstraintType>
-
- mil.nga.geopackage.db.table.ConstraintType
-
- All Implemented Interfaces:
Serializable
,Comparable<ConstraintType>
public enum ConstraintType extends Enum<ConstraintType>
Constraint types- Since:
- 3.3.0
- Author:
- osbornb
-
-
Enum Constant Summary
Enum Constants Enum Constant Description AUTOINCREMENT
Autoincrement column constraintCHECK
Check table and column constraintCOLLATE
Collate column constraintDEFAULT
Default column constraintFOREIGN_KEY
Foreign key table and column constraintNOT_NULL
Not null column constraintPRIMARY_KEY
Primary key table and column constraintUNIQUE
Unique table and column constraint
-
Field Summary
Fields Modifier and Type Field Description static Set<ConstraintType>
COLUMN_CONSTRAINTS
Column constraintsstatic Set<ConstraintType>
TABLE_CONSTRAINTS
Table constraints
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ConstraintType
getColumnType(String value)
Get a matching column constraint type from the valuestatic ConstraintType
getTableType(String value)
Get a matching table constraint type from the valuestatic ConstraintType
getType(String value)
Get a matching constraint type from the valuestatic ConstraintType
valueOf(String name)
Returns the enum constant of this type with the specified name.static ConstraintType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
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 nameNullPointerException
- 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
-
-