Class Column

  • All Implemented Interfaces:, java.lang.Cloneable, Selectable
    Direct Known Subclasses:

    public class Column
    extends java.lang.Object
    implements Selectable,, java.lang.Cloneable
    A column of a relational database table
    See Also:
    Serialized Form
    • Constructor Detail

      • Column

        public Column()
      • Column

        public Column​(java.lang.String columnName)
    • Method Detail

      • getLength

        public int getLength()
      • setLength

        public void setLength​(int length)
      • getValue

        public Value getValue()
      • setValue

        public void setValue​(Value value)
      • getName

        public java.lang.String getName()
      • setName

        public void setName​(java.lang.String name)
      • getQuotedName

        public java.lang.String getQuotedName()
        returns quoted name as it would be in the mapping file.
      • getQuotedName

        public java.lang.String getQuotedName​(Dialect d)
      • getAlias

        public java.lang.String getAlias​(Dialect dialect,
                                         Table table)
        Generate a column alias that is unique across multiple tables
        Specified by:
        getAlias in interface 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()
      • hashCode

        public int hashCode()
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object object)
        equals in class java.lang.Object
      • equals

        public boolean equals​(Column column)
      • getSqlTypeCode

        public java.lang.Integer getSqlTypeCode()
        Returns the underlying columns SqlTypeCode. If null, it is because the SqlTypeCode 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​(java.lang.Integer typeCode)
      • getSqlType

        public java.lang.String getSqlType()
      • setSqlType

        public void setSqlType​(java.lang.String sqlType)
      • setUnique

        public void setUnique​(boolean unique)
      • isQuoted

        public boolean isQuoted()
      • toString

        public java.lang.String toString()
        toString in class java.lang.Object
      • getCheckConstraint

        public java.lang.String getCheckConstraint()
      • setCheckConstraint

        public void setCheckConstraint​(java.lang.String checkConstraint)
      • hasCheckConstraint

        public boolean hasCheckConstraint()
      • hasCustomRead

        public boolean hasCustomRead()
      • getReadExpr

        public java.lang.String getReadExpr​(Dialect dialect)
      • getWriteExpr

        public java.lang.String getWriteExpr()
      • getText

        public java.lang.String getText()
        Specified by:
        getText in interface Selectable
      • getPrecision

        public int getPrecision()
      • setPrecision

        public void setPrecision​(int scale)
      • getScale

        public int getScale()
      • setScale

        public void setScale​(int scale)
      • getComment

        public java.lang.String getComment()
      • setComment

        public void setComment​(java.lang.String comment)
      • getDefaultValue

        public java.lang.String getDefaultValue()
      • setDefaultValue

        public void setDefaultValue​(java.lang.String defaultValue)
      • getCustomWrite

        public java.lang.String getCustomWrite()
      • setCustomWrite

        public void setCustomWrite​(java.lang.String customWrite)
      • getCustomRead

        public java.lang.String getCustomRead()
      • setCustomRead

        public void setCustomRead​(java.lang.String customRead)
      • getCanonicalName

        public java.lang.String getCanonicalName()
      • clone

        public Column clone()
        Shallow copy, the value is not copied
        clone in class java.lang.Object