Class DataDescriptorEntry

  • All Implemented Interfaces:
    Comparable
    Direct Known Subclasses:
    ColumnDescriptorEntry

    public class DataDescriptorEntry
    extends Object
    implements Comparable
    Describes a column in an SQL database in a platform and vendor neutral way.

    Created by Jeff Gaynor
    on 8/30/11 at 2:34 PM

    • Constructor Detail

      • DataDescriptorEntry

        public DataDescriptorEntry​(String name,
                                   int type)
      • DataDescriptorEntry

        public DataDescriptorEntry​(String name,
                                   int type,
                                   boolean nullable)
    • Method Detail

      • isNullable

        public boolean isNullable()
        If this column may be nulled.
        Update for version 5.0+: Changed default from false to true since non primary key entries consistently blow up. If this is to be required, set it explicitly to true now.
        Returns:
      • setNullable

        public void setNullable​(boolean nullable)
      • getName

        public String getName()
        The name for this column. This will be used in the resulting table.
        Returns:
      • setName

        public void setName​(String name)
      • getType

        public int getType()
        it is strongly suggested that you use Types since these are stable and pretty easily map to most interesting data types. These (within rather narrow limits) are converted by the database abstraction layer to the correct underlying data type. E.g. a BLOB would become a LONG VARCHAR FOR BIT DATA in a DB2 implementation.
        Returns:
      • setType

        public void setType​(int type)