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

Constructor Index

 o ConvertObject()

Method Index

 o convertObject(Object, int, StringFormatter)
Converts an Object to the specified type.
 o toBigDecimal(Object, StringFormatter)
 o toBoolean(Object, StringFormatter)
 o toBooleanObject(Object, StringFormatter)
 o toByte(Object, StringFormatter)
 o toByteArray(Object, StringFormatter)
 o toByteObject(Object, StringFormatter)
 o toDate(Object, StringFormatter)
 o toDouble(Object, StringFormatter)
 o toDoubleObject(Object, StringFormatter)
 o toFloat(Object, StringFormatter)
 o toFloatObject(Object, StringFormatter)
 o toInteger(Object, StringFormatter)
 o toIntegerObject(Object, StringFormatter)
 o toLong(Object, StringFormatter)
 o toLongObject(Object, StringFormatter)
 o toShort(Object, StringFormatter)
 o toShortObject(Object, StringFormatter)
 o toTime(Object, StringFormatter)
 o toTimestamp(Object, StringFormatter)

Constructors

 o ConvertObject
 public ConvertObject()

Methods

 o toByteArray
 public static ByteArray toByteArray(Object o,
                                     StringFormatter formatter) throws XMLMiddlewareException
 o toDouble
 public static double toDouble(Object o,
                               StringFormatter formatter) throws XMLMiddlewareException
 o toDoubleObject
 public static Double toDoubleObject(Object o,
                                     StringFormatter formatter) throws XMLMiddlewareException
 o toFloat
 public static float toFloat(Object o,
                             StringFormatter formatter) throws XMLMiddlewareException
 o toFloatObject
 public static Float toFloatObject(Object o,
                                   StringFormatter formatter) throws XMLMiddlewareException
 o toBigDecimal
 public static BigDecimal toBigDecimal(Object o,
                                       StringFormatter formatter) throws XMLMiddlewareException
 o toLong
 public static long toLong(Object o,
                           StringFormatter formatter) throws XMLMiddlewareException
 o toLongObject
 public static Long toLongObject(Object o,
                                 StringFormatter formatter) throws XMLMiddlewareException
 o toInteger
 public static int toInteger(Object o,
                             StringFormatter formatter) throws XMLMiddlewareException
 o toIntegerObject
 public static Integer toIntegerObject(Object o,
                                       StringFormatter formatter) throws XMLMiddlewareException
 o toShort
 public static short toShort(Object o,
                             StringFormatter formatter) throws XMLMiddlewareException
 o toShortObject
 public static Short toShortObject(Object o,
                                   StringFormatter formatter) throws XMLMiddlewareException
 o toByte
 public static byte toByte(Object o,
                           StringFormatter formatter) throws XMLMiddlewareException
 o toByteObject
 public static Byte toByteObject(Object o,
                                 StringFormatter formatter) throws XMLMiddlewareException
 o toBoolean
 public static boolean toBoolean(Object o,
                                 StringFormatter formatter) throws XMLMiddlewareException
 o toBooleanObject
 public static Boolean toBooleanObject(Object o,
                                       StringFormatter formatter) throws XMLMiddlewareException
 o toDate
 public static Date toDate(Object o,
                           StringFormatter formatter) throws XMLMiddlewareException
 o toTime
 public static Time toTime(Object o,
                           StringFormatter formatter) throws XMLMiddlewareException
 o toTimestamp
 public static Timestamp toTimestamp(Object o,
                                     StringFormatter formatter) throws XMLMiddlewareException
 o 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