Type conversion mappings explicitly map a database type to a Java type. For example, a Number in the database can be mapped to a String in Java, or a java.util.Date in Java can be mapped to a java.sql.Date in the database.
For Oracle9 databases, TopLink supports NCHAR, NAVRCHAR2, and NCLOB database types. Use the Ncharacter, NString, and NClob target types, respectively.
Example 5-6 Type Conversion Mapping Example
Figure 5-11 illustrates a type conversion mapping. Because the java.util.Date class is stored by default as a Timestamp in the database, it must first be converted to an explicit database type such as java.sql.Date (required only for DB2-most other databases have a single date data-type that can store any date or time).
Figure 5-11 Type Conversion Mappings
Copyright © 1997, 2004, Oracle. All rights reserved.