Class ConverterClass<T extends AttributeConverter<X,Y>,X,Y>
- java.lang.Object
-
- org.eclipse.persistence.mappings.converters.ConverterClass<T,X,Y>
-
- All Implemented Interfaces:
java.io.Serializable
,CoreConverter<DatabaseMapping,Session>
,org.eclipse.persistence.internal.descriptors.ClassNameConversionRequired
,Converter
public class ConverterClass<T extends AttributeConverter<X,Y>,X,Y> extends java.lang.Object implements Converter, org.eclipse.persistence.internal.descriptors.ClassNameConversionRequired
A JPA attribute converter class wrapped with an EclipseLink converter. This class is placed directly on mappings.- See Also:
- Serialized Form
- Author:
- Guy Pelletier
- Since:
- Eclipselink 2.5
-
-
Field Summary
Fields Modifier and Type Field Description protected AttributeConverter<X,Y>
attributeConverter
protected java.lang.String
attributeConverterClassName
protected boolean
disableConversion
protected java.lang.Class
fieldClassification
protected java.lang.String
fieldClassificationName
protected boolean
isForMapKey
protected org.eclipse.persistence.internal.sessions.AbstractSession
session
-
Constructor Summary
Constructors Constructor Description ConverterClass(java.lang.String attributeConverterClassName, boolean isForMapKey, java.lang.String fieldClassificationName, boolean disableConversion)
INTERNAL: This method will be called when creating a converter for an embedded mapping attribute.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
convertClassNamesToClasses(java.lang.ClassLoader classLoader)
INTERNAL: Convert all the class-name-based settings in this converter to actual class-based settings.java.lang.Object
convertDataValueToObjectValue(java.lang.Object dataValue, Session session)
INTERNAL:java.lang.Object
convertObjectValueToDataValue(java.lang.Object objectValue, Session session)
INTERNAL:protected AttributeConverter<X,Y>
getAttributeConverter()
void
initialize(DatabaseMapping mapping, Session session)
INTERNAL:boolean
isMutable()
INTERNAL:void
setSession(org.eclipse.persistence.internal.sessions.AbstractSession session)
-
-
-
Field Detail
-
isForMapKey
protected boolean isForMapKey
-
disableConversion
protected boolean disableConversion
-
fieldClassification
protected java.lang.Class fieldClassification
-
fieldClassificationName
protected java.lang.String fieldClassificationName
-
attributeConverterClassName
protected java.lang.String attributeConverterClassName
-
attributeConverter
protected AttributeConverter<X,Y> attributeConverter
-
session
protected org.eclipse.persistence.internal.sessions.AbstractSession session
-
-
Constructor Detail
-
ConverterClass
public ConverterClass(java.lang.String attributeConverterClassName, boolean isForMapKey, java.lang.String fieldClassificationName, boolean disableConversion)
INTERNAL: This method will be called when creating a converter for an embedded mapping attribute. The isForMapKey information will need to be known for proper initialization.
-
-
Method Detail
-
convertClassNamesToClasses
public void convertClassNamesToClasses(java.lang.ClassLoader classLoader)
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 interfaceorg.eclipse.persistence.internal.descriptors.ClassNameConversionRequired
-
convertDataValueToObjectValue
public java.lang.Object convertDataValueToObjectValue(java.lang.Object dataValue, Session session)
INTERNAL:- Specified by:
convertDataValueToObjectValue
in interfaceConverter
- Specified by:
convertDataValueToObjectValue
in interfaceCoreConverter<T extends AttributeConverter<X,Y>,X>
-
convertObjectValueToDataValue
public java.lang.Object convertObjectValueToDataValue(java.lang.Object objectValue, Session session)
INTERNAL:- Specified by:
convertObjectValueToDataValue
in interfaceConverter
- Specified by:
convertObjectValueToDataValue
in interfaceCoreConverter<T extends AttributeConverter<X,Y>,X>
-
initialize
public void initialize(DatabaseMapping mapping, Session session)
INTERNAL:- Specified by:
initialize
in interfaceConverter
- Specified by:
initialize
in interfaceCoreConverter<T extends AttributeConverter<X,Y>,X>
-
setSession
public void setSession(org.eclipse.persistence.internal.sessions.AbstractSession session)
-
getAttributeConverter
protected AttributeConverter<X,Y> getAttributeConverter()
-
-