|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DataHelper
Data helper methods.
Field Summary | |
---|---|
static DataHelper |
INSTANCE
The default DataHelper. |
Method Summary | |
---|---|
Object |
convert(Property property,
Object value)
Convert the specified value to an instance
of the specified property's type . |
Object |
convert(Type type,
Object value)
Convert the specified value to an instance
of the specified type. |
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 |
---|
static final DataHelper INSTANCE
Method Detail |
---|
Date toDate(String dateString)
dateString
- the String representation of an SDO date type
IllegalArgumentException
- for invalid formats.Calendar toCalendar(String dateString)
dateString
- the String representation of an SDO date type
IllegalArgumentException
- for invalid formats.Calendar toCalendar(String dateString, Locale locale)
dateString
- the String representation of an SDO date typelocale
- the locale or null for default locale.
IllegalArgumentException
- for invalid formats.String toDateTime(Date date)
date
- the date
String toDuration(Date date)
date
- the date
String toTime(Date date)
date
- the date
String toDay(Date date)
date
- the date
String toMonth(Date date)
date
- the date
String toMonthDay(Date date)
date
- the date
String toYear(Date date)
date
- the date
String toYearMonth(Date date)
date
- the date
String toYearMonthDay(Date date)
date
- the date
String toDateTime(Calendar calendar)
calendar
- the calendar to convert
String toDuration(Calendar calendar)
calendar
- the calendar to convert
String toTime(Calendar calendar)
calendar
- the calendar to convert
String toDay(Calendar calendar)
calendar
- the calendar to convert
String toMonth(Calendar calendar)
calendar
- the calendar to convert
String toMonthDay(Calendar calendar)
calendar
- the calendar to convert
String toYear(Calendar calendar)
calendar
- the calendar to convert
String toYearMonth(Calendar calendar)
calendar
- the calendar to convert
String toYearMonthDay(Calendar calendar)
calendar
- the calendar to convert
Object convert(Type type, Object value)
instance
of the specified type.
Supported conversions are listed in Section 16 of the SDO specification.
type
- the target data type
.value
- the value to convert
IllegalArgumentException
- if the value could not be convertedconvert(Property, Object)
Object convert(Property property, Object value)
instance
of the specified property's type
.
The specified value must be a List if the property is many valued
. In this case, all the values in the List are converted.
property
- the target data type
property.value
- the value or List of values to convert
IllegalArgumentException
- if the value could not be convertedconvert(Type, Object)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |