From 01a6f53d59c1911c21325a043e2c654386848e3d Mon Sep 17 00:00:00 2001 From: moparisthebest Date: Thu, 28 Aug 2014 13:06:29 -0400 Subject: [PATCH] Change default arrayMaxLength to unlimited when using ResultSetMapper/QueryMapper directly --- .../system/jdbc/NewDefaultObjectResultSetMapper.java | 4 ++++ .../jdbc/CaseInsensitiveMapResultSetMapper.java | 7 +++++++ .../main/java/com/moparisthebest/jdbc/ResultSetMapper.java | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/beehive-jdbc-control/src/main/java/org/apache/beehive/controls/system/jdbc/NewDefaultObjectResultSetMapper.java b/beehive-jdbc-control/src/main/java/org/apache/beehive/controls/system/jdbc/NewDefaultObjectResultSetMapper.java index 9d02ee0..abcc9d4 100644 --- a/beehive-jdbc-control/src/main/java/org/apache/beehive/controls/system/jdbc/NewDefaultObjectResultSetMapper.java +++ b/beehive-jdbc-control/src/main/java/org/apache/beehive/controls/system/jdbc/NewDefaultObjectResultSetMapper.java @@ -12,6 +12,10 @@ import java.util.*; * Refer to org.apache.beehive.controls.system.jdbc.ResultSetMapper for how this class operates */ public class NewDefaultObjectResultSetMapper extends com.moparisthebest.jdbc.CaseInsensitiveMapResultSetMapper implements org.apache.beehive.controls.system.jdbc.ResultSetMapper { + public NewDefaultObjectResultSetMapper() { + super(1024); + } + /** * Map the ResultSet to the method's return type. The object type returned is defined by the return type of the method. * diff --git a/beehive-jdbc-mapper/src/main/java/com/moparisthebest/jdbc/CaseInsensitiveMapResultSetMapper.java b/beehive-jdbc-mapper/src/main/java/com/moparisthebest/jdbc/CaseInsensitiveMapResultSetMapper.java index 4b2f36d..8f1cc25 100644 --- a/beehive-jdbc-mapper/src/main/java/com/moparisthebest/jdbc/CaseInsensitiveMapResultSetMapper.java +++ b/beehive-jdbc-mapper/src/main/java/com/moparisthebest/jdbc/CaseInsensitiveMapResultSetMapper.java @@ -7,6 +7,13 @@ import java.util.Calendar; * Created by mopar on 5/15/14. */ public class CaseInsensitiveMapResultSetMapper extends ResultSetMapper { + public CaseInsensitiveMapResultSetMapper() { + } + + public CaseInsensitiveMapResultSetMapper(int arrayMaxLength) { + super(arrayMaxLength); + } + @Override protected RowToObjectMapper getRowMapper(ResultSet resultSet, Class returnTypeClass, Calendar cal, Class mapValType) { return new CaseInsensitiveMapRowToObjectMapper(resultSet, returnTypeClass, cal, mapValType); diff --git a/beehive-jdbc-mapper/src/main/java/com/moparisthebest/jdbc/ResultSetMapper.java b/beehive-jdbc-mapper/src/main/java/com/moparisthebest/jdbc/ResultSetMapper.java index 4e0b8ea..2c55022 100644 --- a/beehive-jdbc-mapper/src/main/java/com/moparisthebest/jdbc/ResultSetMapper.java +++ b/beehive-jdbc-mapper/src/main/java/com/moparisthebest/jdbc/ResultSetMapper.java @@ -109,7 +109,7 @@ public class ResultSetMapper { } public ResultSetMapper() { - this(1024); + this(-1); } public ResultSetMapper(int arrayMaxLength) {