From 7cc7f7dc9afbc46a8ff7d313e979b53683e68881 Mon Sep 17 00:00:00 2001 From: "Brian S. O'Neill" Date: Fri, 19 Jan 2007 18:53:36 +0000 Subject: Support mapping numeric type to short or byte. --- .../carbonado/repo/jdbc/JDBCStorableIntrospector.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/main/java') 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; } -- cgit v1.2.3