Package com.mckoi.database
Class Variable
java.lang.Object
com.mckoi.database.Variable
- All Implemented Interfaces:
Serializable
,Cloneable
This represents a column name that may be qualified. This object
encapsulated a column name that can be fully qualified in the system. Such
uses of this object would not typically be used against any context. For
example, it would not be desirable to use ColumnName in DataTableDef
because the column names contained in DataTableDef are within a known
context. This object is intended for use within parser processes where
free standing column names with potentially no context are required.
NOTE: This object is NOT immutable.
- Author:
- Tobias Downer
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
Performs a deep clone of this object.int
Comparable.boolean
Equality.getName()
Returns the column name context.Returns the TableName context.int
hashCode()
Hash code.static Variable
Attempts to resolve a string '[table_name].[column]' to a Variable instance.static Variable
Attempts to resolve a string '[table_name].[column]' to a Variable instance.resolveTableName
(TableName tablen) Returns a ColumnName that is resolved against a table name context only if the ColumnName is unknown in this object.Sets this Variable object with information from the given Variable.void
setColumnName
(String column_name) Sets the column name of this variable.void
setTableName
(TableName tname) Sets the TableName of this variable.toString()
To string.To a differently formatted string.
-
Constructor Details
-
Variable
Constructs the ColumnName. -
Variable
-
Variable
-
-
Method Details
-
getTableName
Returns the TableName context. -
getName
Returns the column name context. -
resolve
Attempts to resolve a string '[table_name].[column]' to a Variable instance. -
resolve
Attempts to resolve a string '[table_name].[column]' to a Variable instance. If the table name does not exist, or the table name schema is not specified, then the schema/table name is copied from the given object. -
resolveTableName
Returns a ColumnName that is resolved against a table name context only if the ColumnName is unknown in this object. -
set
Sets this Variable object with information from the given Variable. -
setColumnName
Sets the column name of this variable. This should be used if the variable is resolved from one form to another. -
setTableName
Sets the TableName of this variable. -
clone
Performs a deep clone of this object.- Overrides:
clone
in classObject
- Throws:
CloneNotSupportedException
-
toString
To string. -
toTechString
To a differently formatted string. -
equals
Equality. -
compareTo
Comparable. -
hashCode
public int hashCode()Hash code.
-