com.ibm.di.connector.maximo.util.typeconverter
Class DateConverter

java.lang.Object
  extended by com.ibm.di.connector.maximo.util.typeconverter.DateConverter
All Implemented Interfaces:
IMxTypeConverter

public final class DateConverter
extends java.lang.Object
implements IMxTypeConverter

Maximo Type Converter for Date types.

Since:
7.1
See Also:
Date, SimpleDateFormat

Method Summary
static DateConverter getInstance()
          Returns an instance of DateConverter.
 java.lang.String toString(java.lang.Object value)
          Returns a String object representing the specified value .
 java.lang.Object valueOf(java.lang.String value)
          Returns a Date object representing the specified value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static DateConverter getInstance()
Returns an instance of DateConverter.

Returns:
instance of DateConverter

toString

public java.lang.String toString(java.lang.Object value)
                          throws MxConnTypeConvertionException
Returns a String object representing the specified value .

Specified by:
toString in interface IMxTypeConverter
Parameters:
value - value to be converted, must be a Date object or a String object with the format "2007-08-10'T'23:45:15-03:00"
Returns:
String object representing the specified value
Throws:
MxConnTypeConvertionException - if the specified value is not a instance of Date nor String
MxConnTypeConvertionException - if the specified value is a String object that does not comply with the format "2007-08-10'T'23:45:15-03:00"

valueOf

public java.lang.Object valueOf(java.lang.String value)
                         throws MxConnTypeConvertionException
Returns a Date object representing the specified value.

Specified by:
valueOf in interface IMxTypeConverter
Parameters:
value - value to be converted, must comply with the format: "2007-08-10'T'23:45:15-03:00"
Returns:
Date object representing the specified value
Throws:
MxConnTypeConvertionException - if the specified value does not comply with the expected format