IBM Branch Transformation Toolkit Javadoc

com.ibm.btt.cs.invoker.base
Class TypedDataConverter

java.lang.Object
  extended bycom.ibm.btt.cs.invoker.base.TypedDataConverter

public class TypedDataConverter
extends java.lang.Object

Provides all TypedData Converter APIs for C/S Connectivity usage


Constructor Summary
TypedDataConverter()
           
 
Method Summary
 java.lang.String formatDateType(java.lang.Object value, java.util.Locale locale, Hashtable parameters)
          Formats the Object using the locale as arguments.
 java.lang.String formatFloatType(java.lang.Object value, Hashtable parameters)
          Formats the Object.
 java.lang.String formatIntegerType(java.lang.Object value, Hashtable parameters)
          Formats the Integer Object .
 java.lang.String formatNumericStringType(java.lang.Object value, java.util.Locale locale, Hashtable parameters)
          Formats the NumericString Object This method tries to get the parameters required for the conversion from the Hashtable passed as an argument.
 java.lang.String formatStringType(java.lang.Object value, Hashtable parameters)
          Formats the String Object.
 java.lang.String formatTimeType(java.lang.Object value, java.util.Locale locale, Hashtable parameters)
          Formats the Time Object
protected  long parse(java.lang.String aString, int aByteOrdering, int aSize, boolean aSign)
          Converts a String to a char[] and then converts the char[] to a Java long.
 java.lang.Object unformatDateType(java.lang.String dateAsString, java.util.Locale locale, Hashtable parameters)
          Converts a String representing a Date object into another Date.
 java.lang.Object unformatFloatType(java.lang.String floatAsString, Hashtable parameters)
          Converts the stream into a Float or Double (depending on the size attribute) The parameters required by this converter are taken from the Hashtable passed as an argument.
 java.lang.Object unformatIntegerType(java.lang.String integerAsString, Hashtable parameters)
          Converts a String representing an Integer into another Integer.
 java.lang.Object unformatNumericStringType(java.lang.String aNumberAsString, java.util.Locale locale, Hashtable parameters)
          Converts a String representing a Number into another Number.
 java.lang.Object unformatStringType(java.lang.String aString, Hashtable parameters)
          Converts a String into another String.
 java.lang.Object unformatTimeType(java.lang.String dateAsString, java.util.Locale locale, Hashtable parameters)
          Converts a String representing a Date into another Date.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypedDataConverter

public TypedDataConverter()
Method Detail

formatDateType

public java.lang.String formatDateType(java.lang.Object value,
                                       java.util.Locale locale,
                                       Hashtable parameters)
                                throws DSETypeException
Formats the Object using the locale as arguments. The parameters required by this converter are taken from the Hashtable.

Parameters:
value - Object
locale - Locale
parameters - com.ibm.btt.base.Hashtable
Throws:
DSETypeException - - If formatting is unsuccessful

unformatDateType

public java.lang.Object unformatDateType(java.lang.String dateAsString,
                                         java.util.Locale locale,
                                         Hashtable parameters)
                                  throws DSETypeException
Converts a String representing a Date object into another Date.

Parameters:
dateAsString - java.lang.String
parameters - com.ibm.btt.base.Hashtable
locale - java.util.Locale
Returns:
java.lang.Object
Throws:
DSETypeException

formatFloatType

public java.lang.String formatFloatType(java.lang.Object value,
                                        Hashtable parameters)
                                 throws DSETypeException
Formats the Object. This method tries to get the parameters required for the conversion from the Hashtable passed as an argument.

Parameters:
value - Object
parameters - com.ibm.btt.base.Hashtable
Returns:
String formatted String
Throws:
DSETypeException - - If formatting is unsuccessful

unformatFloatType

public java.lang.Object unformatFloatType(java.lang.String floatAsString,
                                          Hashtable parameters)
                                   throws DSETypeException
Converts the stream into a Float or Double (depending on the size attribute) The parameters required by this converter are taken from the Hashtable passed as an argument.

Parameters:
floatAsString - String
parameters - com.ibm.btt.base.Hashtable
Returns:
Object unformatted object
Throws:
DSETypeException - - If formatting is unsuccessful

formatIntegerType

public java.lang.String formatIntegerType(java.lang.Object value,
                                          Hashtable parameters)
                                   throws DSETypeException
Formats the Integer Object . This method tries to get the parameters required for the conversion from the Hashtable passed as an argument.

Parameters:
value - Object
parameters - com.ibm.btt.base.Hashtable
Returns:
String formattet String
Throws:
DSETypeException - - If formatting is unsuccessful

unformatIntegerType

public java.lang.Object unformatIntegerType(java.lang.String integerAsString,
                                            Hashtable parameters)
                                     throws DSETypeException
Converts a String representing an Integer into another Integer.

Parameters:
integerAsString - String
parameters - com.ibm.btt.base.Hashtable
Returns:
Object unformatted Object
Throws:
DSETypeException - - If formatting is unsuccessful

formatNumericStringType

public java.lang.String formatNumericStringType(java.lang.Object value,
                                                java.util.Locale locale,
                                                Hashtable parameters)
                                         throws DSETypeException
Formats the NumericString Object This method tries to get the parameters required for the conversion from the Hashtable passed as an argument.

Parameters:
value - Object
locale - Locale
parameters - com.ibm.btt.base.Hashtable
Returns:
String formatted String
Throws:
java.io.IOException - - If an I/O error occurs
DSETypeException

unformatNumericStringType

public java.lang.Object unformatNumericStringType(java.lang.String aNumberAsString,
                                                  java.util.Locale locale,
                                                  Hashtable parameters)
                                           throws DSETypeException
Converts a String representing a Number into another Number.

Parameters:
aNumberAsString - java.lang.String
locale - java.util.Locale;
parameters - com.ibm.btt.base.Hashtable
Returns:
java.lang.Object
Throws:
DSETypeException

formatStringType

public java.lang.String formatStringType(java.lang.Object value,
                                         Hashtable parameters)
                                  throws DSETypeException
Formats the String Object.

Parameters:
value - Object
parameters - com.ibm.btt.base.Hashtable
Returns:
String formatted String
Throws:
java.io.IOException - - If an I/O error occurs
DSETypeException

unformatStringType

public java.lang.Object unformatStringType(java.lang.String aString,
                                           Hashtable parameters)
                                    throws DSETypeException
Converts a String into another String.

Parameters:
aString - java.lang.String
parameters - com.ibm.btt.base.Hashtable
Returns:
java.lang.Object
Throws:
DSETypeException

formatTimeType

public java.lang.String formatTimeType(java.lang.Object value,
                                       java.util.Locale locale,
                                       Hashtable parameters)
                                throws DSETypeException
Formats the Time Object

Parameters:
value - Object
parameters - com.ibm.btt.base.Hashtable
Returns:
String formatted String
Throws:
DSETypeException

unformatTimeType

public java.lang.Object unformatTimeType(java.lang.String dateAsString,
                                         java.util.Locale locale,
                                         Hashtable parameters)
                                  throws DSETypeException
Converts a String representing a Date into another Date.

Parameters:
dateAsString - java.lang.String
locale - java.util.Locale;
parameters - com.ibm.btt.base.Hashtable
Returns:
java.lang.Object
Throws:
DSETypeException

parse

protected long parse(java.lang.String aString,
                     int aByteOrdering,
                     int aSize,
                     boolean aSign)
Converts a String to a char[] and then converts the char[] to a Java long.

Parameters:
aString - java.lang.String
Returns:
long

IBM Branch Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2005