org.hydrateframework
Class Types

java.lang.Object
  extended by org.hydrateframework.Types

public class Types
extends java.lang.Object

Version:
@(#)$Revision: 1.6 $
Author:
David Chamberlin

Field Summary
static char[] arrayNotSetchar
           
static Currency[] arrayNotSetCurrency
           
static java.util.Date[] arrayNotSetDate
           
static double[] arrayNotSetdouble
           
static int[] arrayNotSetint
           
static java.lang.String[] arrayNotSetString
           
static byte[] blobNotSet
          "Not Set" value for a Blob
static Currency ccyNotSet
          "Not Set" value for a Currency
static java.util.Date dateNotSet
          "Not Set" value for a Date or Time
protected static org.apache.commons.logging.Log m_log
           
static HydrateObject objNotSet
          "Not Set" value for an HydrateObject
static java.lang.String strNotSet
          "Not Set" value for a String
static java.lang.String strUNKNOWN
          Unknown value for a String
 
Constructor Summary
Types()
           
 
Method Summary
static java.text.Collator getCollator()
           
static java.text.DateFormat getDateFormat()
          return a standard date formatter that can be used to when a text version of a date needs to be generated or parsed.
static java.text.NumberFormat getDoubleFormat()
           
static java.text.DateFormat getTimeFormat()
          return a standard date formatter that can be used to when a text version of a time needs to be generated or parsed.
static java.text.DateFormat getTimestampFormat()
          return a standard date formatter that can be used to when a text version of a date needs to be generated or parsed.
static java.lang.Object readArrayFromString(java.lang.String str, java.lang.Class cls)
           
static byte[] readByteArray(java.sql.ResultSet rs, int colIdx)
          Helper method to read a ResultSet column into a byte array
static byte[] readBytesFromHex(java.lang.String hex)
           
static java.lang.String writeArrayToString(java.lang.Object objs)
           
static java.lang.String writeBytesToHex(byte[] bytes)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_log

protected static final org.apache.commons.logging.Log m_log

strUNKNOWN

public static final java.lang.String strUNKNOWN
Unknown value for a String

See Also:
Constant Field Values

strNotSet

public static final java.lang.String strNotSet
"Not Set" value for a String

See Also:
Constant Field Values

blobNotSet

public static final byte[] blobNotSet
"Not Set" value for a Blob


arrayNotSetString

public static final java.lang.String[] arrayNotSetString

arrayNotSetint

public static final int[] arrayNotSetint

arrayNotSetdouble

public static final double[] arrayNotSetdouble

arrayNotSetchar

public static final char[] arrayNotSetchar

arrayNotSetDate

public static final java.util.Date[] arrayNotSetDate

arrayNotSetCurrency

public static final Currency[] arrayNotSetCurrency

ccyNotSet

public static final Currency ccyNotSet
"Not Set" value for a Currency


objNotSet

public static final HydrateObject objNotSet
"Not Set" value for an HydrateObject


dateNotSet

public static final java.util.Date dateNotSet
"Not Set" value for a Date or Time

Constructor Detail

Types

public Types()
Method Detail

readByteArray

public static byte[] readByteArray(java.sql.ResultSet rs,
                                   int colIdx)
                            throws java.sql.SQLException
Helper method to read a ResultSet column into a byte array

Parameters:
rs - the result set for which the column is to be read
colIdx - the 1-based column number to read
Returns:
a byte array indicating the data read
Throws:
java.sql.SQLException

getDateFormat

public static java.text.DateFormat getDateFormat()
return a standard date formatter that can be used to when a text version of a date needs to be generated or parsed. Date formatters are not thread safe and this method avoids having to create a date format object each time it is used by associating an object with the thread.

Returns:
the standard date formatter

getTimestampFormat

public static java.text.DateFormat getTimestampFormat()
return a standard date formatter that can be used to when a text version of a date needs to be generated or parsed.

Returns:
the standard date formatter

getTimeFormat

public static java.text.DateFormat getTimeFormat()
return a standard date formatter that can be used to when a text version of a time needs to be generated or parsed.

Returns:
the standard time formatter

getDoubleFormat

public static java.text.NumberFormat getDoubleFormat()

writeBytesToHex

public static java.lang.String writeBytesToHex(byte[] bytes)

readBytesFromHex

public static byte[] readBytesFromHex(java.lang.String hex)

readArrayFromString

public static java.lang.Object readArrayFromString(java.lang.String str,
                                                   java.lang.Class cls)

writeArrayToString

public static java.lang.String writeArrayToString(java.lang.Object objs)

getCollator

public static java.text.Collator getCollator()


Copyright © 2000 The Hydrate Project. All Rights Reserved.