|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.convert.DateTimeConverters
public class DateTimeConverters
Date/time Converter
classes.
Nested Class Summary | |
---|---|
static class |
DateTimeConverters.CalendarToDate
An object that converts a Calendar to a Date . |
static class |
DateTimeConverters.CalendarToLong
An object that converts a Calendar to a Long . |
static class |
DateTimeConverters.CalendarToString
An object that converts a Calendar to a String . |
static class |
DateTimeConverters.CalendarToTimestamp
An object that converts a Calendar to a Timestamp . |
static class |
DateTimeConverters.DateToCalendar
An object that converts a Date to a Calendar . |
static class |
DateTimeConverters.DateToSqlDate
An object that converts a java.util.Date to a
java.sql.Date . |
static class |
DateTimeConverters.DateToSqlTime
An object that converts a java.util.Date to a
java.sql.Time . |
static class |
DateTimeConverters.DateToString
An object that converts a java.util.Date to a
String . |
static class |
DateTimeConverters.DateToTimestamp
An object that converts a java.util.Date to a
java.sql.Timestamp . |
static class |
DateTimeConverters.GenericDateToLong<S extends Date>
An object that converts a java.util.Date (and its subclasses) to a
Long . |
static class |
DateTimeConverters.GenericLocalizedConverter<S,T>
|
static class |
DateTimeConverters.LongToCalendar
An object that converts a Long to a
Calendar . |
static class |
DateTimeConverters.LongToDate
An object that converts a Long to a
java.util.Date . |
static class |
DateTimeConverters.LongToSqlDate
An object that converts a Long to a
java.sql.Date . |
static class |
DateTimeConverters.LongToSqlTime
An object that converts a Long to a
java.sql.Time . |
static class |
DateTimeConverters.LongToTimestamp
An object that converts a Long to a
java.sql.Timestamp . |
static class |
DateTimeConverters.SqlDateToDate
An object that converts a java.sql.Date to a
java.util.Date . |
static class |
DateTimeConverters.SqlDateToString
An object that converts a java.sql.Date to a
String . |
static class |
DateTimeConverters.SqlDateToTimestamp
An object that converts a java.sql.Date to a
java.sql.Timestamp . |
static class |
DateTimeConverters.SqlTimeToString
An object that converts a java.sql.Time to a
String . |
static class |
DateTimeConverters.StringToCalendar
An object that converts a String to a
java.util.Calendar . |
static class |
DateTimeConverters.StringToDate
An object that converts a String to a
java.util.Date . |
static class |
DateTimeConverters.StringToSqlDate
An object that converts a String to a
java.sql.Date . |
static class |
DateTimeConverters.StringToSqlTime
An object that converts a String to a
java.sql.Time . |
static class |
DateTimeConverters.StringToTimestamp
An object that converts a String to a
java.sql.Timestamp . |
static class |
DateTimeConverters.StringToTimeZone
An object that converts a String ID to a
java.util.TimeZone . |
static class |
DateTimeConverters.TimestampToDate
An object that converts a java.sql.Timestamp to a
java.util.Date . |
static class |
DateTimeConverters.TimestampToSqlDate
An object that converts a java.sql.Timestamp to a
java.sql.Date . |
static class |
DateTimeConverters.TimestampToSqlTime
An object that converts a java.sql.Timestamp to a
java.sql.Time . |
static class |
DateTimeConverters.TimestampToString
An object that converts a java.sql.Timestamp to a
String . |
static class |
DateTimeConverters.TimeZoneToString
An object that converts a java.util.TimeZone to a
String ID. |
Field Summary | |
---|---|
static String |
CALENDAR_FORMAT
Calendar format string: EEE MMM dd HH:mm:ss.SSS z yyyy . |
static String |
JDBC_DATE_FORMAT
JDBC DATE format string: yyyy-MM-dd . |
static String |
JDBC_TIME_FORMAT
JDBC TIME format string: HH:mm:ss . |
Constructor Summary | |
---|---|
DateTimeConverters()
|
Method Summary | |
---|---|
void |
loadConverters()
Create and register converters with the Java object type conversion framework. |
protected static DateFormat |
toDateFormat(TimeZone tz)
Returns an initialized DateFormat object. |
protected static DateFormat |
toDateTimeFormat(String dateTimeFormat,
TimeZone tz,
Locale locale)
Returns an initialized DateFormat object. |
protected static DateFormat |
toTimeFormat(TimeZone tz)
Returns an initialized DateFormat object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String CALENDAR_FORMAT
EEE MMM dd HH:mm:ss.SSS z yyyy
.
public static final String JDBC_DATE_FORMAT
yyyy-MM-dd
.
public static final String JDBC_TIME_FORMAT
HH:mm:ss
.
Constructor Detail |
---|
public DateTimeConverters()
Method Detail |
---|
protected static DateFormat toDateFormat(TimeZone tz)
tz
-
protected static DateFormat toDateTimeFormat(String dateTimeFormat, TimeZone tz, Locale locale)
dateTimeFormat
- optional format stringtz
- locale
- can be null if dateTimeFormat is not null
protected static DateFormat toTimeFormat(TimeZone tz)
tz
-
public void loadConverters()
ConverterLoader
Converters.registerConverter(Converter)
with the Converter
instance.
loadConverters
in interface ConverterLoader
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |