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:
| Modifier and Type | Field and Description |
|---|---|
| protected Map | dataTypesConvertedFromAClass
Store the list of Classes that can be converted to from the key. |
| protected Map | dataTypesConvertedToAClass
Store the list of Classes that can be converted from to the key. |
| private static ClassLoader | defaultLoader
Allows the setting of a global default if no instance-level loader is set. |
| protected static ConversionManager | |
| protected Map | |
| private static ZoneId | |
| protected ClassLoader | |
| protected boolean | shouldUseClassLoaderFromCurrentThread
This flag is here if the Conversion Manager should use the class loader on the thread when loading classes. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected List | |
| protected void | |
| protected void | |
| protected List | |
| protected List | |
| protected List | |
| protected List | |
| protected List | |
| protected List | |
| protected List | |
| protected List | |
| protected List | |
| protected List | |
| protected List | |
| protected List | |
| protected List | |
| protected List | |
| protected List | |
| protected List | |
| protected List | |
| protected List | |
| protected List | |
| protected List | |
| protected List | |
| protected List | |
| protected List | |
| protected List | |
| protected List | |
| protected List | |
| protected List | |
| protected List | |
| protected List | |
| protected List | |
| protected List | |
| protected List | |
| protected List | |
| protected List | |
| protected List | |
| protected List | |
| protected List | |
| protected List | |
| protected List | |
| protected List | |
| protected List | |
| protected List | |
| protected List | |
| protected List | |
| protected List | |
| protected List | |
| protected List | |
| protected List | |
| public Object | |
| public <T> Class | convertClassNameToClass(String className)
PUBLIC: Resolve the given String className into a class using this ConversionManager's classloader. |
| public <T> T | Returns: the newly converted objectthe object that must be converted sourceObject, Class<T> the class that the object must be converted to javaClass)Implements abstract org. |
| protected BigDecimal | convertObjectToBigDecimal(Object
Valid instance of String, BigInteger, any Number sourceObject)Build a valid instance of BigDecimal from the given sourceObject |
| protected BigInteger | convertObjectToBigInteger(Object
Valid instance of String, BigDecimal, or any Number sourceObject)Build a valid instance of BigInteger from the provided sourceObject. |
| protected Boolean | convertObjectToBoolean(Object sourceObject)
Build a valid instance of Boolean from the source object. |
| protected Byte | convertObjectToByte(Object
Valid instance of String or any Number sourceObject)Build a valid instance of Byte from the provided sourceObject |
| protected byte[] | convertObjectToByteArray(Object sourceObject)
Build a valid instance of a byte array from the given object. |
| protected Byte[] | convertObjectToByteObjectArray(Object sourceObject)
Build a valid instance of a Byte array from the given object. |
| protected Calendar | convertObjectToCalendar(Object
Valid instance of java.util.Date, String, java.sql.Timestamp, or Long sourceObject)Build a valid instance of java.util.Calendar from the given source object. |
| protected Character | convertObjectToChar(Object
Valid instance of String or any Number sourceObject)Build a valid instance of Character from the provided sourceObject. |
| protected Character[] | convertObjectToCharacterArray(Object sourceObject)
Build a valid instance of a Character array from the given object. |
| protected char[] | convertObjectToCharArray(Object sourceObject)
Build a valid instance of a char array from the given object. |
| protected <T> Class | convertObjectToClass(Object
Valid instance of String sourceObject)Build a valid Class from the string that is passed in |
| protected Date | convertObjectToDate(Object
Object of type java.sql.Timestamp, java.util.Date, String or Long sourceObject)Convert the object to an instance of java.sql.Date. |
| protected Double | convertObjectToDouble(Object
Object of type String or Number. sourceObject)Convert the object to an instance of Double. |
| protected Float | convertObjectToFloat(Object sourceObject)
Build a valid Float instance from a String or another Number instance. |
| protected Integer | convertObjectToInteger(Object sourceObject)
Build a valid Integer instance from a String or another Number instance. |
| protected LocalDate | convertObjectToLocalDate(Object
Valid object of class java.sql.Timestamp, String,
java.util.Date, or Long sourceObject)INTERNAL: Build a valid instance of java.time.LocalDate from the given source object. |
| protected LocalDateTime | convertObjectToLocalDateTime(Object
Valid object of class java.sql.Timestamp, String,
java.util.Date, or Long sourceObject)INTERNAL: Build a valid instance of java.time.LocalDateTime from the given source object. |
| protected LocalTime | convertObjectToLocalTime(Object
Valid object of class java.sql.Timestamp, String,
java.util.Date, or Long sourceObject)INTERNAL: Build a valid instance of java.time.LocalTime from the given source object. |
| protected Long | convertObjectToLong(Object sourceObject)
Build a valid Long instance from a String or another Number instance. |
| protected BigDecimal | convertObjectToNumber(Object sourceObject)
INTERNAL: Build a valid BigDecimal instance from a String or another Number instance. |
| protected OffsetDateTime | convertObjectToOffsetDateTime(Object
Valid object of class java.sql.Timestamp, String,
java.util.Date, or Long sourceObject)INTERNAL: Build a valid instance of java.time.OffsetDateTime from the given source object. |
| protected OffsetTime | convertObjectToOffsetTime(Object
Valid object of class java.sql.Timestamp, String,
java.util.Date, or Long sourceObject)INTERNAL: Build a valid instance of java.time.OffsetTime from the given source object. |
| protected Short | convertObjectToShort(Object sourceObject)
INTERNAL: Build a valid Short instance from a String or another Number instance. |
| protected String | convertObjectToString(Object sourceObject)
INTERNAL: Converts objects to their string representations. |
| protected Time | convertObjectToTime(Object
Valid instance of java.sql.Time, String, java.util.Date, java.sql.Timestamp, or Long sourceObject)INTERNAL: Build a valid instance of java.sql.Time from the given source object. |
| protected Timestamp | convertObjectToTimestamp(Object
Valid object of class java.sql.Timestamp, String, java.util.Date, or Long sourceObject)INTERNAL: Build a valid instance of java.sql.Timestamp from the given source object. |
| protected URL | convertObjectToUrl(Object
Valid instance of java.net.URL, or String sourceObject)INTERNAL: Build a valid instance of java.net.URL from the given source object. |
| protected Date | convertObjectToUtilDate(Object
Valid instance of java.util.Date, String, java.sql.Timestamp, or Long sourceObject)INTERNAL: Build a valid instance of java.util.Date from the given source object. |
| protected UUID | convertObjectToUUID(Object
Valid instance of java.util.UUID, or String sourceObject)INTERNAL: Build a valid instance of java.util.UUID from the given source object. |
| public List | Returns: - a vector of classes- the class that is converted from javaClass)PUBLIC: Return the list of Classes that can be converted to from the passed in javaClass. |
| public List | Returns: - a vector of classes- the class that is converted to javaClass)PUBLIC: Return the list of Classes that can be converted from to the passed in javaClass. |
| public static ClassLoader | Returns: java.lang.ClassLoaderINTERNAL: Get the default class loader to use if no instance-level loader is set |
| public static ConversionManager | |
| public <T> T | getDefaultNullValue(Class<T> theClass)
INTERNAL: Allow for the null values for classes to be defaulted in one place. |
| public Map | |
| private static ZoneId | |
| public ClassLoader | getLoader()
Implements abstract org. |
| public static <T> Class | getObjectClass(Class<?> javaClass)
INTERNAL: This is used to determine the wrapper class for a primitive. |
| public static <T> Class | |
| public boolean | |
| public static <T> Class | |
| public static void | setDefaultLoader(ClassLoader classLoader)
INTERNAL: Set the default class loader to use if no instance-level loader is set |
| public static void | setDefaultManager(ConversionManager theManager)
A singleton conversion manager is used to handle generic conversions. |
| public void | setDefaultNullValue(Class<?> theClass, Object theValue)
INTERNAL: Allow for the null values for classes to be defaulted in one place. |
| public void | setDefaultNullValues(Map<Class<?>, Object> defaultNullValues)
INTERNAL: Allow for the null values for classes to be defaulted in one place. |
| public void | |
| public void | setShouldUseClassLoaderFromCurrentThread(boolean useCurrentThread)
ADVANCED: This flag should be set if the current thread classLoader should be used. |
| public boolean | shouldUseClassLoaderFromCurrentThread()
ADVANCED: This flag should be set if the current thread classLoader should be used. |