|
IBM Branch Transformation Toolkit Javadoc | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.dse.base.types.AbstractConverter
com.ibm.dse.base.types.ext.TimeConverter
This is the converter for business objects of the Date type.
Field Summary | |
---|---|
(package private) java.lang.String |
amString
|
(package private) boolean |
hours24
|
(package private) java.lang.String |
mask
|
(package private) java.lang.String |
pmString
|
Fields inherited from class com.ibm.dse.base.types.AbstractConverter |
---|
keyValuePairs |
Fields inherited from interface com.ibm.dse.base.types.TypeConstants |
---|
amended, CONV_TYPE_DEFAULT, CONV_TYPE_HOST, CONV_TYPE_OUTPUT, CONV_TYPE_SER, CONV_TYPE_XML, disabled, hidden, isAmended, isDisabled, isHidden, isMandatory, isOmitted, isReadOnly, mandatory, omitted, readOnly, TYPE_DEFAULT, TYPE_REGISTRY_INIT_SIZE |
Constructor Summary | |
---|---|
TimeConverter()
Creates a TimeConverter object. |
|
TimeConverter(java.lang.String[] supportedConversionTypes,
java.util.Hashtable keyValuePairs)
Creates a TimeConverter object. |
Method Summary | |
---|---|
java.lang.Object |
convertTo(java.lang.Object obj,
java.lang.String convType,
PropertyDescription pd,
boolean byReference,
java.util.Locale locale,
Hashtable parameters)
Converts an input object into a proper object handled by the invoker. |
void |
formatToWriterForType(java.lang.Object value,
java.lang.String conversionType,
java.io.Writer writer,
PropertyDescription descriptor,
Hashtable parameters)
Formats the Object using the specified conversion type and writer passed as arguments. |
void |
formatToWriterForType(java.lang.Object value,
java.lang.String conversionType,
java.io.Writer writer,
PropertyDescription descriptor,
java.util.Locale locale,
Hashtable parameters)
Formats the Object using the specified conversion type, locale, and writer passed as arguments. |
java.lang.String |
getMask()
Returns 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. |
protected java.lang.Object |
unformat(java.lang.String dateAsString,
java.lang.String convType,
PropertyDescription descriptor,
java.util.Locale locale)
Converts a String representing a Date into another Date. |
protected java.lang.Object |
unformat(java.lang.String dateAsString,
java.lang.String convType,
PropertyDescription descriptor,
java.util.Locale locale,
Hashtable parameters)
Converts a String representing a Date into another Date. |
java.lang.Object |
unformatFromReaderForType(java.io.Reader reader,
java.lang.String conversionType,
PropertyDescription descriptor,
Hashtable parameters)
Converts the stream into 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,
Hashtable parameters)
Uses the reader to construct an Object of the correct type using the appropriate conversion type and locale. |
void |
validateParams(PropertyDescription pd)
Validates the externally defined parameters for this converter. |
Methods inherited from class com.ibm.dse.base.types.AbstractConverter |
---|
convertFrom, convertFrom, convertFrom, convertFrom, convertFrom, convertTo, convertTo, convertTo, convertTo, formatToWriter, formatToWriter, formatToWriter, formatToWriterForType, formatToWriterForType, getParameters, getSupportedConversionTypes, readExternal, supportsConversionType, unformatFromReader, unformatFromReader, unformatFromReader, unformatFromReader, unformatFromReaderForType, unformatFromReaderForType, writeExternal |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
java.lang.String amString
java.lang.String pmString
boolean hours24
java.lang.String mask
Constructor Detail |
public TimeConverter() throws DSETypeException
DSETypeException
- - If the supportedConversionTypes parameter passed to the superclass is null or emptypublic TimeConverter(java.lang.String[] supportedConversionTypes, java.util.Hashtable keyValuePairs) throws DSETypeException
supportedConversionTypes
- java.lang.String[]keyValuePairs
- java.util.Hashtable
DSETypeException
- - If the supportedConversionTypes parameter passed to the superclass is null or emptyMethod Detail |
public java.lang.Object convertTo(java.lang.Object obj, java.lang.String convType, PropertyDescription pd, boolean byReference, java.util.Locale locale, Hashtable parameters) throws DSETypeException
convertTo
in interface Conversion
convertTo
in class AbstractConverter
obj
- java.lang.ObjectconvType
- java.lang.Stringpd
- com.ibm.dse.base.types.PropertyDescriptionbyReference
- booleanlocale
- Localeparameters
- com.ibm.dse.base.Hastable
DSETypeException
public void formatToWriterForType(java.lang.Object value, java.lang.String conversionType, java.io.Writer writer, PropertyDescription descriptor, Hashtable parameters) throws java.io.IOException, DSETypeException
formatToWriterForType
in class AbstractConverter
value
- ObjectconversionType
- Stringwriter
- Writerdescriptor
- PropertyDescriptorparameters
- com.ibm.dse.base.Hashtable
java.io.IOException
- - If an I/O error occurs
DSETypeException
public void formatToWriterForType(java.lang.Object value, java.lang.String conversionType, java.io.Writer writer, PropertyDescription descriptor, java.util.Locale locale, Hashtable parameters) throws java.io.IOException
formatToWriterForType
in class AbstractConverter
value
- Objectwriter
- Writerdescriptor
- PropertyDescriptorlocale
- Localeparameters
- com.ibm.dse.base.HashtableconversionType
- String
java.io.IOException
- - If an I/O error occurspublic java.lang.String getMask()
public void setAmString(java.lang.String anAmString)
anAmString
- java.lang.Stringpublic void setHours24(boolean anHours24)
anHours24
- booleanpublic void setMask(java.lang.String dateMask)
dateMask
- java.lang.Stringpublic void setPmString(java.lang.String aPmString)
aPmString
- java.lang.Stringprotected java.lang.Object unformat(java.lang.String dateAsString, java.lang.String convType, PropertyDescription descriptor, java.util.Locale locale) throws DSETypeException
unformat
in class AbstractConverter
locale
- java.util.Locale;convType
- java.lang.Stringdescriptor
- com.ibm.dse.base.types.PropertyDescription
DSETypeException
protected java.lang.Object unformat(java.lang.String dateAsString, java.lang.String convType, PropertyDescription descriptor, java.util.Locale locale, Hashtable parameters) throws DSETypeException
unformat
in class AbstractConverter
locale
- java.util.Locale;parameters
- com.ibm.dse.base.HashtableconvType
- java.lang.Stringdescriptor
- com.ibm.dse.base.types.PropertyDescription
DSETypeException
public java.lang.Object unformatFromReaderForType(java.io.Reader reader, java.lang.String conversionType, PropertyDescription descriptor, Hashtable parameters) throws DSETypeException, java.io.IOException
unformatFromReaderForType
in class AbstractConverter
reader
- ReaderconversionType
- Stringdescriptor
- PropertyDescriptionparameters
- com.ibm.dse.base.Hashtable
java.io.IOException
- - If an I/O error occurs
DSETypeException
- - If unformatting is unsuccessfulpublic java.lang.Object unformatFromReaderForType(java.io.Reader reader, java.lang.String conversionType, PropertyDescription descriptor, java.util.Locale locale, Hashtable parameters) throws DSETypeException, java.io.IOException
unformatFromReaderForType
in class AbstractConverter
reader
- ReaderconversionType
- Stringdescriptor
- PropertyDescriptionlocale
- Localeparameters
- com.ibm.dse.base.Hashtable
java.io.IOException
- - If an I/O error occurs
DSETypeException
- - If unformatting is unsuccessfulpublic void validateParams(PropertyDescription pd) throws DSETypeException
validateParams
in interface Conversion
validateParams
in class AbstractConverter
pd
- com.ibm.dse.base.types.PropertyDescription
DSETypeException
- - If the parameter validation fails
|
IBM Branch Transformation Toolkit Javadoc | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |