org.hibernate.metamodel.relational
Class Column

java.lang.Object
  extended by org.hibernate.metamodel.relational.AbstractSimpleValue
      extended by org.hibernate.metamodel.relational.Column
All Implemented Interfaces:
SimpleValue, Value

public class Column
extends AbstractSimpleValue

Models a physical column


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.hibernate.metamodel.relational.Value
Value.JdbcCodes
 
Constructor Summary
protected Column(TableSpecification table, int position, Identifier name)
           
protected Column(TableSpecification table, int position, String name)
           
 
Method Summary
 String getAlias(Dialect dialect)
          For any column name, generate an alias that is unique to that column name, unique across tables, and within alias size constraints determined by Dialect.getMaxAliasLength().
 String getCheckCondition()
           
 Identifier getColumnName()
           
 String getComment()
           
 String getDefaultValue()
           
 String getReadFragment()
           
 Size getSize()
           
 String getSqlType()
           
 String getWriteFragment()
           
 void initialize(ColumnRelationalState state, boolean forceNonNullable, boolean forceUnique)
           
 boolean isNullable()
           
 boolean isUnique()
           
 void setCheckCondition(String checkCondition)
           
 void setComment(String comment)
           
 void setDefaultValue(String defaultValue)
           
 void setNullable(boolean nullable)
           
 void setReadFragment(String readFragment)
           
 void setSize(Size size)
           
 void setSqlType(String sqlType)
           
 void setUnique(boolean unique)
           
 void setWriteFragment(String writeFragment)
           
 String toLoggableString()
          Obtain the string representation of this value usable in log statements.
 
Methods inherited from class org.hibernate.metamodel.relational.AbstractSimpleValue
getDatatype, getPosition, getTable, setDatatype, validateJdbcTypes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Column

protected Column(TableSpecification table,
                 int position,
                 String name)

Column

protected Column(TableSpecification table,
                 int position,
                 Identifier name)
Method Detail

initialize

public void initialize(ColumnRelationalState state,
                       boolean forceNonNullable,
                       boolean forceUnique)

getColumnName

public Identifier getColumnName()

isNullable

public boolean isNullable()

setNullable

public void setNullable(boolean nullable)

isUnique

public boolean isUnique()

setUnique

public void setUnique(boolean unique)

getDefaultValue

public String getDefaultValue()

setDefaultValue

public void setDefaultValue(String defaultValue)

getCheckCondition

public String getCheckCondition()

setCheckCondition

public void setCheckCondition(String checkCondition)

getSqlType

public String getSqlType()

setSqlType

public void setSqlType(String sqlType)

getReadFragment

public String getReadFragment()

setReadFragment

public void setReadFragment(String readFragment)

getWriteFragment

public String getWriteFragment()

setWriteFragment

public void setWriteFragment(String writeFragment)

getComment

public String getComment()

setComment

public void setComment(String comment)

getSize

public Size getSize()

setSize

public void setSize(Size size)

toLoggableString

public String toLoggableString()
Description copied from interface: Value
Obtain the string representation of this value usable in log statements.

Returns:
The loggable representation

getAlias

public String getAlias(Dialect dialect)
Description copied from interface: SimpleValue
For any column name, generate an alias that is unique to that column name, unique across tables, and within alias size constraints determined by Dialect.getMaxAliasLength().

Parameters:
dialect - the dialect.
Returns:
the alias.


Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.