Class DefaultInfoImpl

    • Field Detail

      • defaultValue

        private DataValueDescriptor defaultValue
        This class implements Formatable. That means that it can write itself to and from a formatted stream. If you add more fields to this class, make sure that you also write/read them with the writeExternal()/readExternal() methods. If, inbetween releases, you add more fields to this class, then you should bump the version number emitted by the getTypeFormatId() method.
      • defaultText

        private java.lang.String defaultText
      • type

        private int type
      • referencedColumnNames

        private java.lang.String[] referencedColumnNames
      • originalCurrentSchema

        private java.lang.String originalCurrentSchema
      • BITS_MASK_IS_DEFAULTVALUE_AUTOINC

        private static final int BITS_MASK_IS_DEFAULTVALUE_AUTOINC
        See Also:
        Constant Field Values
      • BITS_MASK_IS_GENERATED_COLUMN

        private static final int BITS_MASK_IS_GENERATED_COLUMN
        See Also:
        Constant Field Values
    • Constructor Detail

      • DefaultInfoImpl

        public DefaultInfoImpl()
        Public niladic constructor. Needed for Formatable interface to work.
      • DefaultInfoImpl

        public DefaultInfoImpl​(boolean isDefaultValueAutoinc,
                               java.lang.String defaultText,
                               DataValueDescriptor defaultValue)
        Constructor for use with numeric types
        Parameters:
        defaultText - The text of the default.
      • DefaultInfoImpl

        public DefaultInfoImpl​(java.lang.String defaultText,
                               java.lang.String[] referencedColumnNames,
                               java.lang.String originalCurrentSchema)
        Constructor for use with generated columns
        Parameters:
        defaultText - Text of generation clause.
        referencedColumnNames - names of other columns in the base row which are mentioned in the generation clause.
        originalCurrentSchema - Schema in effect when the generate column was added to the table.
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • readExternal

        public void readExternal​(java.io.ObjectInput in)
                          throws java.io.IOException,
                                 java.lang.ClassNotFoundException
        Read this object from a stream of stored objects.
        Specified by:
        readExternal in interface java.io.Externalizable
        Parameters:
        in - read this.
        Throws:
        java.io.IOException - thrown on error
        java.lang.ClassNotFoundException - thrown on error
      • writeExternal

        public void writeExternal​(java.io.ObjectOutput out)
                           throws java.io.IOException
        Write this object to a stream of stored objects.
        Specified by:
        writeExternal in interface java.io.Externalizable
        Parameters:
        out - write bytes here.
        Throws:
        java.io.IOException - thrown on error
      • getTypeFormatId

        public int getTypeFormatId()
        Get the formatID which corresponds to this class.
        Specified by:
        getTypeFormatId in interface TypedFormat
        Returns:
        the formatID of this class
      • getDefaultValue

        public DataValueDescriptor getDefaultValue()
        Get the default value. (NOTE: This returns null if the default is not a constant.)
        Returns:
        The default value.
      • setDefaultValue

        public void setDefaultValue​(DataValueDescriptor defaultValue)
        Set the default value.
        Parameters:
        defaultValue - The default value.
      • calcType

        private static int calcType​(boolean isDefaultValueAutoinc)
        This function returns stored value for flags and so on.