Class VarcharDataType

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable

    public final class VarcharDataType
    extends DataType
    See Also:
    Serialized Form
    • Field Detail

      • ENCODING_INLINE_VARSIZE

        public static final java.lang.String ENCODING_INLINE_VARSIZE
        See Also:
        Constant Field Values
      • ENCODING_ALPHANUMERIC

        public static final java.lang.String ENCODING_ALPHANUMERIC
        See Also:
        Constant Field Values
      • ENCODING

        public static final java.lang.String[] ENCODING
      • ENCODING_TYPE

        public static final int[] ENCODING_TYPE
    • Constructor Detail

      • VarcharDataType

        public VarcharDataType​(java.lang.String encoding,
                               boolean nullable,
                               boolean inMultiLine)
    • Method Detail

      • extractSize

        public static int extractSize​(java.lang.String encoding)
                               throws java.text.ParseException
        Throws:
        java.text.ParseException
      • getBaseName

        public java.lang.String getBaseName()
        Specified by:
        getBaseName in class DataType
      • parseEncoding

        public void parseEncoding​(java.lang.String encoding)
        Overrides:
        parseEncoding in class DataType
      • assertValidImpl

        protected void assertValidImpl​(java.lang.Object obj)
        Description copied from class: DataType
        Checks a non-null Boxed value against constraints, if any. If the object is of unsupported type, this method should throw DataType.unsupportedType(java.lang.Object).
        Specified by:
        assertValidImpl in class DataType
        Parameters:
        obj - A Boxed representation of a value.
      • toBoxedImpl

        protected java.lang.Object toBoxedImpl​(java.lang.CharSequence text)
        Description copied from class: DataType
        Parse non-null text and return an object without checking constraints.
        Specified by:
        toBoxedImpl in class DataType
      • toStringImpl

        protected java.lang.String toStringImpl​(java.lang.Object obj)
        Description copied from class: DataType
        Converts a non-null, constraint-compliant Boxed value to String.
        Specified by:
        toStringImpl in class DataType
        Parameters:
        obj - A non-null, valid value.
        Returns:
        A String representation.
      • isMultiLine

        public boolean isMultiLine()
      • getEncodingType

        public int getEncodingType()
      • getLength

        public int getLength()
      • getEncodingAlphanumeric

        public static java.lang.String getEncodingAlphanumeric​(int length)
      • isAlphanumeric

        public boolean isAlphanumeric()
      • writeTo

        public void writeTo​(java.io.DataOutputStream out)
                     throws java.io.IOException
        Overrides:
        writeTo in class DataType
        Throws:
        java.io.IOException