All Packages Class Hierarchy This Package Previous Next Index
Class org.xmlmiddleware.conversions.ConvertObject
java.lang.Object
|
+----org.xmlmiddleware.conversions.ConvertObject
- public class ConvertObject
- extends Object
Converts from Objects to other data types.
- Version:
- 2.0
- Author:
- Ronald Bourret, 2001
-
ConvertObject()
-
-
convertObject(Object, int, StringFormatter)
- Converts an Object to the specified type.
-
toBigDecimal(Object, StringFormatter)
-
-
toBoolean(Object, StringFormatter)
-
-
toBooleanObject(Object, StringFormatter)
-
-
toByte(Object, StringFormatter)
-
-
toByteArray(Object, StringFormatter)
-
-
toByteObject(Object, StringFormatter)
-
-
toDate(Object, StringFormatter)
-
-
toDouble(Object, StringFormatter)
-
-
toDoubleObject(Object, StringFormatter)
-
-
toFloat(Object, StringFormatter)
-
-
toFloatObject(Object, StringFormatter)
-
-
toInteger(Object, StringFormatter)
-
-
toIntegerObject(Object, StringFormatter)
-
-
toLong(Object, StringFormatter)
-
-
toLongObject(Object, StringFormatter)
-
-
toShort(Object, StringFormatter)
-
-
toShortObject(Object, StringFormatter)
-
-
toTime(Object, StringFormatter)
-
-
toTimestamp(Object, StringFormatter)
-
ConvertObject
public ConvertObject()
toByteArray
public static ByteArray toByteArray(Object o,
StringFormatter formatter) throws XMLMiddlewareException
toDouble
public static double toDouble(Object o,
StringFormatter formatter) throws XMLMiddlewareException
toDoubleObject
public static Double toDoubleObject(Object o,
StringFormatter formatter) throws XMLMiddlewareException
toFloat
public static float toFloat(Object o,
StringFormatter formatter) throws XMLMiddlewareException
toFloatObject
public static Float toFloatObject(Object o,
StringFormatter formatter) throws XMLMiddlewareException
toBigDecimal
public static BigDecimal toBigDecimal(Object o,
StringFormatter formatter) throws XMLMiddlewareException
toLong
public static long toLong(Object o,
StringFormatter formatter) throws XMLMiddlewareException
toLongObject
public static Long toLongObject(Object o,
StringFormatter formatter) throws XMLMiddlewareException
toInteger
public static int toInteger(Object o,
StringFormatter formatter) throws XMLMiddlewareException
toIntegerObject
public static Integer toIntegerObject(Object o,
StringFormatter formatter) throws XMLMiddlewareException
toShort
public static short toShort(Object o,
StringFormatter formatter) throws XMLMiddlewareException
toShortObject
public static Short toShortObject(Object o,
StringFormatter formatter) throws XMLMiddlewareException
toByte
public static byte toByte(Object o,
StringFormatter formatter) throws XMLMiddlewareException
toByteObject
public static Byte toByteObject(Object o,
StringFormatter formatter) throws XMLMiddlewareException
toBoolean
public static boolean toBoolean(Object o,
StringFormatter formatter) throws XMLMiddlewareException
toBooleanObject
public static Boolean toBooleanObject(Object o,
StringFormatter formatter) throws XMLMiddlewareException
toDate
public static Date toDate(Object o,
StringFormatter formatter) throws XMLMiddlewareException
toTime
public static Time toTime(Object o,
StringFormatter formatter) throws XMLMiddlewareException
toTimestamp
public static Timestamp toTimestamp(Object o,
StringFormatter formatter) throws XMLMiddlewareException
convertObject
public static Object convertObject(Object o,
int destType,
StringFormatter formatter) throws XMLMiddlewareException
- Converts an Object to the specified type.
- Parameters:
- o - The object to convert.
- destType - A JDBC Types value. The Object is converted to the default
object type for the specified type.
- formatter - An object that implements StringFormatter. If o is a String or
destType is CHAR, VARCHAR, or LONGVARCHAR, this must be non-null.
- Returns:
- The converted object
All Packages Class Hierarchy This Package Previous Next Index