|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jibx.runtime.JodaConvert
public abstract class JodaConvert
Utility class supplying static methods for Joda date/time conversions. The actual serializer/deserializer methods are all public so that they'll be included in JavaDocs; support methods are protected, so that they'll be exposed for user classes extending this class.
Constructor Summary | |
---|---|
JodaConvert()
|
Method Summary | |
---|---|
static org.joda.time.LocalDate |
deserializeLocalDate(java.lang.String text)
Deserialize date value from text as local date without time zone. |
static org.joda.time.DateMidnight |
deserializeLocalDateMidnight(java.lang.String text)
Deserialize date value from text as midnight date in default (local) time zone. |
static org.joda.time.DateTime |
deserializeLocalDateTime(java.lang.String text)
Deserialize date/time value from text into the local (default) time zone. |
static org.joda.time.LocalTime |
deserializeLocalTime(java.lang.String text)
Deserialize time value from text as local time. |
static org.joda.time.DateTime |
deserializeStrictLocalDateTime(java.lang.String text)
Deserialize local (default zone) date/time value from text with time zone required. |
static org.joda.time.DateTime |
deserializeStrictUTCDateTime(java.lang.String text)
Deserialize UTC date/time value from text with time zone required. |
static org.joda.time.DateMidnight |
deserializeUTCDateMidnight(java.lang.String text)
Deserialize date value from text as midnight date in UTC time zone. |
static org.joda.time.DateTime |
deserializeUTCDateTime(java.lang.String text)
Deserialize UTC date/time value from text into the UTC time zone. |
static org.joda.time.DateMidnight |
deserializeZonedDateMidnight(java.lang.String text)
Deserialize date value from text as midnight date in specified (or default) time zone. |
static org.joda.time.DateTime |
deserializeZonedDateTime(java.lang.String text)
Deserialize date/time value from text in specified (or default) time zone. |
static java.lang.String |
serializeLocalDate(org.joda.time.LocalDate date)
Serialize local date value to general date text without time zone. |
static java.lang.String |
serializeUnzonedDateMidnight(org.joda.time.DateMidnight date)
Serialize midnight date value to general date text without time zone. |
static java.lang.String |
serializeUnzonedLocalTime(org.joda.time.LocalTime time)
Serialize local time value to general date text without time zone. |
static java.lang.String |
serializeUTCDateMidnight(org.joda.time.DateMidnight date)
Serialize midnight date value to general date text with UTC time zone. |
static java.lang.String |
serializeUTCDateTime(org.joda.time.DateTime time)
Serialize date/time to general dateTime text. |
static java.lang.String |
serializeUTCLocalTime(org.joda.time.LocalTime time)
Serialize local time value to general date text with UTC time zone. |
static java.lang.String |
serializeZonedDateMidnight(org.joda.time.DateMidnight date)
Serialize midnight date value to general date text with time zone offset. |
static java.lang.String |
serializeZonedDateTime(org.joda.time.DateTime time)
Serialize date/time to general dateTime text. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JodaConvert()
Method Detail |
---|
public static org.joda.time.LocalDate deserializeLocalDate(java.lang.String text) throws JiBXException
null
input.
text
- text to be parsed (may be null
)
null
if passed null
input
JiBXException
- on parse errorpublic static java.lang.String serializeLocalDate(org.joda.time.LocalDate date)
date
- date to be converted
public static org.joda.time.DateMidnight deserializeZonedDateMidnight(java.lang.String text) throws JiBXException
null
input.
text
- text to be parsed (may be null
)
null
if passed null
input
JiBXException
- on parse errorpublic static org.joda.time.DateMidnight deserializeLocalDateMidnight(java.lang.String text) throws JiBXException
null
input.
text
- text to be parsed (may be null
)
null
if passed null
input
JiBXException
- on parse errorpublic static org.joda.time.DateMidnight deserializeUTCDateMidnight(java.lang.String text) throws JiBXException
null
input.
text
- text to be parsed (may be null
)
null
if passed null
input
JiBXException
- on parse errorpublic static java.lang.String serializeUnzonedDateMidnight(org.joda.time.DateMidnight date)
date
- date to be converted
public static java.lang.String serializeZonedDateMidnight(org.joda.time.DateMidnight date)
date
- date to be converted
public static java.lang.String serializeUTCDateMidnight(org.joda.time.DateMidnight date)
date
- date to be converted
public static org.joda.time.LocalTime deserializeLocalTime(java.lang.String text) throws JiBXException
null
input.
text
- text to be parsed (may be null
)
null
if passed null
input
JiBXException
- on parse errorpublic static java.lang.String serializeUnzonedLocalTime(org.joda.time.LocalTime time)
time
- time to be converted
public static java.lang.String serializeUTCLocalTime(org.joda.time.LocalTime time)
time
- time to be converted
public static org.joda.time.DateTime deserializeZonedDateTime(java.lang.String text) throws JiBXException
null
input.
text
- text to be parsed (may be null
)
null
if passed null
input
JiBXException
- on parse errorpublic static org.joda.time.DateTime deserializeUTCDateTime(java.lang.String text) throws JiBXException
null
input.
text
- text to be parsed (may be null
)
null
if passed null
input
JiBXException
- on parse errorpublic static org.joda.time.DateTime deserializeLocalDateTime(java.lang.String text) throws JiBXException
null
input.
text
- text to be parsed (may be null
)
null
if passed null
input
JiBXException
- on parse errorpublic static org.joda.time.DateTime deserializeStrictUTCDateTime(java.lang.String text) throws JiBXException
null
input.
text
- text to be parsed (may be null
)
null
if passed null
input
JiBXException
- on parse errorpublic static org.joda.time.DateTime deserializeStrictLocalDateTime(java.lang.String text) throws JiBXException
null
input.
text
- text to be parsed (may be null
)
null
if passed null
input
JiBXException
- on parse errorpublic static java.lang.String serializeZonedDateTime(org.joda.time.DateTime time)
time
- date/time to be converted
public static java.lang.String serializeUTCDateTime(org.joda.time.DateTime time)
time
- date/time to be converted
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |