Class SqlColumn
java.lang.Object
com.randomnoun.common.jexl.sql.SqlColumn
- Direct Known Subclasses:
TransformedSqlColumn
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThese constants are copied directly from the java.sql.Types class; note that we also add the new types DATEVALUE, TIMEVALUE, FIXEDDATEVALUE and FIXEDTIMEVALUEstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intprotected intThe type of this column.static final intstatic final intThe 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 intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intprotected StringThe name of this database columnstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intprotected StringThe name of the table this fields belongs to (or null if not specifying tables)static final intstatic final intstatic final intstatic final intstatic final intstatic final int -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new column, of type VARCHARCreate a new column, with the supplied datatypeCreate a new column, in a specific table, of type VARCHARCreate a new column, in a specific table, with the supplied datatype -
Method Summary
Modifier and TypeMethodDescriptionintRetrieves the data type of this SqlColumnEither returns the name of this column, or table + "." + name, if a table has been setgetName()Retrieves the name of this SqlColumn, as set by the constructorgetTable()Retrieves the table of this SqlColumn, as set by the constructortoString()Retrieve a string representation of this column
-
Field Details
-
ARRAY
These constants are copied directly from the java.sql.Types class; note that we also add the new types DATEVALUE, TIMEVALUE, FIXEDDATEVALUE and FIXEDTIMEVALUE- See Also:
-
BIGINT
- See Also:
-
BINARY
- See Also:
-
BIT
- See Also:
-
BLOB
- See Also:
-
BOOLEAN
- See Also:
-
CHAR
- See Also:
-
CLOB
- See Also:
-
DATALINK
- See Also:
-
DATE
- See Also:
-
DECIMAL
- See Also:
-
DISTINCT
- See Also:
-
DOUBLE
- See Also:
-
FLOAT
- See Also:
-
INTEGER
- See Also:
-
JAVA_OBJECT
- See Also:
-
LONGVARBINARY
- See Also:
-
LONGVARCHAR
- See Also:
-
NULL
- See Also:
-
NUMERIC
- See Also:
-
OTHER
- See Also:
-
REAL
- See Also:
-
REF
- See Also:
-
SMALLINT
- See Also:
-
STRUCT
- See Also:
-
TIME
- See Also:
-
TIMESTAMP
- See Also:
-
TINYINT
- See Also:
-
VARBINARY
- See Also:
-
VARCHAR
- See Also:
-
DATEVALUE
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. Anything in here is treated specially in SqlGenerator when converting to SQL.- See Also:
-
TIMEVALUE
- See Also:
-
FIXEDDATEVALUE
- See Also:
-
FIXEDTIMEVALUE
- See Also:
-
name
-
table
-
dataType
The type of this column. Corresponds to one of the public static final int constants defined in this class.
-
-
Constructor Details
-
SqlColumn
-
SqlColumn
-
SqlColumn
-
SqlColumn
Create a new column, in a specific table, with the supplied datatype- Parameters:
name- The name of the column in the databasetable- The name of the table in the database this column is indataType- The datatype of the column. Corresponds to one of the public static final int constants defined in this class.
-
-
Method Details
-
getName
-
getTable
-
getDataType
Retrieves the data type of this SqlColumn -
getFullName
Either returns the name of this column, or table + "." + name, if a table has been set -
toString
-