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 ObjectgetConstantValue()Get the constant valueStringgetConstantValueAsString()Get the constant value as a stringGeoPackageDataTypegetDataType()Get the data typeObjectgetDefaultValue()Get the default valueStringgetDefaultValueAsString()Get the default value as a stringStringgetFromColumn()Get the from columnStringgetToColumn()Get the to columnStringgetWhereOperator()Get the where operatorObjectgetWhereValue()Get the where valueStringgetWhereValueAsString()Get the where value as a stringbooleanhasConstantValue()Check if the column has a constant valuebooleanhasDefaultValue()Check if the column has a default valuebooleanhasNewName()Determine if the column has a new namebooleanhasWhereValue()Check if the column has a where valuevoidsetConstantValue(Object constantValue)Set the constant valuevoidsetDataType(GeoPackageDataType dataType)Set the data typevoidsetDefaultValue(Object defaultValue)Set the default valuevoidsetFromColumn(String fromColumn)Set the from columnvoidsetToColumn(String toColumn)Set the to columnvoidsetWhereOperator(String whereOperator)Set the where operatorvoidsetWhereValue(Object whereValue)Set the where valuevoidsetWhereValue(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
-
-