com.ibm.dse.base.types.ext
Class DateConverter
java.lang.Object
|
+--com.ibm.dse.base.types.AbstractConverter
|
+--com.ibm.dse.base.types.ext.DateConverter
- public class DateConverter
- extends AbstractConverter
Converter for business objects of Type Date
- See Also:
- Serialized Form
Constructor Summary |
DateConverter(java.lang.String[] supportedConversionTypes,
java.util.Hashtable keyValuePairs)
Creates a converter for business objects of Type Date |
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 |
setMask(java.lang.String dateMask)
Sets the value of the mask 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)
Converts the stream passed to an Object using the appropriate conversion type and locale. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
DateConverter
public DateConverter(java.lang.String[] supportedConversionTypes,
java.util.Hashtable keyValuePairs)
throws DSETypeException
- Creates a converter for business objects of Type Date
- Parameters:
supportedConversionTypes
- String[]keyValuePairs
- Hashtable- Throws:
- DSETypeException - Conversion types passed to superclass is null or empty.
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.
Parameters required by this converter are first taken from the owner descriptor passed as argument.
- Overrides:
- formatToWriterForType in class AbstractConverter
- Parameters:
value
- ObjectconversionType
- Stringwriter
- Writerdescriptor
- 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.
Parameters required by this converter are first taken from the owner descriptor passed as argument.
- Overrides:
- formatToWriterForType in class AbstractConverter
- Parameters:
value
- ObjectconversionType
- Stringwriter
- Writerdescriptor
- PropertyDescriptionlocale
- 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
setMask
public void setMask(java.lang.String dateMask)
- Sets the value of the mask attribute.
- Parameters:
dateMask
- 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.
Parameters required by this converter are first taken from the owner descriptor passed as argument.
- Overrides:
- unformatFromReaderForType in class AbstractConverter
- Parameters:
reader
- ReaderconversionType
- Stringdescriptor
- 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
- Converts the stream passed to an Object using the appropriate conversion type and locale.
Parameters required by this converter are first taken from the owner descriptor passed as argument.
- Overrides:
- unformatFromReaderForType in class AbstractConverter
- Parameters:
reader
- ReaderconversionType
- Stringdescriptor
- PropertyDescriptionlocale
- Locale- Returns:
- Object
- Throws:
- java.io.IOException - An I/O error occurs.
- DSETypeException - Unformatting is unsuccessful.