commonj.sdo.helper
Interface DataHelper


public interface DataHelper

Data helper methods.


Field Summary
static DataHelper INSTANCE
          The default TypeHelper.
 
Method Summary
 java.util.Calendar toCalendar(java.lang.String dateString)
          Convert from a String representation of an SDO date type to a Calendar using the default locale.
 java.util.Calendar toCalendar(java.lang.String dateString, java.util.Locale locale)
          Convert from a String representation of an SDO date type to a Calendar using the specified locale, or the default locale if the locale is null.
 java.util.Date toDate(java.lang.String dateString)
          Convert from a String representation of an SDO date type to a Date.
 java.lang.String toDateTime(java.util.Calendar calendar)
          Convert from a Calendar to a String representation of the DateTime type.
 java.lang.String toDateTime(java.util.Date date)
          Convert from a Date to a String representation of the DateTime type.
 java.lang.String toDay(java.util.Calendar calendar)
          Convert from a Calendar to a String representation of the Day type.
 java.lang.String toDay(java.util.Date date)
          Convert from a Date to a String representation of the Day type.
 java.lang.String toDuration(java.util.Calendar calendar)
          Convert from a Calendar to a String representation of the Duration type.
 java.lang.String toDuration(java.util.Date date)
          Convert from a Date to a String representation of the Duration type.
 java.lang.String toMonth(java.util.Calendar calendar)
          Convert from a Calendar to a String representation of the Month type.
 java.lang.String toMonth(java.util.Date date)
          Convert from a Date to a String representation of the Month type.
 java.lang.String toMonthDay(java.util.Calendar calendar)
          Convert from a Calendar to a String representation of the MonthDay type.
 java.lang.String toMonthDay(java.util.Date date)
          Convert from a Date to a String representation of the MonthDay type.
 java.lang.String toTime(java.util.Calendar calendar)
          Convert from a Calendar to a String representation of the Time type.
 java.lang.String toTime(java.util.Date date)
          Convert from a Date to a String representation of the Time type.
 java.lang.String toYear(java.util.Calendar calendar)
          Convert from a Calendar to a String representation of the Year type.
 java.lang.String toYear(java.util.Date date)
          Convert from a Date to a String representation of the Year type.
 java.lang.String toYearMonth(java.util.Calendar calendar)
          Convert from a Calendar to a String representation of the YearMonth type.
 java.lang.String toYearMonth(java.util.Date date)
          Convert from a Date to a String representation of the YearMonth type.
 java.lang.String toYearMonthDay(java.util.Calendar calendar)
          Convert from a Calendar to a String representation of the YearMonthDay type.
 java.lang.String toYearMonthDay(java.util.Date date)
          Convert from a Date to a String representation of the YearMonthDay type.
 

Field Detail

INSTANCE

public static final DataHelper INSTANCE
The default TypeHelper.

Method Detail

toDate

public java.util.Date toDate(java.lang.String dateString)
Convert from a String representation of an SDO date type to a Date.

Parameters:
dateString - the String representation of an SDO date type
Returns:
a Date representation of an SDO date type.
Throws:
java.lang.IllegalArgumentException - for invalid formats.

toCalendar

public java.util.Calendar toCalendar(java.lang.String dateString)
Convert from a String representation of an SDO date type to a Calendar using the default locale. Same as toCalendar(dateString, null).

Parameters:
dateString - the String representation of an SDO date type
Returns:
a Calendar representation of an SDO date type.
Throws:
java.lang.IllegalArgumentException - for invalid formats.

toCalendar

public java.util.Calendar toCalendar(java.lang.String dateString,
                                     java.util.Locale locale)
Convert from a String representation of an SDO date type to a Calendar using the specified locale, or the default locale if the locale is null.

Parameters:
dateString - the String representation of an SDO date type
locale - the locale or null for default locale.
Returns:
a Calendar representation of an SDO date type.
Throws:
java.lang.IllegalArgumentException - for invalid formats.

toDateTime

