Class ColumnMetaData


  • @Immutable
    public class ColumnMetaData
    extends Object
    Defines the relational column mapping for a table.
    Author:
    Gunnar Morling, Chris Cranford
    • Field Detail

      • columnName

        private final String columnName
      • key

        private final boolean key
      • optional

        private final boolean optional
      • hasDefaultValue

        private final boolean hasDefaultValue
      • defaultValue

        private final Object defaultValue
      • length

        private final int length
      • scale

        private final int scale
      • typeName

        private final String typeName
    • Constructor Detail

      • ColumnMetaData

        ColumnMetaData​(String columnName,
                       PostgresType postgresType,
                       boolean key,
                       boolean optional,
                       boolean hasDefaultValue,
                       Object defaultValue,
                       int typeModifier)
        Create a metadata structure representing a column.
        Parameters:
        columnName - name of the column; must not be null
        postgresType - postgres database type; must not be null
        key - true if column is part of the primary key, false otherwise
        optional - true if the column is considered optional, false otherwise
        hasDefaultValue - true if the column has a default value specified, false otherwise
        defaultValue - the parsed default value for the column
        typeModifier - the attribute type modifier
    • Method Detail

      • getColumnName

        public String getColumnName()
      • isKey

        public boolean isKey()
      • isOptional

        public boolean isOptional()
      • hasDefaultValue

        public boolean hasDefaultValue()
      • getDefaultValue

        public Object getDefaultValue()
      • getLength

        public int getLength()
      • getScale

        public int getScale()
      • getTypeName

        public String getTypeName()