|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||
@Documented
@Retention(value=RUNTIME)
@Target(value=METHOD)
@AdapterDefinition(storageTypePreferences={long.class,java.lang.Long.class,java.lang.String.class})
public @interface DateTimeAdapter
Converts Joda-Time datetime objects to and from other forms. This adapter is
applied automatically for all storable properties of type DateTime,
DateMidnight, LocalDateTime, LocalDate and also
Date. Explicit use allows a different time zone to be
used, but this only works for Joda-Time objects.
Example:
public interface UserInfo extends Storable {
@DateTimeAdapter(timeZone="UTC")
DateTime getModifyDateTime();
void setModifyDateTime(DateTime dt);
...
}
AdapterDefinition| Optional Element Summary | |
|---|---|
String |
timeZone
Optionally specify a time zone to apply to new DateTimes, overriding the default time zone. |
public abstract String timeZone
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||