Skip Headers

# Configuring a JAXB Typesafe Enumeration Converter

Previous

Next

The JAXB typesafe enumeration converter allows you to automatically translate an XML element value to an appropriate typesafe enumeration value as defined in your XML schema.

For more information, see "Mappings and JAXB Typesafe Enumerations".

Table: Mapping Support for JAXB Typesafe Enumeration Converter summarizes which mappings support this option.

Mapping Support for JAXB Typesafe Enumeration Converter

Mapping | Using TopLink Workbench | Using Java
--- | --- | ---
EIS Mappings Foot 1 |  |
EIS Direct Mapping |  |
EIS Composite Direct Collection Mapping |  |
XML Mappings |  |
XML Direct Mapping |  |
XML Composite Direct Collection Mapping |  |

Footnote 1 When used with XML records only (see "Configuring Record Format").

TopLink Workbench does not support the `JAXBTypesafeEnumConverter` directly: to configure a mapping with this converter, you must use Java to create an amendment method (see "Using Java").

If you create a project and object model using the TopLink JAXB compiler (see "Creating an XML Project From an XML Schema"), the compiler will create the type safe enumeration class and a class with descriptor amendment methods and register the required amendment methods automatically (see "Typesafe Enumeration Converter Amendment Method DescriptorAfterLoads Class").