java.lang.Object
org.nuxeo.ecm.core.storage.sql.jdbc.db.Column
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
DialectPostgreSQL.ArraySubQueryPostgreSQL.ArraySubQueryPostgreSQLColumn

public class Column extends Object implements Serializable
An SQL column.
Author:
Florent Guillaume
See Also:
  • Field Details

    • table

      protected final Table table
    • dialect

      protected final Dialect dialect
    • physicalName

      protected final String physicalName
  • Constructor Details

    • Column

      public Column(Table table, String physicalName, ColumnType type, String key)
      Creates a new column with the given name and type.
      Parameters:
      table - the column's table
      physicalName - the column physical name
      type - the column's type
      key - the associated field name
    • Column

      public Column(Column column, Table table)
      Creates a column from an existing column and an aliased table.
  • Method Details

    • getTable

      public Table getTable()
    • getPhysicalName

      public String getPhysicalName()
    • getQuotedName

      public String getQuotedName()
    • getFullQuotedName

      public String getFullQuotedName()
    • getJdbcType

      public int getJdbcType()
    • getJdbcBaseType

      public int getJdbcBaseType()
    • getType

      public ColumnType getType()
    • getBaseType

      public ColumnType getBaseType()
    • getFreeVariableSetter

      public String getFreeVariableSetter()
    • isArray

      public boolean isArray()
    • isOpaque

      public boolean isOpaque()
    • checkJdbcType

      public String checkJdbcType(int actual, String actualName, int actualSize)
    • getJDBCTypeName

      protected static String getJDBCTypeName(int expected)
    • getKey

      public String getKey()
    • setIdentity

      public void setIdentity(boolean identity)
    • isIdentity

      public boolean isIdentity()
    • setPrimary

      public void setPrimary(boolean primary)
    • isPrimary

      public boolean isPrimary()
    • setNullable

      public void setNullable(boolean nullable)
    • isNullable

      public boolean isNullable()
    • getDefaultValue

      public String getDefaultValue()
    • setDefaultValue

      public void setDefaultValue(String defaultValue)
    • setReferences

      public void setReferences(Table foreignTable, String foreignKey)
    • getForeignTable

      public Table getForeignTable()
    • getForeignKey

      public String getForeignKey()
    • getSqlTypeString

      public String getSqlTypeString()
    • getSqlBaseTypeString

      public String getSqlBaseTypeString()
    • setToPreparedStatement

      public void setToPreparedStatement(PreparedStatement ps, int index, Serializable value) throws SQLException
      Throws:
      SQLException
    • getFromResultSet

      public Serializable getFromResultSet(ResultSet rs, int index) throws SQLException
      Throws:
      SQLException
    • toString

      public String toString()
      Overrides:
      toString in class Object