Module org.eclipse.persistence.moxy
Package org.eclipse.persistence.jaxb
Class JAXBEnumTypeConverter
java.lang.Object
org.eclipse.persistence.mappings.converters.ObjectTypeConverter
org.eclipse.persistence.jaxb.JAXBEnumTypeConverter
- All Implemented Interfaces:
Serializable
,CoreConverter<DatabaseMapping,
,Session> ClassNameConversionRequired
,Converter
INTERNAL:
Purpose:Provide a means to Convert an Enumeration type to/from either a string representation of the enum facet or a user defined value.
Responsibilities:
- Initialize the conversion values to be the Enum facets
- Don't overwrite any existing, user defined conversion value
- See Also:
-
Field Summary
Fields inherited from class org.eclipse.persistence.mappings.converters.ObjectTypeConverter
addToAttributeOnlyConversionValueStrings, attributeToFieldValues, conversionValueStrings, converterName, dataType, dataTypeName, defaultAttributeValue, defaultAttributeValueString, fieldClassification, fieldClassificationName, fieldToAttributeValues, mapping, objectType, objectTypeName
-
Constructor Summary
ConstructorDescriptionJAXBEnumTypeConverter
(Mapping mapping, String enumClassName, boolean usesOrdinalValues) PUBLIC: -
Method Summary
Modifier and TypeMethodDescriptionvoid
convertClassNamesToClasses
(ClassLoader classLoader) INTERNAL: Convert all the class-name-based settings in this converter to actual class-based settings.convertDataValueToObjectValue
(Object fieldValue, Session session) INTERNAL: Returns the corresponding attribute value for the specified field value.void
initialize
(DatabaseMapping mapping, Session session) INTERNAL:boolean
PUBLIC: Returns true if this converter uses ordinal values for the enum conversion.Methods inherited from class org.eclipse.persistence.mappings.converters.ObjectTypeConverter
addConversionValue, addConversionValueStrings, addToAttributeOnlyConversionValue, addToAttributeOnlyConversionValueStrings, convertObjectValueToDataValue, getAttributeToFieldValues, getDefaultAttributeValue, getFieldClassification, getFieldClassification, getFieldClassificationName, getFieldToAttributeValueAssociations, getFieldToAttributeValues, getMapping, initializeFieldClassification, isMutable, loadClass, mapBooleans, mapGenders, mapResponses, setAttributeToFieldValues, setConverterName, setDataTypeName, setDefaultAttributeValue, setDefaultAttributeValueString, setFieldClassification, setFieldClassificationName, setFieldToAttributeValueAssociations, setFieldToAttributeValues, setMapping, setObjectTypeName, throwInitObjectException
-
Constructor Details
-
JAXBEnumTypeConverter
PUBLIC:
-
-
Method Details
-
convertClassNamesToClasses
INTERNAL: Convert all the class-name-based settings in this converter to actual class-based settings. This method is used when converting a project that has been built with class names to a project with classes.- Specified by:
convertClassNamesToClasses
in interfaceClassNameConversionRequired
- Overrides:
convertClassNamesToClasses
in classObjectTypeConverter
-
initialize
INTERNAL:- Specified by:
initialize
in interfaceConverter
- Specified by:
initialize
in interfaceCoreConverter<DatabaseMapping,
Session> - Overrides:
initialize
in classObjectTypeConverter
-
usesOrdinalValues
public boolean usesOrdinalValues()PUBLIC: Returns true if this converter uses ordinal values for the enum conversion. -
convertDataValueToObjectValue
Description copied from class:ObjectTypeConverter
INTERNAL: Returns the corresponding attribute value for the specified field value.- Specified by:
convertDataValueToObjectValue
in interfaceConverter
- Specified by:
convertDataValueToObjectValue
in interfaceCoreConverter<DatabaseMapping,
Session> - Overrides:
convertDataValueToObjectValue
in classObjectTypeConverter
-