com.ibm.dse.base.types.ext
Class TimeConverter

java.lang.Object
  |
  +--com.ibm.dse.base.types.AbstractConverter
        |
        +--com.ibm.dse.base.types.ext.TimeConverter

public class TimeConverter
extends AbstractConverter

Converter for business objects of Type Date

See Also:
Serialized Form

Fields inherited from class com.ibm.dse.base.types.AbstractConverter
keyValuePairs
 
Constructor Summary
TimeConverter(java.lang.String[] supportedConversionTypes, java.util.Hashtable keyValuePairs)
          Creates a TimeConverter object.
 
Method Summary
 void formatToWriterForType(java.lang.Object value, java.lang.String conversionType, java.io.Writer writer, PropertyDescription descriptor)
          The value passed as an Object is formatted using the specified conversion type and writer passed as argument.
 void formatToWriterForType(java.lang.Object value, java.lang.String conversionType, java.io.Writer writer, PropertyDescription descriptor, java.util.Locale locale)
          The value passed as an Object is formatted using the specified conversion type, locale and writer passed as argument.
 java.lang.String getMask()
          Gets the value of the mask attribute
 void setAmString(java.lang.String anAmString)
          Sets the value of the amString attribute.
 void setHours24(boolean anHours24)
          Sets the value of the hours24 attribute.
 void setMask(java.lang.String dateMask)
          Sets the value of the mask attribute.
 void setPmString(java.lang.String aPmString)
          Sets the value of the pmString attribute.
 java.lang.Object unformatFromReaderForType(java.io.Reader reader, java.lang.String conversionType, PropertyDescription descriptor)
          Converts the stream passed to an Object using the appropriate conversion Type.
 java.lang.Object unformatFromReaderForType(java.io.Reader reader, java.lang.String conversionType, PropertyDescription descriptor, java.util.Locale locale)
          Uses the reader passed to construct an Object of the correct Type using the appropriate conversion type and locale.
 
Methods inherited from class com.ibm.dse.base.types.AbstractConverter
formatToWriter, formatToWriter, getParameters, getSupportedConversionTypes, supportsConversionType, unformatFromReader, unformatFromReader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimeConverter

public TimeConverter(java.lang.String[] supportedConversionTypes,
                     java.util.Hashtable keyValuePairs)
              throws DSETypeException
Creates a TimeConverter object.
Parameters:
supportedConversionTypes - java.lang.String[]
keyValuePairs - java.util.Hashtable
Throws:
DSETypeException - Conversion types passed to superclass is null or empty.
Method Detail

formatToWriterForType

public void formatToWriterForType(java.lang.Object value,
                                  java.lang.String conversionType,
                                  java.io.Writer writer,
                                  PropertyDescription descriptor)
                           throws java.io.IOException,
                                  DSETypeException
The value passed as an Object is formatted using the specified conversion type and writer passed as argument.
Overrides:
formatToWriterForType in class AbstractConverter
Parameters:
value - Object
conversionType - String
writer - Writer
descriptor - PropertyDescriptor
Throws:
java.io.IOException - if an I/O error occurs

formatToWriterForType

public void formatToWriterForType(java.lang.Object value,
                                  java.lang.String conversionType,
                                  java.io.Writer writer,
                                  PropertyDescription descriptor,
                                  java.util.Locale locale)
                           throws java.io.IOException
The value passed as an Object is formatted using the specified conversion type, locale and writer passed as argument.
Overrides:
formatToWriterForType in class AbstractConverter
Parameters:
value - Object
writer - Writer
descriptor - PropertyDescriptor
locale - Locale
Throws:
java.io.IOException - if an I/O error occurs

getMask

public java.lang.String getMask()
Gets the value of the mask attribute
Returns:
java.lang.String

setAmString

public void setAmString(java.lang.String anAmString)
Sets the value of the amString attribute.
Parameters:
anAmString - java.lang.String

setHours24

public void setHours24(boolean anHours24)
Sets the value of the hours24 attribute.
Parameters:
anHours24 - boolean

setMask

public void setMask(java.lang.String dateMask)
Sets the value of the mask attribute.
Parameters:
dateMask - java.lang.String

setPmString

public void setPmString(java.lang.String aPmString)
Sets the value of the pmString attribute.
Parameters:
aPmString - java.lang.String

unformatFromReaderForType

public java.lang.Object unformatFromReaderForType(java.io.Reader reader,
                                                  java.lang.String conversionType,
                                                  PropertyDescription descriptor)
                                           throws DSETypeException,
                                                  java.io.IOException
Converts the stream passed to an Object using the appropriate conversion Type.
Overrides:
unformatFromReaderForType in class AbstractConverter
Parameters:
reader - Reader
conversionType - String
descriptor - PropertyDescription
Returns:
Object
Throws:
java.io.IOException - An I/O error occurs.
DSETypeException - Unformatting is unsuccessful.

unformatFromReaderForType

public java.lang.Object unformatFromReaderForType(java.io.Reader reader,
                                                  java.lang.String conversionType,
                                                  PropertyDescription descriptor,
                                                  java.util.Locale locale)
                                           throws DSETypeException,
                                                  java.io.IOException
Uses the reader passed to construct an Object of the correct Type using the appropriate conversion type and locale.
Overrides:
unformatFromReaderForType in class AbstractConverter
Parameters:
reader - Reader
conversionType - String
descriptor - PropertyDescription
locale - Locale
Throws:
java.io.IOException - An I/O error occurs.
DSETypeException - Unformatting is unsuccessful.