|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.persistence.sdo.helper.SDODataHelper
public class SDODataHelper
Purpose: A helper class for performing data conversions.
| Field Summary |
|---|
| Fields inherited from interface commonj.sdo.helper.DataHelper |
|---|
INSTANCE |
| Constructor Summary | |
|---|---|
SDODataHelper()
|
|
SDODataHelper(commonj.sdo.helper.HelperContext aContext)
|
|
| Method Summary | |
|---|---|
Object |
convert(commonj.sdo.Property property,
Object value)
Convert the specified value to an instance of the specified property's type. |
Object |
convert(commonj.sdo.Type type,
Object value)
Convert the specified value to an instance of the specified type. |
Object |
convertFromStringValue(String value,
Class convertClass)
Convert a String value based to the appropriate type. |
Object |
convertFromStringValue(String value,
Class convertClass,
QName schemaType)
Convert a String value based to the appropriate type. |
Object |
convertFromStringValue(String value,
commonj.sdo.Type sdoType)
Convert a String value based to the appropriate type. |
Object |
convertFromStringValue(String value,
commonj.sdo.Type sdoType,
QName schemaType)
Convert a String value based to the appropriate type. |
String |
convertToStringValue(Object value,
commonj.sdo.Type sdoType)
Convert to a String value based to the SDO type. |
Object |
convertValue(Object value,
Class convertClass,
QName schemaType)
Convert a value based to the appropriate type. |
Object |
convertValueToClass(commonj.sdo.Property prop,
Object valueToConvert,
Class convertToClass)
INTERNAL: |
commonj.sdo.helper.HelperContext |
getHelperContext()
INTERNAL: |
void |
setHelperContext(commonj.sdo.helper.HelperContext helperContext)
INTERNAL: |
void |
setTimeZone(TimeZone timeZone)
The specified TimeZone will be used for all String to date object conversions. |
void |
setTimeZoneQualified(boolean timeZoneQualified)
By setting this flag to true the marshalled date objects marshalled to the XML schema types time and dateTime will be qualified by a time zone. |
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 the 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. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SDODataHelper()
public SDODataHelper(commonj.sdo.helper.HelperContext aContext)
| Method Detail |
|---|
public void setTimeZone(TimeZone timeZone)
public void setTimeZoneQualified(boolean timeZoneQualified)
public Calendar toCalendar(String dateString)
toCalendar in interface commonj.sdo.helper.DataHelperdateString - the String representation of an SDO date type
IllegalArgumentException - for invalid formats.
public Calendar toCalendar(String dateString,
Locale locale)
toCalendar in interface commonj.sdo.helper.DataHelperdateString - the String representation of an SDO date typelocale - the locale or null for default locale.
IllegalArgumentException - for invalid formats.public Date toDate(String dateString)
toDate in interface commonj.sdo.helper.DataHelperdateString - a String representation of the Date type
public String toDateTime(Calendar calendar)
toDateTime in interface commonj.sdo.helper.DataHelpercalendar - the calendar to convert
public String toDateTime(Date date)
toDateTime in interface commonj.sdo.helper.DataHelperdate - the date
public String toDay(Calendar calendar)
toDay in interface commonj.sdo.helper.DataHelpercalendar - the calendar to convert
public String toDay(Date date)
toDay in interface commonj.sdo.helper.DataHelperdate - the date
public String toDuration(Calendar calendar)
toDuration in interface commonj.sdo.helper.DataHelpercalendar - the calendar to convert
public String toDuration(Date date)
toDuration in interface commonj.sdo.helper.DataHelperdate - the date
public String toMonth(Calendar calendar)
toMonth in interface commonj.sdo.helper.DataHelpercalendar - the calendar to convert
public String toMonth(Date date)
toMonth in interface commonj.sdo.helper.DataHelperdate - the date
public String toMonthDay(Calendar calendar)
toMonthDay in interface commonj.sdo.helper.DataHelpercalendar - the calendar to convert
public String toMonthDay(Date date)
toMonthDay in interface commonj.sdo.helper.DataHelperdate - the date to convert
public String toTime(Calendar calendar)
toTime in interface commonj.sdo.helper.DataHelpercalendar - the calendar to convert
public String toTime(Date date)
toTime in interface commonj.sdo.helper.DataHelperdate - the date
public String toYear(Calendar calendar)
toYear in interface commonj.sdo.helper.DataHelpercalendar - the calendar to convert
public String toYear(Date date)
toYear in interface commonj.sdo.helper.DataHelperdate - the date
public String toYearMonth(Date date)
toYearMonth in interface commonj.sdo.helper.DataHelperdate - the date
public String toYearMonthDay(Date date)
toYearMonthDay in interface commonj.sdo.helper.DataHelperdate - the date
public String toYearMonth(Calendar calendar)
toYearMonth in interface commonj.sdo.helper.DataHelpercalendar - the calendar to convert
public String toYearMonthDay(Calendar calendar)
toYearMonthDay in interface commonj.sdo.helper.DataHelpercalendar - the calendar to convert
public Object convertValue(Object value,
Class convertClass,
QName schemaType)
value - The value to convert.convertClass - The class to convert the value to.schemaType - The schema type if available.
public Object convertFromStringValue(String value,
Class convertClass)
value - The String value to convert.convertClass - The class to convert the value to.
public Object convertFromStringValue(String value,
commonj.sdo.Type sdoType)
value - The String value to convert.sdoType - The SDO type of the value to convert the value to.
public Object convertFromStringValue(String value,
commonj.sdo.Type sdoType,
QName schemaType)
value - The String value to convert.sdoType - The SDO type of the value to convert the value to.schemaType - The schema type if available.
public Object convertFromStringValue(String value,
Class convertClass,
QName schemaType)
value - The String value to convert.convertClass - The class to convert the value to.schemaType - The schema type if available.
public String convertToStringValue(Object value,
commonj.sdo.Type sdoType)
value - The value to convert.sdoType - the SDO type
public Object convert(commonj.sdo.Type type,
Object value)
instance of the specified type. Supported conversions are listed in
Section 14 of the SDO specification.
convert in interface commonj.sdo.helper.DataHelpertype - the target data type.value - the value to convert
IllegalArgumentException - if the value could not be convertedconvert(Property, Object)
public Object convert(commonj.sdo.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.
convert in interface commonj.sdo.helper.DataHelperproperty - the target data type property.value - the value or List of values to convert
IllegalArgumentException - if the value could not be convertedconvert(Type, Object)
public Object convertValueToClass(commonj.sdo.Property prop,
Object valueToConvert,
Class convertToClass)
public commonj.sdo.helper.HelperContext getHelperContext()
public void setHelperContext(commonj.sdo.helper.HelperContext helperContext)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||