public class TypeConversionConverter extends Object implements Converter
Modifier and Type | Field and Description |
---|---|
protected Class |
dataClass
Field type
|
protected String |
dataClassName |
protected DatabaseMapping |
mapping |
protected Class |
objectClass
Object type
|
protected String |
objectClassName |
Constructor and Description |
---|
TypeConversionConverter()
PUBLIC:
Default constructor.
|
TypeConversionConverter(DatabaseMapping mapping)
PUBLIC:
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
convertClassNamesToClasses(ClassLoader classLoader)
INTERNAL:
Convert all the class-name-based settings in this converter to actual class-based
settings.
|
Object |
convertDataValueToObjectValue(Object fieldValue,
Session session)
INTERNAL:
The field value must first be converted to the field type, then the attribute type.
|
Object |
convertObjectValueToDataValue(Object attributeValue,
Session session)
INTERNAL:
Convert to the field class.
|
Class |
getDataClass()
PUBLIC:
Returns the class type of the data value.
|
String |
getDataClassName()
INTERNAL:
Return the name of the data type for the MW usage.
|
protected DatabaseMapping |
getMapping()
INTERNAL:
Return the mapping.
|
Class |
getObjectClass()
PUBLIC:
Returns the class type of the object value.
|
String |
getObjectClassName()
INTERNAL:
Return the name of the object type for the MW usage.
|
void |
initialize(DatabaseMapping mapping,
Session session)
INTERNAL:
Set the mapping.
|
boolean |
isMutable()
INTERNAL:
If the converter converts the value to a non-atomic value, i.e.
|
void |
setDataClass(Class dataClass)
PUBLIC:
Set the class type of the data value.
|
void |
setDataClassName(String dataClassName)
INTERNAL:
Set the name of the data type for the MW usage.
|
void |
setObjectClass(Class objectClass)
PUBLIC:
Set the class type of the object value.
|
void |
setObjectClassName(String objectClassName)
INTERNAL:
Set the name of the object type for the MW usage.
|
protected DatabaseMapping mapping
protected Class dataClass
protected String dataClassName
protected Class objectClass
protected String objectClassName
public TypeConversionConverter()
public TypeConversionConverter(DatabaseMapping mapping)
public void convertClassNamesToClasses(ClassLoader classLoader)
classLoader
- public Object convertDataValueToObjectValue(Object fieldValue, Session session)
convertDataValueToObjectValue
in interface Converter
public Class getObjectClass()
public String getObjectClassName()
public Class getDataClass()
public String getDataClassName()
public void setDataClass(Class dataClass)
public void setDataClassName(String dataClassName)
public void setObjectClass(Class objectClass)
public void setObjectClassName(String objectClassName)
public Object convertObjectValueToDataValue(Object attributeValue, Session session)
convertObjectValueToDataValue
in interface Converter
public void initialize(DatabaseMapping mapping, Session session)
initialize
in interface Converter
protected DatabaseMapping getMapping()
Copyright © 2022. All rights reserved.