From 967e17697f343849a4c0e420c813d382b11eda44 Mon Sep 17 00:00:00 2001 From: "Brian S. O'Neill" Date: Sat, 2 Sep 2006 22:27:40 +0000 Subject: Added support for LocalDate and LocalDateTime. --- .../java/com/amazon/carbonado/info/AutomaticAdapterSelector.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/main/java/com/amazon/carbonado/info') diff --git a/src/main/java/com/amazon/carbonado/info/AutomaticAdapterSelector.java b/src/main/java/com/amazon/carbonado/info/AutomaticAdapterSelector.java index 2ab66c2..dad7f17 100644 --- a/src/main/java/com/amazon/carbonado/info/AutomaticAdapterSelector.java +++ b/src/main/java/com/amazon/carbonado/info/AutomaticAdapterSelector.java @@ -23,6 +23,8 @@ import java.lang.reflect.Method; import org.joda.time.DateMidnight; import org.joda.time.DateTime; +import org.joda.time.LocalDate; +import org.joda.time.LocalDateTime; import org.cojen.util.BeanProperty; @@ -51,7 +53,9 @@ class AutomaticAdapterSelector { final Class propertyType = property.getType(); if (DateTime.class.isAssignableFrom(propertyType) || - DateMidnight.class.isAssignableFrom(propertyType)) + DateMidnight.class.isAssignableFrom(propertyType) || + LocalDate.class.isAssignableFrom(propertyType) || + LocalDateTime.class.isAssignableFrom(propertyType)) { return selectAdapter(property, DateTimeAdapter.class, readMethod); } else if (String.class.isAssignableFrom(propertyType)) { -- cgit v1.2.3