public class SDODataTypeHelper
extends java.lang.Object
Date
objects.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
IBM Copyright notice field.
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
formatXMLDate(java.util.Date aDate)
Formats a
Date object into an XML date in the business context time zone. |
static java.lang.String |
formatXMLDateTime(java.util.Date aDate)
Formats a
Date object into an XML dateTime in the business context time zone. |
static java.lang.String |
formatXMLTime(java.util.Date aDate)
Formats a
Date object into an XML time in the business context time zone. |
static javax.xml.datatype.DatatypeFactory |
getDatatypeFactoryInstance()
Returns an instance of the the data type factory.
|
static java.util.Date |
getXMLDate(java.lang.Object obj)
Parses an XML date into a
Date object. |
static java.util.Date |
getXMLDateTime(java.lang.Object obj)
Parses an XML dateTime into a
Date object. |
static java.util.Date |
getXMLTime(java.lang.Object obj)
Parses an XML time into a
Date object. |
public static final java.lang.String COPYRIGHT
public static final javax.xml.datatype.DatatypeFactory getDatatypeFactoryInstance()
public static java.lang.String formatXMLDateTime(java.util.Date aDate)
Date
object into an XML dateTime in the business context time zone. The
business context time zone is specified using the business context data
timeZoneId
, which can be any ID accepted by
TimeZone.getTimeZone(String)
. If not specified, the UTC
time zone will be used.aDate
- the Date
object.public static java.lang.String formatXMLDate(java.util.Date aDate)
Date
object into an XML date in the business context time zone. The
business context time zone is specified using the business context data
timeZoneId
, which can be any ID accepted by
TimeZone.getTimeZone(String)
. If not specified, the UTC
time zone will be used.aDate
- the Date
object.public static java.lang.String formatXMLTime(java.util.Date aDate)
Date
object into an XML time in the business context time zone. The
business context time zone is specified using the business context data
timeZoneId
, which can be any ID accepted by
TimeZone.getTimeZone(String)
. If not specified, the UTC
time zone will be used.aDate
- the Date
object.public static java.util.Date getXMLDateTime(java.lang.Object obj)
Date
object. An XML dateTime with no time zone will
be parsed as a local date and time in the business context time zone. The business context
time zone is specified using the business context data timeZoneId
, which can
be any ID accepted by TimeZone.getTimeZone(String)
. If not specified, the
UTC
time zone will be used.obj
- SDO representation of the XML dateTime.Date
object.public static java.util.Date getXMLDate(java.lang.Object obj)
Date
object. An XML date with no time zone will
be parsed as a local date in the business context time zone. The business context
time zone is specified using the business context data timeZoneId
, which can
be any ID accepted by TimeZone.getTimeZone(String)
. If not specified, the
UTC
time zone will be used.obj
- SDO representation of the XML date.Date
object.public static java.util.Date getXMLTime(java.lang.Object obj)
Date
object. An XML date with no time zone will
be parsed as a local time in the business context time zone. The business context
time zone is specified using the business context data timeZoneId
, which can
be any ID accepted by TimeZone.getTimeZone(String)
. If not specified, the
UTC
time zone will be used.obj
- SDO representation of the XML time.Date
object.