SDO API

commonj.sdo.helper
Interface DataHelper


public interface DataHelper

Data helper methods.


Field Summary
static DataHelper INSTANCE
          The default TypeHelper.
 
Method Summary
 Calendar toCalendar(String dateString)
          Convert from a String representation of an SDO date type to a Calendar using the default locale.
 Calendar toCalendar(String dateString, 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.
 Date toDate(String dateString)
          Convert from a String representation of an SDO date type to a Date.
 String toDateTime(Calendar calendar)
          Convert from a Calendar to a String representation of the DateTime type.
 String toDateTime(Date date)
          Convert from a Date to a String representation of the DateTime type.
 String toDay(Calendar calendar)
          Convert from a Calendar to a String representation of the Day type.
 String toDay(Date date)
          Convert from a Date to a String representation of the Day type.
 String toDuration(Calendar calendar)
          Convert from a Calendar to a String representation of the Duration type.
 String toDuration(Date date)
          Convert from a Date to a String representation of the Duration type.
 String toMonth(Calendar calendar)
          Convert from a Calendar to a String representation of the Month type.
 String toMonth(Date date)
          Convert from a Date to a String representation of the Month type.
 String toMonthDay(Calendar calendar)
          Convert from a Calendar to a String representation of the MonthDay type.
 String toMonthDay(Date date)
          Convert from a Date to a String representation of the MonthDay type.
 String toTime(Calendar calendar)
          Convert from a Calendar to a String representation of the Time type.
 String toTime(Date date)
          Convert from a Date to a String representation of the Time type.
 String toYear(Calendar calendar)
          Convert from a Calendar to a String representation of the Year type.
 String toYear(Date date)
          Convert from a Date to a String representation of the Year type.
 String toYearMonth(Calendar calendar)
          Convert from a Calendar to a String representation of the YearMonth type.
 String toYearMonth(Date date)
          Convert from a Date to a String representation of the YearMonth type.
 String toYearMonthDay(Calendar calendar)
          Convert from a Calendar to a String representation of the YearMonthDay type.
 String toYearMonthDay(Date date)
          Convert from a Date to a String representation of the YearMonthDay type.
 

Field Detail

INSTANCE

static final DataHelper INSTANCE
The default TypeHelper.

Method Detail

toDate

Date toDate(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:
IllegalArgumentException - for invalid formats.

toCalendar

Calendar toCalendar(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:
IllegalArgumentException - for invalid formats.

toCalendar

Calendar toCalendar(String dateString,
                    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:
IllegalArgumentException - for invalid formats.

toDateTime

String toDateTime(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

String toDuration(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

String toTime(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

String toDay(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

String toMonth(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

String toMonthDay(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

String toYear(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

String toYearMonth(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

String toYearMonthDay(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

String toDateTime(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

String toDuration(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

String toTime(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

String toDay(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

String toMonth(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

String toMonthDay(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

String toYear(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

String toYearMonth(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

String toYearMonthDay(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.

SDO API

-