user manual
Chapter 17: EJB-QL and Data Access Support 187
Container-managed data access support
Container-managed data access support
For CMP, the Borland EJB Container supports all data types supported by the
JDBC specification, including types beyond those supported by JDBC.
The following table shows the basic and complex types supported by the
Borland EJB Container:
Note The Borland CMP engine now supports using the Long value type for dates,
as well as java.sql.Date for java.util.Date.
Keep in mind that the Borland Container supports classes implementing the
java.io.Serializable interface, such as Hashtable and Vector. The container
supports other data types, such as Java collections or third party collections,
because they also implement java.io.Serializable. For classes and data types
that implement the Serializable interface, the Container merely serializes their
state and stores the result into a BLOB. The Container does not do any "smart"
mapping on these classes or types; it just stores the state in binary format.
The Container's CMP engine observes the following rule: the engine serializes
as a BLOB all types that are not one of the explicitly supported types.
Depending on your database implementation, the following data types require
fetching based on column index:
Note If you use either of the two data types BINARY (MS SQL) or RAW (Oracle) as
primary keys, you must explicitly specify their size.
Basic types: boolean Boolean byte Byte char Character
double Double float Float int Integer
long Long short Short String
java.sql.Date
BigDecimal
java.util.Date
byte[] java.sql.Time
java.sql.TimeStam
p
Complex types: Any class implementing java.io.Serializable, such as
Vector and Hashtable
Other entity bean references
Database Data Types
Oracle ■ LONG RAW
Sybase
■ NTEXT
■ IMAGE
MS SQL
■ NTEXT
■ IMAGE