public java.lang.String toDateTime(java.util.Date date)
Convert from a Date to a String representation of the DateTime type.

Parameters:
date - the date
Returns:
a Date to a String representation of the DateTime type.

toDuration

public java.lang.String toDuration(java.util.Date date)
Convert from a Date to a String representation of the Duration type.

Parameters:
date - the date
Returns:
a Date to a String representation of the Duration type.

toTime

public java.lang.String toTime(java.util.Date date)
Convert from a Date to a String representation of the Time type.

Parameters:
date - the date
Returns:
a Date to a String representation of the Time type.

toDay

public java.lang.String toDay(java.util.Date date)
Convert from a Date to a String representation of the Day type.

Parameters:
date - the date
Returns:
a Date to a String representation of the Day type.

toMonth

public java.lang.String toMonth(java.util.Date date)
Convert from a Date to a String representation of the Month type.

Parameters:
date - the date
Returns:
a Date to a String representation of the Month type.

toMonthDay

public java.lang.String toMonthDay(java.util.Date date)
Convert from a Date to a String representation of the MonthDay type.

Parameters:
date - the date
Returns:
a Date to a String representation of the MonthDay type.

toYear

public java.lang.String toYear(java.util.Date date)
Convert from a Date to a String representation of the Year type.

Parameters:
date - the date
Returns:
a Date to a String representation of the Year type.

toYearMonth

public java.lang.String toYearMonth(java.util.Date date)
Convert from a Date to a String representation of the YearMonth type.

Parameters:
date - the date
Returns:
a Date to a String representation of the YearMonth type.

toYearMonthDay

public java.lang.String toYearMonthDay(java.util.Date date)
Convert from a Date to a String representation of the YearMonthDay type.

Parameters:
date - the date
Returns:
a Date to a String representation of the YearMonthDay type.

toDateTime

public java.lang.String toDateTime(java.util.Calendar calendar)
Convert from a Calendar to a String representation of the DateTime type.

Parameters:
calendar - the calendar to convert
Returns:
a Calendar to a String representation of the DateTime type.

toDuration

public java.lang.String toDuration(java.util.Calendar calendar)
Convert from a Calendar to a String representation of the Duration type.

Parameters:
calendar - the calendar to convert
Returns:
a Calendar to a String representation of the Duration type.

toTime

public java.lang.String toTime(java.util.Calendar calendar)
Convert from a Calendar to a String representation of the Time type.

Parameters:
calendar - the calendar to convert
Returns:
a Calendar to a String representation of the Time type.

toDay

public java.lang.String toDay(java.util.Calendar calendar)
Convert from a Calendar to a String representation of the Day type.

Parameters:
calendar - the calendar to convert
Returns:
a Calendar to a String representation of the Day type.

toMonth

public java.lang.String toMonth(java.util.Calendar calendar)
Convert from a Calendar to a String representation of the Month type.

Parameters:
calendar - the calendar to convert
Returns:
a Calendar to a String representation of the Month type.

toMonthDay

public java.lang.String toMonthDay(java.util.Calendar calendar)
Convert from a Calendar to a String representation of the MonthDay type.

Parameters:
calendar - the calendar to convert
Returns:
a Calendar to a String representation of the MonthDay type.

toYear

public java.lang.String toYear(java.util.Calendar calendar)
Convert from a Calendar to a String representation of the Year type.

Parameters:
calendar - the calendar to convert
Returns:
a Calendar to a String representation of the Year type.

toYearMonth

public java.lang.String toYearMonth(java.util.Calendar calendar)
Convert from a Calendar to a String representation of the YearMonth type.

Parameters:
calendar - the calendar to convert
Returns:
a Calendar to a String representation of the YearMonth type.

toYearMonthDay

public java.lang.String toYearMonthDay(java.util.Calendar calendar)
Convert from a Calendar to a String representation of the YearMonthDay type.

Parameters:
calendar - the calendar to convert
Returns:
a Calendar to a String representation of the YearMonthDay type.