Package mil.nga.geopackage.db
Class MappedColumn
- java.lang.Object
-
- mil.nga.geopackage.db.MappedColumn
-
public class MappedColumn extends Object
Mapped column, to a column and potentially from a differently named column- Since:
- 3.3.0
- Author:
- osbornb
-
-
Constructor Summary
Constructors Constructor Description MappedColumn(String toColumn)
ConstructorMappedColumn(String toColumn, Object defaultValue, GeoPackageDataType dataType)
ConstructorMappedColumn(String toColumn, String fromColumn)
ConstructorMappedColumn(String toColumn, String fromColumn, Object defaultValue, GeoPackageDataType dataType)
ConstructorMappedColumn(TableColumn column)
ConstructorMappedColumn(UserColumn column)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
getConstantValue()
Get the constant valueString
getConstantValueAsString()
Get the constant value as a stringGeoPackageDataType
getDataType()
Get the data typeObject
getDefaultValue()
Get the default valueString
getDefaultValueAsString()
Get the default value as a stringString
getFromColumn()
Get the from columnString
getToColumn()
Get the to columnString
getWhereOperator()
Get the where operatorObject
getWhereValue()
Get the where valueString
getWhereValueAsString()
Get the where value as a stringboolean
hasConstantValue()
Check if the column has a constant valueboolean
hasDefaultValue()
Check if the column has a default valueboolean
hasNewName()
Determine if the column has a new nameboolean
hasWhereValue()
Check if the column has a where valuevoid
setConstantValue(Object constantValue)
Set the constant valuevoid
setDataType(GeoPackageDataType dataType)
Set the data typevoid
setDefaultValue(Object defaultValue)
Set the default valuevoid
setFromColumn(String fromColumn)
Set the from columnvoid
setToColumn(String toColumn)
Set the to columnvoid
setWhereOperator(String whereOperator)
Set the where operatorvoid
setWhereValue(Object whereValue)
Set the where valuevoid
setWhereValue(Object whereValue, String whereOperator)
Set the where value
-
-
-
Constructor Detail
-
MappedColumn
public MappedColumn(String toColumn)
Constructor- Parameters:
toColumn
- to Column
-
MappedColumn
public MappedColumn(String toColumn, String fromColumn)
Constructor- Parameters:
toColumn
- to columnfromColumn
- from column
-
MappedColumn
public MappedColumn(String toColumn, String fromColumn, Object defaultValue, GeoPackageDataType dataType)
Constructor- Parameters:
toColumn
- to columnfromColumn
- from columndefaultValue
- default valuedataType
- data type
-
MappedColumn
public MappedColumn(String toColumn, Object defaultValue, GeoPackageDataType dataType)
Constructor- Parameters:
toColumn
- to columndefaultValue
- default valuedataType
- data type
-
MappedColumn
public MappedColumn(UserColumn column)
Constructor- Parameters:
column
- user column
-
MappedColumn
public MappedColumn(TableColumn column)
Constructor- Parameters:
column
- table column
-
-
Method Detail
-
getToColumn
public String getToColumn()
Get the to column- Returns:
- to column
-
setToColumn
public void setToColumn(String toColumn)
Set the to column- Parameters:
toColumn
- to column
-
hasNewName
public boolean hasNewName()
Determine if the column has a new name- Returns:
- true if the to and from column names are different
-
getFromColumn
public String getFromColumn()
Get the from column- Returns:
- from column
-
setFromColumn
public void setFromColumn(String fromColumn)
Set the from column- Parameters:
fromColumn
- from column
-
hasDefaultValue
public boolean hasDefaultValue()
Check if the column has a default value- Returns:
- true if has a default value
-
getDefaultValue
public Object getDefaultValue()
Get the default value- Returns:
- default value
-
getDefaultValueAsString
public String getDefaultValueAsString()
Get the default value as a string- Returns:
- default value as string
-
setDefaultValue
public void setDefaultValue(Object defaultValue)
Set the default value- Parameters:
defaultValue
- default value
-
getDataType
public GeoPackageDataType getDataType()
Get the data type- Returns:
- data type
-
setDataType
public void setDataType(GeoPackageDataType dataType)
Set the data type- Parameters:
dataType
- data type
-
hasConstantValue
public boolean hasConstantValue()
Check if the column has a constant value- Returns:
- true if has a constant value
-
getConstantValue
public Object getConstantValue()
Get the constant value- Returns:
- constant value
-
getConstantValueAsString
public String getConstantValueAsString()
Get the constant value as a string- Returns:
- constant value as string
-
setConstantValue
public void setConstantValue(Object constantValue)
Set the constant value- Parameters:
constantValue
- constant value
-
hasWhereValue
public boolean hasWhereValue()
Check if the column has a where value- Returns:
- true if has a where value
-
getWhereValue
public Object getWhereValue()
Get the where value- Returns:
- where value
-
getWhereValueAsString
public String getWhereValueAsString()
Get the where value as a string- Returns:
- where value as string
-
setWhereValue
public void setWhereValue(Object whereValue)
Set the where value- Parameters:
whereValue
- where value
-
setWhereValue
public void setWhereValue(Object whereValue, String whereOperator)
Set the where value- Parameters:
whereValue
- where valuewhereOperator
- where operator
-
getWhereOperator
public String getWhereOperator()
Get the where operator- Returns:
- where operator
-
setWhereOperator
public void setWhereOperator(String whereOperator)
Set the where operator- Parameters:
whereOperator
- where operator
-
-