|
Elexis API documentationVersion 2.1.6 as of December 11 2011 | |||||||||
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}" , also known as a "Replication ID" in
Access. |
|
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. |
|
UNKNOWN_11
Unknown data (seems to be an alternative OLE type, used by MSysAccessObjects table). |
Method Summary | |
---|---|
static DataType |
fromByte(byte b)
|
static DataType |
fromSQLType(int sqlType)
|
static DataType |
fromSQLType(int sqlType,
int lengthInUnits)
|
int |
fromUnitSize(int unitSize)
|
int |
getDefaultPrecision()
|
int |
getDefaultScale()
|
int |
getDefaultSize()
|
int |
getFixedSize()
|
int |
getFixedSize(java.lang.Short colLength)
|
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()
|
int |
toUnitSize(int size)
|
int |
toValidPrecision(int precision)
|
int |
toValidScale(int scale)
|
int |
toValidSize(int size)
|
static DataType |
valueOf(java.lang.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 are 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
public static final DataType GUID
"{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 UUID
s 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
.
public static final DataType UNKNOWN_11
Method Detail |
---|
public static DataType[] values()
for (DataType c : DataType.values()) System.out.println(c);
public static DataType valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.
java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified name
java.lang.NullPointerException
- if the argument is nullpublic byte getValue()
public boolean isVariableLength()
public boolean isTrueVariableLength()
public boolean isLongValue()
public boolean getHasScalePrecision()
public int getFixedSize()
public int getFixedSize(java.lang.Short colLength)
public int getMinSize()
public int getDefaultSize()
public int getMaxSize()
public int getSQLType() throws java.sql.SQLException
java.sql.SQLException
public int getMinScale()
public int getDefaultScale()
public int getMaxScale()
public int getMinPrecision()
public int getDefaultPrecision()
public int getMaxPrecision()
public int getUnitSize()
public int toUnitSize(int size)
public int fromUnitSize(int unitSize)
public boolean isValidSize(int size)
public boolean isValidScale(int scale)
public boolean isValidPrecision(int precision)
public int toValidSize(int size)
public int toValidScale(int scale)
public int toValidPrecision(int precision)
public static DataType fromByte(byte b) throws java.io.IOException
java.io.IOException
public static DataType fromSQLType(int sqlType) throws java.sql.SQLException
java.sql.SQLException
public static DataType fromSQLType(int sqlType, int lengthInUnits) throws java.sql.SQLException
java.sql.SQLException
|
Elexis API documentationVersion 2.1.6 as of December 11 2011 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |