Class SqlColumn

java.lang.Object
com.randomnoun.common.jexl.sql.SqlColumn

public class SqlColumn extends Object
Objects of this type are used in the evaluation context passed into an SqlGenerator to define a database column used in a TopLevelExpression.

See the SqlGenerator class for detailed documentation.

Author:
knoxg
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    These constants are copied directly from the java.sql.Types class; note that we also add the new types MONEYVALUE, DATEVALUE, TIMEVALUE, FIXEDDATEVALUE and FIXEDTIMEVALUE
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
    The range 5000-6000 is currently unused in java.sql.Types; (and doesn't look like it will ever be used), so I'm going to use this for custom types.
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Create a new column, of type VARCHAR
    SqlColumn(String name, int dataType)
    Create a new column, with the supplied datatype
    SqlColumn(String name, String table)
    Create a new column, in a specific table, of type VARCHAR
    SqlColumn(String name, String table, int dataType)
    Create a new column, in a specific table, with the supplied datatype
  • Method Summary

    Modifier and Type
    Method
    Description
    Retrieves the currency column of this SqlColumn, as supplied by setCurrencyCodeName
    int
    Retrieves the data type of this SqlColumn
    Either returns the name of the currency column, or table + "." + currency name, if a table has been set
    Either returns the name of this column, or table + "." + name, if a table has been set
    Retrieves the name of this SqlColumn, as set by the constructor
    Retrieves the table of this SqlColumn, as set by the constructor
    void
    setCurrencyCodeName(String currencyCodeName)
    Sets the column name that contains the currency code, for a MONEYVALUE SqlColumn.
    Retrieve a string representation of this column

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait