类 Column
- java.lang.Object
-
- org.hibernate.mapping.Column
-
- 所有已实现的接口:
Serializable,Cloneable,Selectable
- 直接已知子类:
ExportableColumn
public class Column extends Object implements Selectable, Serializable, Cloneable
A column of a relational database table- 作者:
- Gavin King
- 另请参阅:
- 序列化表格
-
-
字段概要
字段 修饰符和类型 字段 说明 static intDEFAULT_LENGTHstatic intDEFAULT_PRECISIONstatic intDEFAULT_SCALE
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 Columnclone()Shallow copy, the value is not copiedbooleanequals(Object object)booleanequals(Column column)StringgetAlias(Dialect dialect)StringgetAlias(Dialect dialect, Table table)Generate a column alias that is unique across multiple tablesStringgetCanonicalName()StringgetCheckConstraint()StringgetComment()StringgetCustomRead()StringgetCustomWrite()StringgetDefaultValue()intgetLength()StringgetName()intgetPrecision()StringgetQuotedName()returns quoted name as it would be in the mapping file.StringgetQuotedName(Dialect d)StringgetReadExpr(Dialect dialect)intgetScale()StringgetSqlType()StringgetSqlType(Dialect dialect, Mapping mapping)IntegergetSqlTypeCode()Returns the underlying columns sqltypecode.intgetSqlTypeCode(Mapping mapping)StringgetTemplate(Dialect dialect, SQLFunctionRegistry functionRegistry)StringgetText()StringgetText(Dialect d)intgetTypeIndex()ValuegetValue()StringgetWriteExpr()booleanhasCheckConstraint()booleanhasCustomRead()inthashCode()booleanisFormula()booleanisNullable()booleanisQuoted()booleanisUnique()voidsetCheckConstraint(String checkConstraint)voidsetComment(String comment)voidsetCustomRead(String customRead)voidsetCustomWrite(String customWrite)voidsetDefaultValue(String defaultValue)voidsetLength(int length)voidsetName(String name)voidsetNullable(boolean nullable)voidsetPrecision(int scale)voidsetScale(int scale)voidsetSqlType(String sqlType)voidsetSqlTypeCode(Integer typeCode)voidsetTypeIndex(int typeIndex)voidsetUnique(boolean unique)voidsetValue(Value value)StringtoString()
-
-
-
构造器详细资料
-
Column
public Column()
-
Column
public Column(String columnName)
-
-
方法详细资料
-
getLength
public int getLength()
-
setLength
public void setLength(int length)
-
getValue
public Value getValue()
-
setValue
public void setValue(Value value)
-
getName
public String getName()
-
setName
public void setName(String name)
-
getQuotedName
public String getQuotedName()
returns quoted name as it would be in the mapping file.
-
getAlias
public String getAlias(Dialect dialect)
- 指定者:
getAlias在接口中Selectable
-
getAlias
public String getAlias(Dialect dialect, Table table)
Generate a column alias that is unique across multiple tables- 指定者:
getAlias在接口中Selectable
-
isNullable
public boolean isNullable()
-
setNullable
public void setNullable(boolean nullable)
-
getTypeIndex
public int getTypeIndex()
-
setTypeIndex
public void setTypeIndex(int typeIndex)
-
isUnique
public boolean isUnique()
-
equals
public boolean equals(Column column)
-
getSqlTypeCode
public int getSqlTypeCode(Mapping mapping) throws MappingException
- 抛出:
MappingException
-
getSqlTypeCode
public Integer getSqlTypeCode()
Returns the underlying columns sqltypecode. If null, it is because the sqltype code is unknown. Use #getSqlTypeCode(Mapping) to retrieve the sqltypecode used for the columns associated Value/Type.- 返回:
- sqlTypeCode if it is set, otherwise null.
-
setSqlTypeCode
public void setSqlTypeCode(Integer typeCode)
-
getSqlType
public String getSqlType(Dialect dialect, Mapping mapping) throws HibernateException
-
getSqlType
public String getSqlType()
-
setSqlType
public void setSqlType(String sqlType)
-
setUnique
public void setUnique(boolean unique)
-
isQuoted
public boolean isQuoted()
-
getCheckConstraint
public String getCheckConstraint()
-
setCheckConstraint
public void setCheckConstraint(String checkConstraint)
-
hasCheckConstraint
public boolean hasCheckConstraint()
-
getTemplate
public String getTemplate(Dialect dialect, SQLFunctionRegistry functionRegistry)
- 指定者:
getTemplate在接口中Selectable
-
hasCustomRead
public boolean hasCustomRead()
-
getWriteExpr
public String getWriteExpr()
-
isFormula
public boolean isFormula()
- 指定者:
isFormula在接口中Selectable
-
getText
public String getText(Dialect d)
- 指定者:
getText在接口中Selectable
-
getText
public String getText()
- 指定者:
getText在接口中Selectable
-
getPrecision
public int getPrecision()
-
setPrecision
public void setPrecision(int scale)
-
getScale
public int getScale()
-
setScale
public void setScale(int scale)
-
getComment
public String getComment()
-
setComment
public void setComment(String comment)
-
getDefaultValue
public String getDefaultValue()
-
setDefaultValue
public void setDefaultValue(String defaultValue)
-
getCustomWrite
public String getCustomWrite()
-
setCustomWrite
public void setCustomWrite(String customWrite)
-
getCustomRead
public String getCustomRead()
-
setCustomRead
public void setCustomRead(String customRead)
-
getCanonicalName
public String getCanonicalName()
-
-