Oracle Fusion Middleware Java API Reference for Oracle TopLink
11g Release 1 (11.1.1)

B32476-03

oracle.toplink.mappings.converters
Class EnumTypeConverter

java.lang.Object
  extended by oracle.toplink.mappings.converters.ObjectTypeConverter
      extended by oracle.toplink.mappings.converters.EnumTypeConverter
All Implemented Interfaces:
java.io.Serializable, Converter

public class EnumTypeConverter
extends ObjectTypeConverter

Purpose: Object type converter is used to match a fixed number of database data values to a Java enum object value. It can be used when the values on the database and in the Java differ. To create an object type converter, simply specify the set of conversion value pairs. A default value and one-way conversion are also supported for legacy data situations.

Since:
Toplink 10.1.4RI
See Also:
Serialized Form

Constructor Summary
EnumTypeConverter(DatabaseMapping mapping, java.lang.Class enumClass, boolean useOrdinalValues)
          Creating an enum converter this way will create the conversion values for you using ordinal or name values.
EnumTypeConverter(DatabaseMapping mapping, java.lang.String enumClassName)
          Creating an enum converter this way expects that you will provide the conversion values separately.
 
Method Summary
 
Methods inherited from class oracle.toplink.mappings.converters.ObjectTypeConverter
addConversionValue, addToAttributeOnlyConversionValue, getDefaultAttributeValue, getFieldClassificationName, mapBooleans, mapGenders, mapResponses, setDefaultAttributeValue, setFieldClassificationName
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnumTypeConverter

public EnumTypeConverter(DatabaseMapping mapping,
                         java.lang.Class enumClass,
                         boolean useOrdinalValues)
Creating an enum converter this way will create the conversion values for you using ordinal or name values.


EnumTypeConverter

public EnumTypeConverter(DatabaseMapping mapping,
                         java.lang.String enumClassName)
Creating an enum converter this way expects that you will provide the conversion values separately.


Copyright © 1998, 2010, Oracle. All Rights Reserved.