Class 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 Detail

      • MappedColumn

        public MappedColumn​(String toColumn)
        Constructor
        Parameters:
        toColumn - to Column
      • MappedColumn

        public MappedColumn​(String toColumn,
                            String fromColumn)
        Constructor
        Parameters:
        toColumn - to column
        fromColumn - from column
      • MappedColumn

        public MappedColumn​(String toColumn,
                            String fromColumn,
                            Object defaultValue,
                            GeoPackageDataType dataType)
        Constructor
        Parameters:
        toColumn - to column
        fromColumn - from column
        defaultValue - default value
        dataType - data type
      • MappedColumn

        public MappedColumn​(String toColumn,
                            Object defaultValue,
                            GeoPackageDataType dataType)
        Constructor
        Parameters:
        toColumn - to column
        defaultValue - default value
        dataType - 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 value
        whereOperator - 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