summaryrefslogtreecommitdiff
path: root/src/main/java/com/amazon/carbonado/info
diff options
context:
space:
mode:
authorBrian S. O'Neill <bronee@gmail.com>2006-09-02 22:27:40 +0000
committerBrian S. O'Neill <bronee@gmail.com>2006-09-02 22:27:40 +0000
commit967e17697f343849a4c0e420c813d382b11eda44 (patch)
tree1f67761e31c14ccfebe10a326107887e8d3b5bcb /src/main/java/com/amazon/carbonado/info
parent01617bba12a89f6079f53843cdfb466ca3da2280 (diff)
Added support for LocalDate and LocalDateTime.
Diffstat (limited to 'src/main/java/com/amazon/carbonado/info')
-rw-r--r--src/main/java/com/amazon/carbonado/info/AutomaticAdapterSelector.java6
1 files changed, 5 insertions, 1 deletions
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)) {