Module eclipselink
Class TypeConversionConverter
java.lang.Object
org.eclipse.persistence.mappings.converters.TypeConversionConverter
- All Implemented Interfaces:
Serializable,CoreConverter<DatabaseMapping,,Session> org.eclipse.persistence.internal.descriptors.ClassNameConversionRequired,Converter
public class TypeConversionConverter
extends Object
implements Converter, org.eclipse.persistence.internal.descriptors.ClassNameConversionRequired
Purpose: Type conversion converters are used to explicitly map a database type to a
Java type.
- See Also:
- Author:
- James Sutherland
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Class<?> Field typeprotected Stringprotected DatabaseMappingprotected Class<?> Object typeprotected String -
Constructor Summary
ConstructorsConstructorDescriptionPUBLIC: Default constructor.TypeConversionConverter(DatabaseMapping mapping) PUBLIC: Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidconvertClassNamesToClasses(ClassLoader classLoader) INTERNAL: Convert all the class-name-based settings in this converter to actual class-based settings.convertDataValueToObjectValue(Object fieldValue, Session session) INTERNAL: The field value must first be converted to the field type, then the attribute type.convertObjectValueToDataValue(Object attributeValue, Session session) INTERNAL: Convert to the field class.Class<?> PUBLIC: Returns the class type of the data value.INTERNAL: Return the name of the data type for the MW usage.protected DatabaseMappingINTERNAL: Return the mapping.Class<?> PUBLIC: Returns the class type of the object value.INTERNAL: Return the name of the object type for the MW usage.voidinitialize(DatabaseMapping mapping, Session session) INTERNAL: Set the mapping.booleanINTERNAL: If the converter converts the value to a non-atomic value, i.e.voidsetDataClass(Class<?> dataClass) PUBLIC: Set the class type of the data value.voidsetDataClassName(String dataClassName) INTERNAL: Set the name of the data type for the MW usage.voidsetObjectClass(Class<?> objectClass) PUBLIC: Set the class type of the object value.voidsetObjectClassName(String objectClassName) INTERNAL: Set the name of the object type for the MW usage.
-
Field Details
-
mapping
-
dataClass
Field type -
dataClassName
-
objectClass
Object type -
objectClassName
-
-
Constructor Details
-
TypeConversionConverter
public TypeConversionConverter()PUBLIC: Default constructor. -
TypeConversionConverter
PUBLIC: Default constructor.
-
-
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. This method is implemented by subclasses as necessary.- Specified by:
convertClassNamesToClassesin interfaceorg.eclipse.persistence.internal.descriptors.ClassNameConversionRequired
-
convertDataValueToObjectValue
INTERNAL: The field value must first be converted to the field type, then the attribute type.- Specified by:
convertDataValueToObjectValuein interfaceConverter- Specified by:
convertDataValueToObjectValuein interfaceCoreConverter<DatabaseMapping,Session>
-
getObjectClass
PUBLIC: Returns the class type of the object value. -
getObjectClassName
INTERNAL: Return the name of the object type for the MW usage. -
getDataClass
PUBLIC: Returns the class type of the data value. -
getDataClassName
INTERNAL: Return the name of the data type for the MW usage. -
setDataClass
PUBLIC: Set the class type of the data value. -
setDataClassName
INTERNAL: Set the name of the data type for the MW usage. -
setObjectClass
PUBLIC: Set the class type of the object value. -
setObjectClassName
INTERNAL: Set the name of the object type for the MW usage. -
convertObjectValueToDataValue
INTERNAL: Convert to the field class.- Specified by:
convertObjectValueToDataValuein interfaceConverter- Specified by:
convertObjectValueToDataValuein interfaceCoreConverter<DatabaseMapping,Session>
-
initialize
INTERNAL: Set the mapping.- Specified by:
initializein interfaceConverter- Specified by:
initializein interfaceCoreConverter<DatabaseMapping,Session>
-
getMapping
INTERNAL: Return the mapping. -
isMutable
public boolean isMutable()INTERNAL: If the converter converts the value to a non-atomic value, i.e. a value that can have its' parts changed without being replaced, then it must return false, serialization can be non-atomic.
-