public class

Column

extends Object
implements Serializable Cloneable Selectable
java.lang.Object
   ↳ org.hibernate.mapping.Column

Class Overview

A column of a relational database table

Summary

Constants
int DEFAULT_LENGTH
int DEFAULT_PRECISION
int DEFAULT_SCALE
Public Constructors
Column()
Column(String columnName)
Public Methods
boolean equals(Object object)
boolean equals(Column column)
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.
String getAlias(Dialect dialect, Table table)
Generate a column alias that is unique across multiple tables
String getCanonicalName()
String getCheckConstraint()
String getComment()
String getCustomRead()
String getCustomWrite()
String getDefaultValue()
int getLength()
String getName()
int getPrecision()
String getQuotedName(Dialect d)
String getQuotedName()
returns quoted name as it would be in the mapping file.
String getReadExpr(Dialect dialect)
int getScale()
String getSqlType(Dialect dialect, Mapping mapping)
String getSqlType()
int getSqlTypeCode(Mapping mapping)
Integer getSqlTypeCode()
Returns the underlying columns sqltypecode.
String getTemplate(Dialect dialect, SQLFunctionRegistry functionRegistry)
String getText(Dialect d)
String getText()
int getTypeIndex()
Value getValue()
String getWriteExpr()
boolean hasCheckConstraint()
boolean hasCustomRead()
int hashCode()
boolean isFormula()
boolean isNullable()
boolean isQuoted()
boolean isUnique()
void setCheckConstraint(String checkConstraint)
void setComment(String comment)
void setCustomRead(String customRead)
void setCustomWrite(String customWrite)
void setDefaultValue(String defaultValue)
void setLength(int length)
void setName(String name)
void setNullable(boolean nullable)
void setPrecision(int scale)
void setScale(int scale)
void setSqlType(String sqlType)
void setSqlTypeCode(Integer typecode)
void setTypeIndex(int typeIndex)
void setUnique(boolean unique)
void setValue(Value value)
String toString()
Protected Methods
Object clone()
Shallow copy, the value is not copied
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.hibernate.mapping.Selectable

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 ()

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.

public String getAlias (Dialect dialect, Table table)

Generate a column alias that is unique across multiple tables

public String getCanonicalName ()

public String getCheckConstraint ()

public String getComment ()

public String getCustomRead ()

public String getCustomWrite ()

public String getDefaultValue ()

public int getLength ()

public String getName ()

public int getPrecision ()

public String getQuotedName (Dialect d)

public String getQuotedName ()

returns quoted name as it would be in the mapping file.

public String getReadExpr (Dialect dialect)

public int getScale ()

public String getSqlType (Dialect dialect, Mapping mapping)

public String getSqlType ()

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 String getTemplate (Dialect dialect, SQLFunctionRegistry functionRegistry)

public String getText (Dialect d)

public String getText ()

public int getTypeIndex ()

public Value getValue ()

public String getWriteExpr ()

public boolean hasCheckConstraint ()

public boolean hasCustomRead ()

public int hashCode ()

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)

public String toString ()

Protected Methods

protected Object clone ()

Shallow copy, the value is not copied