Package mil.nga.geopackage.db.table
Class RawConstraint
- java.lang.Object
-
- mil.nga.geopackage.db.table.Constraint
-
- mil.nga.geopackage.db.table.RawConstraint
-
- All Implemented Interfaces:
Comparable<Constraint>
public class RawConstraint extends Constraint
Table raw or unparsed constraint- Since:
- 3.3.0
- Author:
- osbornb
-
-
Field Summary
-
Fields inherited from class mil.nga.geopackage.db.table.Constraint
CONSTRAINT
-
-
Constructor Summary
Constructors Constructor Description RawConstraint(Integer order, String sql)
ConstructorRawConstraint(String sql)
ConstructorRawConstraint(ConstraintType type, Integer order, String sql)
ConstructorRawConstraint(ConstraintType type, String sql)
ConstructorRawConstraint(ConstraintType type, String name, Integer order, String sql)
ConstructorRawConstraint(ConstraintType type, String name, String sql)
ConstructorRawConstraint(RawConstraint userRawConstraint)
Copy Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
buildSql()
Build the constraint SQLConstraint
copy()
Copy the constraintString
getSql()
Get the constraint SQLvoid
setNameFromSql(String sql)
Set the name from the constraint SQLvoid
setSql(String sql)
Set the constraint SQLvoid
setTypeFromSql(String sql)
Set the type from the constraint SQL-
Methods inherited from class mil.nga.geopackage.db.table.Constraint
buildNameSql, compareTo, getName, getOrder, getType, setName, setOrder, setType
-
-
-
-
Constructor Detail
-
RawConstraint
public RawConstraint(String sql)
Constructor- Parameters:
sql
- constraint SQL
-
RawConstraint
public RawConstraint(ConstraintType type, String sql)
Constructor- Parameters:
type
- constraint typesql
- constraint SQL
-
RawConstraint
public RawConstraint(ConstraintType type, String name, String sql)
Constructor- Parameters:
type
- constraint typename
- constraint namesql
- constraint SQL
-
RawConstraint
public RawConstraint(Integer order, String sql)
Constructor- Parameters:
order
- constraint ordersql
- constraint SQL- Since:
- 5.0.0
-
RawConstraint
public RawConstraint(ConstraintType type, Integer order, String sql)
Constructor- Parameters:
type
- constraint typeorder
- constraint ordersql
- constraint SQL- Since:
- 5.0.0
-
RawConstraint
public RawConstraint(ConstraintType type, String name, Integer order, String sql)
Constructor- Parameters:
type
- constraint typename
- constraint nameorder
- constraint ordersql
- constraint SQL- Since:
- 5.0.0
-
RawConstraint
public RawConstraint(RawConstraint userRawConstraint)
Copy Constructor- Parameters:
userRawConstraint
- user raw constraint
-
-
Method Detail
-
getSql
public String getSql()
Get the constraint SQL- Returns:
- SQL
-
setSql
public void setSql(String sql)
Set the constraint SQL- Parameters:
sql
- constraint SQL
-
setTypeFromSql
public void setTypeFromSql(String sql)
Set the type from the constraint SQL- Parameters:
sql
- constraint SQL
-
setNameFromSql
public void setNameFromSql(String sql)
Set the name from the constraint SQL- Parameters:
sql
- constraint SQL
-
buildSql
public String buildSql()
Build the constraint SQL- Specified by:
buildSql
in classConstraint
- Returns:
- sql constraint
-
copy
public Constraint copy()
Copy the constraint- Specified by:
copy
in classConstraint
- Returns:
- copied constraint
-
-