Class Overview
A column of a relational database table
Summary
Protected Methods |
Object
|
clone()
Shallow copy, the value is not copied
|
Constants
public
static
final
int
DEFAULT_LENGTH
Constant Value:
255
(0x000000ff)
public
static
final
int
DEFAULT_PRECISION
Constant Value:
19
(0x00000013)
public
static
final
int
DEFAULT_SCALE
Constant Value:
2
(0x00000002)
Public Constructors
public
Column
(String columnName)
Public Methods
public
boolean
equals
(Object object)
public
boolean
equals
(Column column)
public
String
getAlias
(Dialect dialect)
For any column name, generate an alias that is unique
to that column name, and also 10 characters or less
in length.
Generate a column alias that is unique across multiple tables
public
String
getCanonicalName
()
public
String
getCheckConstraint
()
public
String
getCustomRead
()
public
String
getCustomWrite
()
public
String
getDefaultValue
()
public
int
getPrecision
()
public
String
getQuotedName
()
returns quoted name as it would be in the mapping file.
public
int
getSqlTypeCode
(Mapping mapping)
public
Integer
getSqlTypeCode
()
Returns the underlying columns sqltypecode.
If null, it is because the sqltype code is unknown.
Use #getSqlTypeCode(Mapping) to retreive the sqltypecode used
for the columns associated Value/Type.
Returns
- sqltypecode if it is set, otherwise null.
public
int
getTypeIndex
()
public
boolean
hasCheckConstraint
()
public
boolean
hasCustomRead
()
public
boolean
isFormula
()
public
boolean
isNullable
()
public
boolean
isQuoted
()
public
boolean
isUnique
()
public
void
setCheckConstraint
(String checkConstraint)
public
void
setComment
(String comment)
public
void
setCustomRead
(String customRead)
public
void
setCustomWrite
(String customWrite)
public
void
setDefaultValue
(String defaultValue)
public
void
setLength
(int length)
public
void
setName
(String name)
public
void
setNullable
(boolean nullable)
public
void
setPrecision
(int scale)
public
void
setScale
(int scale)
public
void
setSqlType
(String sqlType)
public
void
setSqlTypeCode
(Integer typecode)
public
void
setTypeIndex
(int typeIndex)
public
void
setUnique
(boolean unique)
public
void
setValue
(Value value)
Protected Methods
protected
Object
clone
()
Shallow copy, the value is not copied