Interface Column

  • All Known Implementing Classes:
    ColumnImpl

    public interface Column
    Interface representing a column in a table.
    • Method Detail

      • getName

        String getName()
        Accessor for the column name.
        Returns:
        Name of column
      • getTable

        Table getTable()
        Accessor for the table for this column.
        Returns:
        The table
      • getMemberColumnMapping

        MemberColumnMapping getMemberColumnMapping()
        Accessor for the mapping (and hence member) that owns this column.
        Returns:
        The associated mapping (or null if this is a surrogate column)
      • isPrimaryKey

        boolean isPrimaryKey()
        Whether this column is (part of) the primary key
        Returns:
        Whether part of the PK
      • setPrimaryKey

        Column setPrimaryKey()
        Mutator to make the column (part of) the primary key.
        Returns:
        This column
      • setNullable

        Column setNullable​(boolean nullable)
        Mutator for the nullability of the column.
        Parameters:
        nullable - Whether this is nullable
        Returns:
        The column with the updated info
      • isNullable

        boolean isNullable()
        Accessor for whether the column is nullable in the datastore.
        Returns:
        whether the column is nullable
      • setDefaultable

        Column setDefaultable​(Object defaultValue)
        Mutator for the defaultability of the column.
        Parameters:
        defaultValue - The default to use
        Returns:
        The column with the updated info
      • isDefaultable

        boolean isDefaultable()
        Accessor for whether the column is defaultable.
        Returns:
        whether the column is defaultable
      • getDefaultValue

        Object getDefaultValue()
        Accessor for the default Value
        Returns:
        the default value
      • setUnique

        Column setUnique​(boolean unique)
        Mutator for the uniqueness of the column.
        Parameters:
        unique - The flag
        Returns:
        The column with the updated info
      • isUnique

        boolean isUnique()
        Accessor for whether the column is unique.
        Returns:
        whether the column is unique
      • getColumnType

        ColumnType getColumnType()
        Accessor for the role that this column serves (if known).
        Returns:
        Role of the column
      • getJdbcType

        JdbcType getJdbcType()
        Accessor for the JDBC Type used for this column.
        Returns:
        The Jdbc type
      • getTypeName

        String getTypeName()
        Accessor for the native type name in the datastore for this column.
        Returns:
        The column type name
      • setPosition

        Column setPosition​(int pos)
      • getPosition

        int getPosition()
        Accessor for the position of this column in the table (if specified).
        Returns:
        The position, or -1 if not specified
      • getColumnMetaData

        ColumnMetaData getColumnMetaData()
        Accessor for the metadata for this column (if any).
        Returns:
        Metadata for the column