Table 29-2 lists the Java, IDL, and JDBC/SQL types that EAServer supports for persistent storage using mapped fields. Types on one row are equivalent. The JDBC/SQL column lists the java.sql.Types constants that the storage component uses to bind to the database column. When creating tables, ensure that each column’s type is compatible with the JDBC/SQL type that corresponds to the mapped Java field.
Java field type |
CORBA IDL field type |
JDBC/SQL column type |
---|---|---|
boolean |
boolean |
TINYINT |
char |
char |
CHAR |
byte |
octet |
TINYINT |
short |
short |
SMALLINT |
(N/A) |
unsigned short |
SMALLINT |
int |
long |
INTEGER |
(N/A) |
unsigned long |
INTEGER |
long |
long long |
BIGINT |
(N/A) |
unsigned long long |
BIGINT |
float |
float |
REAL |
double |
double |
FLOAT |
(N/A) |
string |
VARCHAR |
(N/A) |
BCD::Binary |
VARBINARY |
(N/A) |
BCD::Decimal |
DECIMAL |
(N/A) |
BCD::Money |
DECIMAL |
(N/A) |
MJD::Date |
DATE |
(N/A) |
MJD::Time |
TIME |
(N/A) |
MJD::Timestamp |
TIMESTAMP |
java.lang.String |
CtsComponents::StringValue |
VARCHAR |
byte[] |
CtsComponents::BinaryValue |
VARBINARY |
java.lang.Boolean |
CtsComponents::BooleanValue |
TINYINT |
java.lang.Character |
CtsComponents::CharValue |
CHAR |
java.lang.Byte |
CtsComponents::OctetValue |
TINYINT |
java.lang.Short |
CtsComponents::ShortValue |
SMALLINT |
(N/A) |
CtsComponents::UShortValue |
SMALLINT |
java.lang.Integer |
CtsComponents::LongValue |
INTEGER |
(N/A) |
CtsComponents::ULongValue |
INTEGER |
java.lang.Long |
CtsComponents::LongLongValue |
BIGINT |
java.lang.Float |
CtsComponents::FloatValue |
REAL |
java.lang.Double |
CtsComponents::DoubleValue |
FLOAT |
java.lang.BigDecimal |
CtsComponents::DecimalValue |
DECIMAL |
(N/A) |
CtsComponents::MoneyValue |
DECIMAL |
java.sql.Date |
CtsComponents::DateValue |
DATE |
java.sql.Time |
CtsComponents::TimeValue |
TIME |
java.sql.Timestamp |
CtsComponents::TimestampValue |
TIMESTAMP |
java.lang.Object (as primary key) |
Xdt::IntegerValue |
IDENTITY |
Serializable Java object |
(N/A) |
VARBINARY |
Values that can be null If a field can contain nulls, do not use a primitive type. Instead, use the CtsComponents::TypeValue IDL type and the equivalent Java object type. For example, rather than float, use CtsComponents::FloatValue and java.lang.Float.
Copyright © 2005. Sybase Inc. All rights reserved. |