org.apache.tuscany.sdo.helper
Class SDOSimpleDateFormat

java.lang.Object
  extended by java.text.Format
      extended by java.text.DateFormat
          extended by java.text.SimpleDateFormat
              extended by org.apache.tuscany.sdo.helper.SDOSimpleDateFormat
All Implemented Interfaces:
Serializable, Cloneable

public class SDOSimpleDateFormat
extends SimpleDateFormat

Fixes the bug reported at JIRA TUSCANY-1659 This class ensures the time zone will be formatted as the abbreviation format.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.text.DateFormat
DateFormat.Field
 
Field Summary
 
Fields inherited from class java.text.DateFormat
AM_PM_FIELD, calendar, DATE_FIELD, DAY_OF_WEEK_FIELD, DAY_OF_WEEK_IN_MONTH_FIELD, DAY_OF_YEAR_FIELD, DEFAULT, ERA_FIELD, FULL, HOUR_OF_DAY0_FIELD, HOUR_OF_DAY1_FIELD, HOUR0_FIELD, HOUR1_FIELD, LONG, MEDIUM, MILLISECOND_FIELD, MINUTE_FIELD, MONTH_FIELD, numberFormat, SECOND_FIELD, SHORT, TIMEZONE_FIELD, WEEK_OF_MONTH_FIELD, WEEK_OF_YEAR_FIELD, YEAR_FIELD
 
Constructor Summary
SDOSimpleDateFormat()
           
SDOSimpleDateFormat(String pattern)
           
SDOSimpleDateFormat(String pattern, DateFormatSymbols formatSymbols)
           
SDOSimpleDateFormat(String pattern, Locale locale)
           
 
Method Summary
 void setTimeZone(TimeZone timeZone)
          Overrides the SimpleDateFormat.setTimeZone(TimeZone) method.
 
Methods inherited from class java.text.SimpleDateFormat
applyLocalizedPattern, applyPattern, clone, equals, format, formatToCharacterIterator, get2DigitYearStart, getDateFormatSymbols, hashCode, parse, set2DigitYearStart, setDateFormatSymbols, toLocalizedPattern, toPattern
 
Methods inherited from class java.text.DateFormat
format, format, getAvailableLocales, getCalendar, getDateInstance, getDateInstance, getDateInstance, getDateTimeInstance, getDateTimeInstance, getDateTimeInstance, getInstance, getNumberFormat, getTimeInstance, getTimeInstance, getTimeInstance, getTimeZone, isLenient, parse, parseObject, setCalendar, setLenient, setNumberFormat
 
Methods inherited from class java.text.Format
format, parseObject
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SDOSimpleDateFormat

public SDOSimpleDateFormat()

SDOSimpleDateFormat

public SDOSimpleDateFormat(String pattern)

SDOSimpleDateFormat

public SDOSimpleDateFormat(String pattern,
                           Locale locale)

SDOSimpleDateFormat

public SDOSimpleDateFormat(String pattern,
                           DateFormatSymbols formatSymbols)
Method Detail

setTimeZone

public void setTimeZone(TimeZone timeZone)
Overrides the SimpleDateFormat.setTimeZone(TimeZone) method. It checks if the TimeZone to be set is in the abbreviation format. If not, it looks for its abbreviation format and set it.

Overrides:
setTimeZone in class DateFormat
Parameters:
timeZone - the time zone to be set


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.