Converters transform business objects to Strings (formatting) and Strings to business objects (unformatting).
A converter can have conversion parameters when converting the type to or from String. For example, a converter for Date type can have pattern parameter, which defines the format of a date String in ‘YYYY-MM-DD' or ‘MM-DD-YYYY' or other formats.
public abstract String format(K value, T params, String convType, Locale locale) throws DSETypeException;The unformat method:
public abstract K unformat(String value, T params, String convType, Locale locale) throws DSETypeException;
public String format(TimeZone value, com.ibm.btt.base.types.impl.BaseConverter.FormatParamBeam params, String convType, Locale locale) throws DSETypeException { // TODO Auto-generated method stub //in the formate of: GMT Sign TwoDigitHours : Minutes return value.getID(); } @Override public TimeZone unformat(String value, com.ibm.btt.base.types.impl.BaseConverter.FormatParamBeam params, String convType, Locale locale) throws DSETypeException { // TODO Auto-generated method stub //in the formate of: GMT Sign TwoDigitHours : Minutes return TimeZone.getTimeZone(value); }