Skip Headers

# Creating Custom Data Types

Previous

Next

TopLink provides support for all the most common Java data types. Table: Mapping Extensions for Custom Data Types lists the TopLink mapping extensions that you can use to support custom data types. You can also create your object converter to allow conversion between a data type and your own Java type.

Mapping Extensions for Custom Data Types

Extension | Description
--- | ---
"Object Type Converter" | An extension of direct and direct collection mappings that lets you match a fixed number of data values to Java objects. Use this converter when the values in the schema differ from those in Java
"Serialized Object Converter" | An extension of direct and direct collection mappings that lets you map serializable objects, such as multimedia data, to a binary format in a data source, such as a base64 element in an XML document or Binary Large Object (BLOB) field in a database
"Type Conversion Converter" | An extension of direct and direct collection mappings that lets you explicitly map a data source type to a Java type. For example, a `java.util.Date` in Java can be mapped to a `java.sql.Date` in the data source.
"Simple Type Translator" | An extension of direct and direct collection mappings that lets you automatically translate an XML element value to an appropriate Java type based on the element's `<type>` attribute as defined in your XML schema.