Class ColumnType

    • Field Detail

      • m_Type

        protected int m_Type
        java sql type.
      • m_Size

        protected int m_Size
        size of type.
    • Constructor Detail

      • ColumnType

        public ColumnType​(int type)
        Constructor.
        Parameters:
        type - java sql type
      • ColumnType

        public ColumnType​(int type,
                          int size)
        Constructor.
        Parameters:
        type - java sql type
        size - size e.g for varchar
    • Method Detail

      • getType

        public int getType()
        Returns the type.
        Returns:
        the type
      • getSize

        public int getSize()
        Returns the size.
        Returns:
        the size
      • getCompareType

        public String getCompareType​(AbstractDatabaseConnection conn)
        Get a string representation of this type for comparison purposes.
        Returns:
        string representation of this type
      • equivalentTo

        public boolean equivalentTo​(AbstractDatabaseConnection conn,
                                    ColumnType type)
        True if given type if equivalent to this object.
        Parameters:
        type - sql type
        Returns:
        equivalent?
      • isEncompassed

        public boolean isEncompassed​(AbstractDatabaseConnection conn,
                                     ColumnType type)
        True if given type if encompassed to this object, ie if this type is at most the size of the provided one.
        Parameters:
        type - sql type
        Returns:
        encompassed
      • toString

        public String toString()
        toString.
        Overrides:
        toString in class Object
        Returns:
        string representation