Package mil.nga.geopackage.db.table
Class ColumnConstraints
- java.lang.Object
-
- mil.nga.geopackage.db.table.ColumnConstraints
-
public class ColumnConstraints extends Object
Column Constraints- Since:
- 3.3.0
- Author:
- osbornb
-
-
Constructor Summary
Constructors Constructor Description ColumnConstraints(String name)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addConstraint(Constraint constraint)
Add a constraintvoid
addConstraints(Collection<Constraint> constraints)
Add constraintsvoid
addConstraints(ColumnConstraints constraints)
Add constraintsvoid
addConstraints(Constraints constraints)
Add constraintsConstraint
getConstraint(int index)
Get the constraint at the indexConstraints
getConstraints()
Get the constraintsString
getName()
Get the column nameboolean
hasConstraints()
Check if there are constraintsint
numConstraints()
Get the number of constraintsvoid
setName(String name)
Set the column name
-
-
-
Constructor Detail
-
ColumnConstraints
public ColumnConstraints(String name)
Constructor- Parameters:
name
- column name
-
-
Method Detail
-
getName
public String getName()
Get the column name- Returns:
- column name
-
setName
public void setName(String name)
Set the column name- Parameters:
name
- column name
-
addConstraint
public void addConstraint(Constraint constraint)
Add a constraint- Parameters:
constraint
- constraint
-
addConstraints
public void addConstraints(Collection<Constraint> constraints)
Add constraints- Parameters:
constraints
- constraints
-
addConstraints
public void addConstraints(Constraints constraints)
Add constraints- Parameters:
constraints
- constraints- Since:
- 5.0.0
-
getConstraints
public Constraints getConstraints()
Get the constraints- Returns:
- constraints
- Since:
- 5.0.0
-
getConstraint
public Constraint getConstraint(int index)
Get the constraint at the index- Parameters:
index
- constraint index- Returns:
- constraint
-
numConstraints
public int numConstraints()
Get the number of constraints- Returns:
- constraints count
-
addConstraints
public void addConstraints(ColumnConstraints constraints)
Add constraints- Parameters:
constraints
- constraints
-
hasConstraints
public boolean hasConstraints()
Check if there are constraints- Returns:
- true if has constraints
-
-