org.nuxeo.ecm.directory.sql.repository
Class Column
java.lang.Object
org.nuxeo.ecm.directory.sql.repository.Column
- All Implemented Interfaces:
- java.io.Serializable
public class Column
- extends java.lang.Object
- implements java.io.Serializable
An SQL column
.
- Author:
- Florent Guillaume
- See Also:
- Serialized Form
Constructor Summary |
Column(java.lang.String name,
int sqlType,
java.lang.String key)
Creates a new column with the given name and SQL type. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Column
public Column(java.lang.String name,
int sqlType,
java.lang.String key)
- Creates a new column with the given name and SQL type.
- Parameters:
name
- the column name.sqlType
- the SQL type.key
- the associated field name.
getName
public java.lang.String getName()
getQuotedName
public java.lang.String getQuotedName(Dialect dialect)
getSqlType
public int getSqlType()
getKey
public java.lang.String getKey()
setIdentity
public void setIdentity(boolean identity)
isIdentity
public boolean isIdentity()
setPrimary
public void setPrimary(boolean primary)
isPrimary
public boolean isPrimary()
getLength
public int getLength()
setLength
public void setLength(int length)
getPrecision
public int getPrecision()
setPrecision
public void setPrecision(int scale)
getScale
public int getScale()
setScale
public void setScale(int scale)
setNullable
public void setNullable(boolean nullable)
isNullable
public boolean isNullable()
getDefaultValue
public java.lang.String getDefaultValue()
setDefaultValue
public void setDefaultValue(java.lang.String defaultValue)
getSqlTypeString
public java.lang.String getSqlTypeString(Dialect dialect)
getFromResultSet
public java.io.Serializable getFromResultSet(java.sql.ResultSet rs,
int columnIndex)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Copyright © 2010 Nuxeo SAS. All Rights Reserved.