public class ConversionManager extends CoreConversionManager implements java.io.Serializable, java.lang.Cloneable
Purpose: Contains the conversion routines for some common classes in the system. Primarily used to convert objects from a given database type to a different type in Java. Uses a singleton instance, this is also used from the platform.
Responsibilities:
Constructor and Description |
---|
ConversionManager() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
INTERNAL:
|
java.lang.Class |
convertClassNameToClass(java.lang.String className)
PUBLIC:
Resolve the given String className into a class using this
ConversionManager's classloader.
|
java.lang.Object |
convertObject(java.lang.Object sourceObject,
java.lang.Class javaClass)
Convert the object to the appropriate type by invoking the appropriate
ConversionManager method
|
java.util.Vector |
getDataTypesConvertedFrom(java.lang.Class javaClass)
PUBLIC:
Return the list of Classes that can be converted to from the passed in javaClass.
|
java.util.Vector |
getDataTypesConvertedTo(java.lang.Class javaClass)
PUBLIC:
Return the list of Classes that can be converted from to the passed in javaClass.
|
static java.lang.ClassLoader |
getDefaultLoader()
INTERNAL:
Get the default class loader to use if no instance-level loader is set
|
static ConversionManager |
getDefaultManager()
A singleton conversion manager is used to handle generic conversions.
|
java.lang.Object |
getDefaultNullValue(java.lang.Class theClass)
INTERNAL:
Allow for the null values for classes to be defaulted in one place.
|
java.util.Map |
getDefaultNullValues()
INTERNAL:
Allow for the null values for classes to be defaulted in one place.
|
java.lang.ClassLoader |
getLoader()
INTERNAL:
|
static java.lang.Class |
getObjectClass(java.lang.Class javaClass)
INTERNAL:
This is used to determine the wrapper class for a primitive.
|
static java.lang.Class |
getPrimitiveClass(java.lang.String classType)
INTERNAL:
Returns a class based on the passed in string.
|
boolean |
hasDefaultNullValues()
INTERNAL
|
static java.lang.Class |
loadClass(java.lang.String className)
INTERNAL:
Load the class using the default managers class loader.
|
static void |
setDefaultLoader(java.lang.ClassLoader classLoader)
INTERNAL:
Set the default class loader to use if no instance-level loader is set
|
static void |
setDefaultManager(ConversionManager theManager)
A singleton conversion manager is used to handle generic conversions.
|
void |
setDefaultNullValue(java.lang.Class theClass,
java.lang.Object theValue)
INTERNAL:
Allow for the null values for classes to be defaulted in one place.
|
void |
setDefaultNullValues(java.util.Map defaultNullValues)
INTERNAL:
Allow for the null values for classes to be defaulted in one place.
|
void |
setLoader(java.lang.ClassLoader classLoader)
INTERNAL:
|
void |
setShouldUseClassLoaderFromCurrentThread(boolean useCurrentThread)
ADVANCED:
This flag should be set if the current thread classLoader should be used.
|
boolean |
shouldUseClassLoaderFromCurrentThread()
ADVANCED:
This flag should be set if the current thread classLoader should be used.
|
public java.lang.Object clone()
clone
in class java.lang.Object
public java.lang.Object convertObject(java.lang.Object sourceObject, java.lang.Class javaClass) throws ConversionException
convertObject
in class CoreConversionManager
object
- - the object that must be convertedjavaClass
- - the class that the object must be converted to-
- ConversionException, all exceptions will be thrown as this type.ConversionException
public java.lang.Class convertClassNameToClass(java.lang.String className) throws ConversionException
ConversionException
public static ConversionManager getDefaultManager()
public java.lang.Object getDefaultNullValue(java.lang.Class theClass)
public java.util.Map getDefaultNullValues()
public java.lang.ClassLoader getLoader()
getLoader
in class CoreConversionManager
public boolean hasDefaultNullValues()
public static java.lang.Class loadClass(java.lang.String className)
public static java.lang.Class getObjectClass(java.lang.Class javaClass)
public static java.lang.Class getPrimitiveClass(java.lang.String classType)
public static void setDefaultManager(ConversionManager theManager)
public void setDefaultNullValue(java.lang.Class theClass, java.lang.Object theValue)
public void setDefaultNullValues(java.util.Map defaultNullValues)
public void setLoader(java.lang.ClassLoader classLoader)
public static void setDefaultLoader(java.lang.ClassLoader classLoader)
public static java.lang.ClassLoader getDefaultLoader()
public void setShouldUseClassLoaderFromCurrentThread(boolean useCurrentThread)
public boolean shouldUseClassLoaderFromCurrentThread()
public java.util.Vector getDataTypesConvertedFrom(java.lang.Class javaClass)
javaClass
- - the class that is converted frompublic java.util.Vector getDataTypesConvertedTo(java.lang.Class javaClass)
javaClass
- - the class that is converted toEclipseLink 2.6.3, "build v20160428-59c81c5" API Reference