|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | ||||||||
java.lang.Objectjava.lang.Enum<DataType>
com.healthmarketscience.jackcess.DataType
public enum DataType
Access data type
| Enum Constant Summary | |
|---|---|
BINARY
Corresponds to a java byte[] of max length 255 bytes. |
|
BOOLEAN
Corresponds to a java Boolean. |
|
BYTE
Corresponds to a java Byte. |
|
DOUBLE
Corresponds to a java Double. |
|
FLOAT
Corresponds to a java Float. |
|
GUID
Corresponds to a java String with the pattern "{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}". |
|
INT
Corresponds to a java Short. |
|
LONG
Corresponds to a java Integer. |
|
MEMO
Corresponds to a java String of max length 8388607 chars. |
|
MONEY
Corresponds to a java BigDecimal with at most 4 decimal places. |
|
NUMERIC
Corresponds to a java BigDecimal. |
|
OLE
Corresponds to a java byte[] of max length 16777215 bytes. |
|
SHORT_DATE_TIME
Corresponds to a java Date. |
|
TEXT
Corresponds to a java String of max length 255 chars. |
|
UNKNOWN_0D
Unknown data. |
|
| Method Summary | |
|---|---|
static DataType |
fromByte(byte b)
|
static DataType |
fromSQLType(int sqlType)
|
static DataType |
fromSQLType(int sqlType,
int lengthInUnits)
|
int |
getDefaultPrecision()
|
int |
getDefaultScale()
|
int |
getDefaultSize()
|
int |
getFixedSize()
|
boolean |
getHasScalePrecision()
|
int |
getMaxPrecision()
|
int |
getMaxScale()
|
int |
getMaxSize()
|
int |
getMinPrecision()
|
int |
getMinScale()
|
int |
getMinSize()
|
int |
getSQLType()
|
int |
getUnitSize()
|
byte |
getValue()
|
boolean |
isLongValue()
|
boolean |
isTrueVariableLength()
|
boolean |
isValidPrecision(int precision)
|
boolean |
isValidScale(int scale)
|
boolean |
isValidSize(int size)
|
boolean |
isVariableLength()
|
static DataType |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static DataType[] |
values()
Returns an array containing the constants of this enum type, in the order they're declared. |
| Methods inherited from class java.lang.Enum |
|---|
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Enum Constant Detail |
|---|
public static final DataType BOOLEAN
null (which is
considered false). Equivalent to SQL Types.BOOLEAN.
public static final DataType BYTE
Number.byteValue()), Boolean as 1 or 0, any Object converted to a
String and parsed as Double, or null. Equivalent to SQL
Types.TINYINT, Types.BIT.
public static final DataType INT
Number.shortValue()), Boolean as 1 or 0, any Object converted to a
String and parsed as Double, or null. Equivalent to SQL
Types.SMALLINT.
public static final DataType LONG
Number.intValue()), Boolean as 1 or 0, any Object converted to a
String and parsed as Double, or null. Equivalent to SQL
Types.INTEGER, Types.BIGINT.
public static final DataType MONEY
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.
public static final DataType FLOAT
Number.floatValue()), Boolean as 1 or 0, any Object converted to a
String and parsed as Double, or null. Equivalent to SQL
Types.FLOAT.
public static final DataType DOUBLE
Number.doubleValue()), Boolean as 1 or 0, any Object converted to a
String and parsed as Double, or null. Equivalent to SQL
Types.DOUBLE, Types.REAL.
public static final DataType SHORT_DATE_TIME
Number.longValue()), or null. Equivalent to SQL
Types.TIMESTAMP, Types.DATE, Types.TIME.
public static final DataType BINARY
byte[] of max length 255 bytes. Accepts a
byte[], or null. Equivalent to SQL Types.BINARY,
Types.VARBINARY.
public static final DataType TEXT
null.
Equivalent to SQL Types.VARCHAR, Types.CHAR.
public static final DataType OLE
byte[] of max length 16777215 bytes.
Accepts a byte[], or null. Equivalent to SQL
Types.LONGVARBINARY, Types.BLOB.
public static final DataType MEMO
null.
Equivalent to SQL Types.LONGVARCHAR, Types.CLOB.
public static final DataType UNKNOWN_0D
null.
public static final DataType GUID
"{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}". Accepts any
Object converted to a String matching this pattern (surrounding "{}" are
optional, so UUIDs are supported), or null.
public static final DataType NUMERIC
Number.doubleValue()), a BigInteger, a BigDecimal, Boolean as 1 or
0, any Object converted to a String and parsed as BigDecimal, or
null. Equivalent to SQL Types.NUMERIC.
| Method Detail |
|---|
public static final DataType[] values()
for(DataType c : DataType.values())
System.out.println(c);
public static DataType valueOf(String name)
name - the name of the enum constant to be returned.
IllegalArgumentException - if this enum type has no constant
with the specified namepublic byte getValue()
public boolean isVariableLength()
public boolean isTrueVariableLength()
public boolean isLongValue()
public boolean getHasScalePrecision()
public int getFixedSize()
public int getMinSize()
public int getDefaultSize()
public int getMaxSize()
public int getSQLType()
throws SQLException
SQLExceptionpublic int getMinScale()
public int getDefaultScale()
public int getMaxScale()
public int getMinPrecision()
public int getDefaultPrecision()
public int getMaxPrecision()
public int getUnitSize()
public boolean isValidSize(int size)
public boolean isValidScale(int scale)
public boolean isValidPrecision(int precision)
public static DataType fromByte(byte b)
throws IOException
IOException
public static DataType fromSQLType(int sqlType)
throws SQLException
SQLException
public static DataType fromSQLType(int sqlType,
int lengthInUnits)
throws SQLException
SQLException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | ||||||||