Enum DataType

    • Enum Constant Detail

      • BOOLEAN

        public static final DataType BOOLEAN
        Corresponds to a java Boolean. Accepts Boolean or null (which is considered false). Equivalent to SQL Types.BOOLEAN.
      • MONEY

        public static final DataType MONEY
        Corresponds to a java BigDecimal with at most 4 decimal places. Accepts any Number (using Number.doubleValue()), a BigInteger, a BigDecimal (with at most 4 decimal places), Boolean as 1 or 0, any Object converted to a String and parsed as BigDecimal, or null. Equivalent to SQL Types.DECIMAL.
      • BINARY

        public static final DataType BINARY
        Corresponds to a java byte[] of max length 255 bytes. Accepts a byte[], or null. Equivalent to SQL Types.BINARY, Types.VARBINARY.
      • GUID

        public static final DataType GUID
        Corresponds to a java String with the pattern "{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}", also known as a "Replication ID" in Access. Accepts any Object converted to a String matching this pattern (surrounding "{}" are optional, so UUIDs are supported), or null.
      • BIG_BINARY

        public static final DataType BIG_BINARY
        A fixed length binary column longer than the 255 byte BINARY, which the engine calls "BigBinary". Only the Data column of MSysAccessObjects uses it, which holds the forms, reports and VBA of the database. Jet4 only, since Jet3 used BINARY for that column and the ACE engine dropped the table. Handled like a fixed length BINARY/OLE.
      • COMPLEX_TYPE

        public static final DataType COMPLEX_TYPE
        Complex type corresponds to a special LONG autonumber field which is the key for a secondary table which holds the "real" data.
      • UNSUPPORTED_FIXEDLEN

        public static final DataType UNSUPPORTED_FIXEDLEN
        Dummy type for a fixed length type which is not currently supported. Handled like a fixed length BINARY.
      • UNSUPPORTED_VARLEN

        public static final DataType UNSUPPORTED_VARLEN
        Placeholder type for a variable length type which is not currently supported. Handled like BINARY.
    • Method Detail

      • values

        public static DataType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (DataType c : DataType.values())
            System.out.println(c);
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static DataType valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • getValue

        public byte getValue()
      • isVariableLength

        public boolean isVariableLength()
      • isTrueVariableLength

        public boolean isTrueVariableLength()
      • isLongValue

        public boolean isLongValue()
      • getHasScalePrecision

        public boolean getHasScalePrecision()
      • getFixedSize

        public int getFixedSize()
      • getFixedSize

        public int getFixedSize​(Short colLength)
      • getMinSize

        public int getMinSize()
      • getDefaultSize

        public int getDefaultSize()
      • getMaxSize

        public int getMaxSize()
      • getMinScale

        public int getMinScale()
      • getDefaultScale

        public int getDefaultScale()
      • getMaxScale

        public int getMaxScale()
      • getMinPrecision

        public int getMinPrecision()
      • getDefaultPrecision

        public int getDefaultPrecision()
      • getMaxPrecision

        public int getMaxPrecision()
      • getUnitSize

        public int getUnitSize()
      • getUnitSize

        public int getUnitSize​(JetFormat format)
      • toUnitSize

        public int toUnitSize​(int size)
      • toUnitSize

        public int toUnitSize​(int size,
                              JetFormat format)
      • fromUnitSize

        public int fromUnitSize​(int unitSize)
      • fromUnitSize

        public int fromUnitSize​(int unitSize,
                                JetFormat format)
      • isValidSize

        public boolean isValidSize​(int size)
      • isValidScale

        public boolean isValidScale​(int scale)
      • isValidPrecision

        public boolean isValidPrecision​(int precision)
      • toValidSize

        public int toValidSize​(int size)
      • toValidScale

        public int toValidScale​(int scale)
      • toValidPrecision

        public int toValidPrecision​(int precision)
      • isTextual

        public boolean isTextual()
      • mayBeAutoNumber

        public boolean mayBeAutoNumber()
      • isMultipleAutoNumberAllowed

        public boolean isMultipleAutoNumberAllowed()
      • isUnsupported

        public boolean isUnsupported()