summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian S. O'Neill <bronee@gmail.com>2007-01-19 18:53:36 +0000
committerBrian S. O'Neill <bronee@gmail.com>2007-01-19 18:53:36 +0000
commit7cc7f7dc9afbc46a8ff7d313e979b53683e68881 (patch)
tree798a100d6df2e75cfab885d7c20ccd180d40a86f /src
parentdf986362a47fa9c3e9243e5c5de2153889d2f103 (diff)
Support mapping numeric type to short or byte.
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorableIntrospector.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorableIntrospector.java b/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorableIntrospector.java
index df617d9..4083693 100644
--- a/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorableIntrospector.java
+++ b/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorableIntrospector.java
@@ -702,6 +702,20 @@ public class JDBCStorableIntrospector extends StorableIntrospector {
} else if (desiredClass == BigDecimal.class) {
actualClass = BigDecimal.class;
suffix = "BigDecimal";
+ } else if (desiredClass == short.class) {
+ if (decimalDigits == 0) {
+ actualClass = short.class;
+ suffix = "Short";
+ } else {
+ return null;
+ }
+ } else if (desiredClass == byte.class) {
+ if (decimalDigits == 0) {
+ actualClass = byte.class;
+ suffix = "Byte";
+ } else {
+ return null;
+ }
} else {
return null;
}