diff --git a/.classpath b/.classpath
index a79d8a34..2bdf37b3 100644
--- a/.classpath
+++ b/.classpath
@@ -5,7 +5,7 @@
-
+
diff --git a/CHANGES.md b/CHANGES.md
index 5848d591..4172c1df 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,3 +1,12 @@
+### 1.7.4
+
+* Add `Stream.reduce(U identity, BiFunction accumulator, BinaryOperator combiner)`.
+
+* Rename `JdbcUtil.RecordGetter/RecordConsumer/RecordPredicate` to `RowMapper/RowConsumer/RowFilter`.
+
+* Improvements and bug fix.
+
+
### 1.7.3
* Add `ContinuableFuture.map`.
diff --git a/README.md b/README.md
index b6847690..253c5aae 100644
--- a/README.md
+++ b/README.md
@@ -183,32 +183,32 @@ A general programming library in Java/Android. It's easy to learn and simple to
[RemoteExecutor](https://cdn.rawgit.com/landawn/AbacusUtil/master/docs/RemoteExecutor_view.html).
* More:
-[Charsets](https://static.javadoc.io/com.landawn/abacus-util/1.7.3/com/landawn/abacus/util/Charsets.html),
-[Ascii](https://static.javadoc.io/com.landawn/abacus-util/1.7.3/com/landawn/abacus/util/Ascii.html),
-[CalendarUnit](https://static.javadoc.io/com.landawn/abacus-util/1.7.3/com/landawn/abacus/util/CalendarUnit.html),
-[NamingPolicy](https://static.javadoc.io/com.landawn/abacus-util/1.7.3/com/landawn/abacus/util/NamingPolicy.html),
-[Properties](https://static.javadoc.io/com.landawn/abacus-util/1.7.3/com/landawn/abacus/util/Properties.html),
-[PropertiesUtil](https://static.javadoc.io/com.landawn/abacus-util/1.7.3/com/landawn/abacus/util/PropertiesUtil.html),
-[Wrapper](https://static.javadoc.io/com.landawn/abacus-util/1.7.3/com/landawn/abacus/util/Wrapper.html),
-[ArrayHashSet](https://static.javadoc.io/com.landawn/abacus-util/1.7.3/com/landawn/abacus/util/ArrayHashSet.html),
-[ArrayHashMap](https://static.javadoc.io/com.landawn/abacus-util/1.7.3/com/landawn/abacus/util/ArrayHashMap.html),
-[ClassUtil](https://static.javadoc.io/com.landawn/abacus-util/1.7.3/com/landawn/abacus/util/ClassUtil.html),
-[EscapeUtil](https://static.javadoc.io/com.landawn/abacus-util/1.7.3/com/landawn/abacus/util/EscapeUtil.html),
-[RegExUtil](https://static.javadoc.io/com.landawn/abacus-util/1.7.3/com/landawn/abacus/util/RegExUtil.html),
-[FilenameUtil](https://static.javadoc.io/com.landawn/abacus-util/1.7.3/com/landawn/abacus/util/FilenameUtil.html),
-[AWSJSONUtil](https://static.javadoc.io/com.landawn/abacus-util/1.7.3/com/landawn/abacus/util/AWSJSONUtil.html),
-[AddrUtil](https://static.javadoc.io/com.landawn/abacus-util/1.7.3/com/landawn/abacus/util/AddrUtil.html),
-[WSSecurityUtil](https://static.javadoc.io/com.landawn/abacus-util/1.7.3/com/landawn/abacus/util/WSSecurityUtil.html),
-[EmailUtil](https://static.javadoc.io/com.landawn/abacus-util/1.7.3/com/landawn/abacus/util/EmailUtil.html),
-[IEEE754rUtil](https://static.javadoc.io/com.landawn/abacus-util/1.7.3/com/landawn/abacus/util/IEEE754rUtil.html),
-[Index](https://static.javadoc.io/com.landawn/abacus-util/1.7.3/com/landawn/abacus/util/Index.html),
-[Median](https://static.javadoc.io/com.landawn/abacus-util/1.7.3/com/landawn/abacus/util/Median.html),
-[f](https://static.javadoc.io/com.landawn/abacus-util/1.7.3/com/landawn/abacus/util/f.html),
-[Matth](https://static.javadoc.io/com.landawn/abacus-util/1.7.3/com/landawn/abacus/util/Matth.html),
-[SafeInitializer](https://static.javadoc.io/com.landawn/abacus-util/1.7.3/com/landawn/abacus/util/SafeInitializer.html),
-[Stopwatch](https://static.javadoc.io/com.landawn/abacus-util/1.7.3/com/landawn/abacus/util/Stopwatch.html),
-[RateLimiter](https://static.javadoc.io/com.landawn/abacus-util/1.7.3/com/landawn/abacus/util/RateLimiter.html),
-[Traverser](https://static.javadoc.io/com.landawn/abacus-util/1.7.3/com/landawn/abacus/util/Traverser.html)(from Apache commons, Google Guava...) ...
+[Charsets](https://static.javadoc.io/com.landawn/abacus-util/1.7.4/com/landawn/abacus/util/Charsets.html),
+[Ascii](https://static.javadoc.io/com.landawn/abacus-util/1.7.4/com/landawn/abacus/util/Ascii.html),
+[CalendarUnit](https://static.javadoc.io/com.landawn/abacus-util/1.7.4/com/landawn/abacus/util/CalendarUnit.html),
+[NamingPolicy](https://static.javadoc.io/com.landawn/abacus-util/1.7.4/com/landawn/abacus/util/NamingPolicy.html),
+[Properties](https://static.javadoc.io/com.landawn/abacus-util/1.7.4/com/landawn/abacus/util/Properties.html),
+[PropertiesUtil](https://static.javadoc.io/com.landawn/abacus-util/1.7.4/com/landawn/abacus/util/PropertiesUtil.html),
+[Wrapper](https://static.javadoc.io/com.landawn/abacus-util/1.7.4/com/landawn/abacus/util/Wrapper.html),
+[ArrayHashSet](https://static.javadoc.io/com.landawn/abacus-util/1.7.4/com/landawn/abacus/util/ArrayHashSet.html),
+[ArrayHashMap](https://static.javadoc.io/com.landawn/abacus-util/1.7.4/com/landawn/abacus/util/ArrayHashMap.html),
+[ClassUtil](https://static.javadoc.io/com.landawn/abacus-util/1.7.4/com/landawn/abacus/util/ClassUtil.html),
+[EscapeUtil](https://static.javadoc.io/com.landawn/abacus-util/1.7.4/com/landawn/abacus/util/EscapeUtil.html),
+[RegExUtil](https://static.javadoc.io/com.landawn/abacus-util/1.7.4/com/landawn/abacus/util/RegExUtil.html),
+[FilenameUtil](https://static.javadoc.io/com.landawn/abacus-util/1.7.4/com/landawn/abacus/util/FilenameUtil.html),
+[AWSJSONUtil](https://static.javadoc.io/com.landawn/abacus-util/1.7.4/com/landawn/abacus/util/AWSJSONUtil.html),
+[AddrUtil](https://static.javadoc.io/com.landawn/abacus-util/1.7.4/com/landawn/abacus/util/AddrUtil.html),
+[WSSecurityUtil](https://static.javadoc.io/com.landawn/abacus-util/1.7.4/com/landawn/abacus/util/WSSecurityUtil.html),
+[EmailUtil](https://static.javadoc.io/com.landawn/abacus-util/1.7.4/com/landawn/abacus/util/EmailUtil.html),
+[IEEE754rUtil](https://static.javadoc.io/com.landawn/abacus-util/1.7.4/com/landawn/abacus/util/IEEE754rUtil.html),
+[Index](https://static.javadoc.io/com.landawn/abacus-util/1.7.4/com/landawn/abacus/util/Index.html),
+[Median](https://static.javadoc.io/com.landawn/abacus-util/1.7.4/com/landawn/abacus/util/Median.html),
+[f](https://static.javadoc.io/com.landawn/abacus-util/1.7.4/com/landawn/abacus/util/f.html),
+[Matth](https://static.javadoc.io/com.landawn/abacus-util/1.7.4/com/landawn/abacus/util/Matth.html),
+[SafeInitializer](https://static.javadoc.io/com.landawn/abacus-util/1.7.4/com/landawn/abacus/util/SafeInitializer.html),
+[Stopwatch](https://static.javadoc.io/com.landawn/abacus-util/1.7.4/com/landawn/abacus/util/Stopwatch.html),
+[RateLimiter](https://static.javadoc.io/com.landawn/abacus-util/1.7.4/com/landawn/abacus/util/RateLimiter.html),
+[Traverser](https://static.javadoc.io/com.landawn/abacus-util/1.7.4/com/landawn/abacus/util/Traverser.html)(from Apache commons, Google Guava...) ...
## Download/Installation & [Changes](https://github.com/landawn/AbacusUtil/blob/master/CHANGES.md):
@@ -218,22 +218,22 @@ A general programming library in Java/Android. It's easy to learn and simple to
* Gradle:
```gradle
// JDK 1.8 or above:
-compile 'com.landawn:abacus-util:1.7.3'
+compile 'com.landawn:abacus-util:1.7.4'
// JDK 1.7:
-compile 'com.landawn:abacus-util-jdk7:1.7.3'
+compile 'com.landawn:abacus-util-jdk7:1.7.4'
// Android (Java 1.7):
-compile 'abacus-android-jdk7:1.7.3'
+compile 'abacus-android-jdk7:1.7.4'
// Android-SE (Java 1.7) - small edition without Stream/Matrix/Sheet/...:
-compile 'abacus-android-se-jdk7:1.7.3'
+compile 'abacus-android-se-jdk7:1.7.4'
// Android (Java 1.8 or above):
-compile 'com.landawn:abacus-android:1.7.3'
+compile 'com.landawn:abacus-android:1.7.4'
// Android-SE (Java 1.8 or above) - small edition without Stream/Matrix/Sheet/...:
-compile 'com.landawn:abacus-android-se:1.7.3'
+compile 'com.landawn:abacus-android-se:1.7.4'
```
### Functional Programming:
(It's very important to learn Lambdas and Stream APIs in Java 8 to get the best user experiences with the APIs provided in AbacusUtil)
diff --git a/docs/ExceptionalStream.gif b/docs/ExceptionalStream.gif
index 0ce29a29..5a2993d3 100644
Binary files a/docs/ExceptionalStream.gif and b/docs/ExceptionalStream.gif differ
diff --git a/docs/Seq.gif b/docs/Seq.gif
index 617b0517..182d822c 100644
Binary files a/docs/Seq.gif and b/docs/Seq.gif differ
diff --git a/lib/abacus-android-1.7.3.jar b/lib/abacus-android-1.7.4.jar
similarity index 83%
rename from lib/abacus-android-1.7.3.jar
rename to lib/abacus-android-1.7.4.jar
index ef257be8..50c4b9c6 100644
Binary files a/lib/abacus-android-1.7.3.jar and b/lib/abacus-android-1.7.4.jar differ
diff --git a/lib/abacus-android-jdk7-1.7.3.jar b/lib/abacus-android-jdk7-1.7.4.jar
similarity index 82%
rename from lib/abacus-android-jdk7-1.7.3.jar
rename to lib/abacus-android-jdk7-1.7.4.jar
index 74c28cb2..83cc8afe 100644
Binary files a/lib/abacus-android-jdk7-1.7.3.jar and b/lib/abacus-android-jdk7-1.7.4.jar differ
diff --git a/lib/abacus-android-se-1.7.3.jar b/lib/abacus-android-se-1.7.4.jar
similarity index 82%
rename from lib/abacus-android-se-1.7.3.jar
rename to lib/abacus-android-se-1.7.4.jar
index c0a7ef33..ecc929a6 100644
Binary files a/lib/abacus-android-se-1.7.3.jar and b/lib/abacus-android-se-1.7.4.jar differ
diff --git a/lib/abacus-android-se-jdk7-1.7.3.jar b/lib/abacus-android-se-jdk7-1.7.4.jar
similarity index 82%
rename from lib/abacus-android-se-jdk7-1.7.3.jar
rename to lib/abacus-android-se-jdk7-1.7.4.jar
index 89bbaecd..497bc3e2 100644
Binary files a/lib/abacus-android-se-jdk7-1.7.3.jar and b/lib/abacus-android-se-jdk7-1.7.4.jar differ
diff --git a/lib/abacus-util-1.7.3.jar b/lib/abacus-util-1.7.4.jar
similarity index 81%
rename from lib/abacus-util-1.7.3.jar
rename to lib/abacus-util-1.7.4.jar
index e9b29536..efe8cef8 100644
Binary files a/lib/abacus-util-1.7.3.jar and b/lib/abacus-util-1.7.4.jar differ
diff --git a/lib/abacus-util-jdk7-1.7.3.jar b/lib/abacus-util-jdk7-1.7.4.jar
similarity index 81%
rename from lib/abacus-util-jdk7-1.7.3.jar
rename to lib/abacus-util-jdk7-1.7.4.jar
index 8bc40b8a..1110329c 100644
Binary files a/lib/abacus-util-jdk7-1.7.3.jar and b/lib/abacus-util-jdk7-1.7.4.jar differ
diff --git a/src/com/landawn/abacus/DataSet.java b/src/com/landawn/abacus/DataSet.java
index 1ec3ad2e..7a6738ba 100644
--- a/src/com/landawn/abacus/DataSet.java
+++ b/src/com/landawn/abacus/DataSet.java
@@ -52,6 +52,7 @@
* @author Haiyang Li
*
* @see com.landawn.abacus.util.DataSetUtil
+ * @see com.landawn.abacus.util.Build.DataSetBuilder
* @see com.landawn.abacus.util.JdbcUtil
* @see com.landawn.abacus.util.CSVUtil
* @see com.landawn.abacus.util.function.IntFunction
@@ -186,6 +187,8 @@ public interface DataSet {
void swapRows(int rowIndexA, int rowIndexB);
/**
+ * There is NO underline auto-conversion from column value to target type: {@code T}.
+ * So the column values must be the type which is assignable to target type.
*
* @param rowIndex
* @param columnIndex
@@ -194,12 +197,17 @@ public interface DataSet {
T get(int rowIndex, int columnIndex);
/**
- * @param targetClass
+ * There is NO underline auto-conversion from column value to target type: {@code T}.
+ * So the column values must be the type which is assignable to target type.
+ *
+ * @param targetType
* @param rowIndex
* @param columnIndex
* @return
+ * @deprecated may be misused because it implies there is an underline auto-conversion from column values to target return type but actually there is not.
*/
- T get(Class targetClass, int rowIndex, int columnIndex);
+ @Deprecated
+ T get(Class targetType, int rowIndex, int columnIndex);
/**
*
@@ -217,39 +225,54 @@ public interface DataSet {
*/
boolean isNull(int rowIndex, int columnIndex);
- /**
+ /**
+ * There is NO underline auto-conversion from column value to target type: {@code T}.
+ * So the column values must be the type which is assignable to target type.
*
* @param columnIndex
* @return
*/
T get(int columnIndex);
- /**
+ /**
+ * There is NO underline auto-conversion from column value to target type: {@code T}.
+ * So the column values must be the type which is assignable to target type.
*
- * @param targetClass
- * @param columnIndex
+ * @param columnName
* @return
*/
- T get(Class targetClass, int columnIndex);
+ T get(String columnName);
/**
+ * There is NO underline auto-conversion from column value to target type: {@code T}.
+ * So the column values must be the type which is assignable to target type.
*
- * @param columnName
+ * @param targetType
+ * @param columnIndex
* @return
+ * @deprecated may be misused because it implies there is an underline auto-conversion from column values to target return type but actually there is not.
*/
- T get(String columnName);
+ @Deprecated
+ T get(Class targetType, int columnIndex);
- /**
+ /**
+ * There is NO underline auto-conversion from column value to target type: {@code T}.
+ * So the column values must be the type which is assignable to target type.
*
- * @param targetClass
+ * @param targetType
* @param columnName
* @return
+ * @deprecated may be misused because it implies there is an underline auto-conversion from column values to target return type but actually there is not.
*/
- T get(Class targetClass, String columnName);
+ @Deprecated
+ T get(Class targetType, String columnName);
/**
* Returns the value from the current row and specified column if the specified {@code columnIndex} is equal or bigger than zero,
* or the specified {@code defaultValue} otherwise.
+ *
+ * There is NO underline auto-conversion from column value to target type: {@code T}.
+ * So the column values must be the type which is assignable to target type.
*
* @param columnIndex
* @param defaultValue
@@ -262,6 +285,9 @@ public interface DataSet {
/**
* Returns the value from the current row and specified column if the specified {@code columnName} exists,
* or the specified {@code defaultValue} otherwise.
+ *
+ * There is NO underline auto-conversion from column value to target type: {@code T}.
+ * So the column values must be the type which is assignable to target type.
*
* @param columnName
* @param defaultValue
@@ -273,6 +299,9 @@ public interface DataSet {
/**
* Return default value (false) if the property is null.
+ *
+ * There is NO underline auto-conversion from column value to target type: {@code Boolean}.
+ * So the column values must be the type which is assignable to target type.
*
* @param columnIndex
* @return
@@ -281,6 +310,9 @@ public interface DataSet {
/**
* Return default value (false) if the property is null.
+ *
+ * There is NO underline auto-conversion from column value to target type: {@code Boolean}.
+ * So the column values must be the type which is assignable to target type.
*
* @param columnName
* @return
@@ -289,6 +321,9 @@ public interface DataSet {
/**
* Return default value (0) if the property is null.
+ *
+ * There is NO underline auto-conversion from column value to target type: {@code Character}.
+ * So the column values must be the type which is assignable to target type.
*
* @param columnIndex
* @return
@@ -297,6 +332,9 @@ public interface DataSet {
/**
* Return default value (0) if the property is null.
+ *
+ * There is NO underline auto-conversion from column value to target type: {@code Character}.
+ * So the column values must be the type which is assignable to target type.
*
* @param columnName
* @return
@@ -305,6 +343,9 @@ public interface DataSet {
/**
* Return default value (0) if the property is null. Return Number.byteValue() otherwise.
+ *
+ * There is NO underline auto-conversion from column value to target type: {@code Byte}.
+ * So the column values must be the type which is assignable to target type, or {@code Number}.
*
* @param columnIndex
* @return
@@ -313,6 +354,9 @@ public interface DataSet {
/**
* Return default value (0) if the property is null. Return Number.byteValue() otherwise.
+ *
+ * There is NO underline auto-conversion from column value to target type: {@code Byte}.
+ * So the column values must be the type which is assignable to target type, or {@code Number}.
*
* @param columnName
* @return
@@ -321,6 +365,9 @@ public interface DataSet {
/**
* Return default value (0) if the property is null. Return Number.shortValue() otherwise.
+ *
+ * There is NO underline auto-conversion from column value to target type: {@code Short}.
+ * So the column values must be the type which is assignable to target type, or {@code Number}.
*
* @param columnIndex
* @return
@@ -329,6 +376,9 @@ public interface DataSet {
/**
* Return default value (0) if the property is null. Return Number.shortValue() otherwise.
+ *
+ * There is NO underline auto-conversion from column value to target type: {@code Short}.
+ * So the column values must be the type which is assignable to target type, or {@code Number}.
*
* @param columnName
* @return
@@ -337,6 +387,9 @@ public interface DataSet {
/**
* Return default value (0) if the property is null. Return Number.intValue() otherwise.
+ *
+ * There is NO underline auto-conversion from column value to target type: {@code Integer}.
+ * So the column values must be the type which is assignable to target type, or {@code Number}.
*
* @param columnIndex
* @return
@@ -345,6 +398,9 @@ public interface DataSet {
/**
* Return default value (0) if the property is null. Return Number.intValue() otherwise.
+ *
+ * There is NO underline auto-conversion from column value to target type: {@code Integer}.
+ * So the column values must be the type which is assignable to target type, or {@code Number}.
*
* @param columnName
* @return
@@ -353,6 +409,9 @@ public interface DataSet {
/**
* Return default value (0) if the property is null. Return Number.longValue() otherwise.
+ *
+ * There is NO underline auto-conversion from column value to target type: {@code Long}.
+ * So the column values must be the type which is assignable to target type, or {@code Number}.
*
* @param columnIndex
* @return
@@ -361,6 +420,9 @@ public interface DataSet {
/**
* Return default value (0) if the property is null. Return Number.longValue() otherwise.
+ *
+ * There is NO underline auto-conversion from column value to target type: {@code Long}.
+ * So the column values must be the type which is assignable to target type, or {@code Number}.
*
* @param columnName
* @return
@@ -369,6 +431,9 @@ public interface DataSet {
/**
* Return default value (0f) if the property is null. Return Number.floatValue() otherwise.
+ *
+ * There is NO underline auto-conversion from column value to target type: {@code Float}.
+ * So the column values must be the type which is assignable to target type, or {@code Number}.
*
* @param columnIndex
* @return
@@ -377,6 +442,9 @@ public interface DataSet {
/**
* Return default value (0f) if the property is null. Return Number.floatValue() otherwise.
+ *
+ * There is NO underline auto-conversion from column value to target type: {@code Float}.
+ * So the column values must be the type which is assignable to target type, or {@code Number}.
*
* @param columnName
* @return
@@ -385,6 +453,9 @@ public interface DataSet {
/**
* Return default value (0d) if the property is null. Return Number.doubleValue() otherwise.
+ *
+ * There is NO underline auto-conversion from column value to target type: {@code Double}.
+ * So the column values must be the type which is assignable to target type, or {@code Number}.
*
* @param columnIndex
* @return
@@ -393,6 +464,9 @@ public interface DataSet {
/**
* Return default value (0d) if the property is null. Return Number.doubleValue() otherwise.
+ *
+ * There is NO underline auto-conversion from column value to target type: {@code Double}.
+ * So the column values must be the type which is assignable to target type, or {@code Number}.
*
* @param columnName
* @return
diff --git a/src/com/landawn/abacus/cache/SpyMemcached.java b/src/com/landawn/abacus/cache/SpyMemcached.java
index 6c1c0943..1bc708d8 100644
--- a/src/com/landawn/abacus/cache/SpyMemcached.java
+++ b/src/com/landawn/abacus/cache/SpyMemcached.java
@@ -39,7 +39,7 @@
* @author Haiyang Li
*/
public class SpyMemcached extends AbstractDistributedCacheClient {
- private static final Logger logger = LoggerFactory.getLogger(SpyMemcached.class);
+ static final Logger logger = LoggerFactory.getLogger(SpyMemcached.class);
private MemcachedClient mc;
public SpyMemcached(final String serverUrl) {
@@ -218,9 +218,7 @@ protected net.spy.memcached.MemcachedClient createSpyMemcachedClient(String serv
try {
return new net.spy.memcached.MemcachedClient(connFactory, AddrUtil.getAddressList(serverUrl));
} catch (IOException e) {
- String msg = "Failed to create Memcached client.";
- logger.warn(msg, e);
- throw new UncheckedIOException(msg, e);
+ throw new UncheckedIOException("Failed to create Memcached client.", e);
}
}
}
diff --git a/src/com/landawn/abacus/core/RowDataSet.java b/src/com/landawn/abacus/core/RowDataSet.java
index d44cc72c..75b7319b 100644
--- a/src/com/landawn/abacus/core/RowDataSet.java
+++ b/src/com/landawn/abacus/core/RowDataSet.java
@@ -458,10 +458,10 @@ public T get(final int rowIndex, final int columnIndex) {
}
@Override
- public T get(final Class targetClass, final int rowIndex, final int columnIndex) {
+ public T get(final Class targetType, final int rowIndex, final int columnIndex) {
T rt = (T) _columnList.get(columnIndex).get(rowIndex);
- return (rt == null) ? N.defaultValueOf(targetClass) : rt;
+ return (rt == null) ? N.defaultValueOf(targetType) : rt;
}
@Override
@@ -485,10 +485,10 @@ public T get(final int columnIndex) {
}
@Override
- public T get(final Class targetClass, final int columnIndex) {
+ public T get(final Class targetType, final int columnIndex) {
T rt = get(columnIndex);
- return (rt == null) ? N.defaultValueOf(targetClass) : rt;
+ return (rt == null) ? N.defaultValueOf(targetType) : rt;
}
@SuppressWarnings("unchecked")
@@ -498,8 +498,8 @@ public T get(final String columnName) {
}
@Override
- public T get(final Class targetClass, final String columnName) {
- return get(targetClass, checkColumnName(columnName));
+ public T get(final Class targetType, final String columnName) {
+ return get(targetType, checkColumnName(columnName));
}
@Override
diff --git a/src/com/landawn/abacus/dataSource/AbstractConnectionManager.java b/src/com/landawn/abacus/dataSource/AbstractConnectionManager.java
index 777203ca..2089479b 100644
--- a/src/com/landawn/abacus/dataSource/AbstractConnectionManager.java
+++ b/src/com/landawn/abacus/dataSource/AbstractConnectionManager.java
@@ -60,7 +60,7 @@
* @author Haiyang Li
*/
abstract class AbstractConnectionManager implements ConnectionManager {
- private static final Logger logger = LoggerFactory.getLogger(AbstractConnectionManager.class);
+ static final Logger logger = LoggerFactory.getLogger(AbstractConnectionManager.class);
protected final Map properties;
protected final Properties connectionProperties;
@@ -253,9 +253,7 @@ protected DataSource createJNDIDataSource(Map properties) {
return (DataSource) ctx.lookup(jndiName);
} catch (NamingException e) {
- String msg = "Failed to bind to JNDI: " + jndiName + ". " + AbacusException.getErrorMsg(e);
- logger.warn(msg);
- throw new UncheckedException(msg, e);
+ throw new UncheckedException("Failed to bind to JNDI: " + jndiName + ". " + AbacusException.getErrorMsg(e), e);
}
}
diff --git a/src/com/landawn/abacus/dataSource/C3P0ConnectionManager.java b/src/com/landawn/abacus/dataSource/C3P0ConnectionManager.java
index 8929ddd8..d1fe488c 100644
--- a/src/com/landawn/abacus/dataSource/C3P0ConnectionManager.java
+++ b/src/com/landawn/abacus/dataSource/C3P0ConnectionManager.java
@@ -39,7 +39,7 @@
* @author Haiyang Li
*/
class C3P0ConnectionManager extends AbstractConnectionManager {
- private static final Logger logger = LoggerFactory.getLogger(C3P0ConnectionManager.class);
+ static final Logger logger = LoggerFactory.getLogger(C3P0ConnectionManager.class);
private final DataSource ds;
private final com.mchange.v2.c3p0.ComboPooledDataSource cpds;
@@ -101,9 +101,7 @@ public int getNumActive() {
try {
return cpds.getNumConnections();
} catch (SQLException e) {
- String msg = AbacusException.getErrorMsg(e);
- logger.warn(msg);
- throw new UncheckedSQLException(msg, e);
+ throw new UncheckedSQLException(AbacusException.getErrorMsg(e), e);
}
}
@@ -112,9 +110,7 @@ public Connection getConnection() {
try {
return ds.getConnection();
} catch (SQLException e) {
- String msg = AbacusException.getErrorMsg(e);
- logger.warn(msg);
- throw new UncheckedSQLException(msg, e);
+ throw new UncheckedSQLException(AbacusException.getErrorMsg(e), e);
}
}
@@ -124,9 +120,7 @@ public void closeConnection(Connection conn) {
try {
conn.close();
} catch (SQLException e) {
- String msg = AbacusException.getErrorMsg(e);
- logger.warn(msg);
- throw new UncheckedSQLException(msg, e);
+ throw new UncheckedSQLException(AbacusException.getErrorMsg(e), e);
}
}
}
diff --git a/src/com/landawn/abacus/dataSource/DBCPConnectionManager.java b/src/com/landawn/abacus/dataSource/DBCPConnectionManager.java
index fec5c5b4..9f7c8122 100644
--- a/src/com/landawn/abacus/dataSource/DBCPConnectionManager.java
+++ b/src/com/landawn/abacus/dataSource/DBCPConnectionManager.java
@@ -31,6 +31,7 @@
import com.landawn.abacus.exception.UncheckedSQLException;
import com.landawn.abacus.logging.Logger;
import com.landawn.abacus.logging.LoggerFactory;
+import com.landawn.abacus.util.N;
/**
*
@@ -39,7 +40,7 @@
* @author Haiyang Li
*/
class DBCPConnectionManager extends AbstractConnectionManager {
- private static final Logger logger = LoggerFactory.getLogger(DBCPConnectionManager.class);
+ static final Logger logger = LoggerFactory.getLogger(DBCPConnectionManager.class);
private final DataSource ds;
private final org.apache.commons.dbcp.BasicDataSource bds;
@@ -54,9 +55,7 @@ public DBCPConnectionManager(Map props) {
try {
bds = (org.apache.commons.dbcp.BasicDataSource) org.apache.commons.dbcp.BasicDataSourceFactory.createDataSource(new Properties());
} catch (Exception e) {
- String msg = AbacusException.getErrorMsg(e);
- logger.warn(msg);
- throw new RuntimeException(msg, e);
+ throw N.toRuntimeException(e);
}
bds.setDriverClassName(properties.get(DRIVER));
@@ -101,9 +100,7 @@ public Connection getConnection() {
try {
return ds.getConnection();
} catch (SQLException e) {
- String msg = AbacusException.getErrorMsg(e);
- logger.warn(msg);
- throw new UncheckedSQLException(msg, e);
+ throw new UncheckedSQLException(AbacusException.getErrorMsg(e), e);
}
}
@@ -113,9 +110,7 @@ public void closeConnection(Connection conn) {
try {
conn.close();
} catch (SQLException e) {
- String msg = AbacusException.getErrorMsg(e);
- logger.warn(msg);
- throw new UncheckedSQLException(msg, e);
+ throw new UncheckedSQLException(AbacusException.getErrorMsg(e), e);
}
}
}
@@ -131,9 +126,7 @@ public void close() {
try {
bds.close();
} catch (SQLException e) {
- String msg = AbacusException.getErrorMsg(e);
- logger.warn(msg);
- throw new UncheckedSQLException(msg, e);
+ throw new UncheckedSQLException(AbacusException.getErrorMsg(e), e);
}
}
}
diff --git a/src/com/landawn/abacus/dataSource/HikariConnectionManager.java b/src/com/landawn/abacus/dataSource/HikariConnectionManager.java
index 9911e4dc..41dc9967 100644
--- a/src/com/landawn/abacus/dataSource/HikariConnectionManager.java
+++ b/src/com/landawn/abacus/dataSource/HikariConnectionManager.java
@@ -31,7 +31,7 @@
* @author Haiyang Li
*/
class HikariConnectionManager extends AbstractConnectionManager {
- private static final Logger logger = LoggerFactory.getLogger(HikariConnectionManager.class);
+ static final Logger logger = LoggerFactory.getLogger(HikariConnectionManager.class);
private final com.zaxxer.hikari.HikariDataSource ds;
@@ -74,9 +74,7 @@ public Connection getConnection() {
try {
return ds.getConnection();
} catch (SQLException e) {
- String msg = AbacusException.getErrorMsg(e);
- logger.warn(msg);
- throw new UncheckedSQLException(msg, e);
+ throw new UncheckedSQLException(AbacusException.getErrorMsg(e), e);
}
}
@@ -86,9 +84,7 @@ public void closeConnection(Connection conn) {
try {
conn.close();
} catch (SQLException e) {
- String msg = AbacusException.getErrorMsg(e);
- logger.warn(msg);
- throw new UncheckedSQLException(msg, e);
+ throw new UncheckedSQLException(AbacusException.getErrorMsg(e), e);
}
}
}
diff --git a/src/com/landawn/abacus/dataSource/PoolableConnection.java b/src/com/landawn/abacus/dataSource/PoolableConnection.java
index 26ee29d2..2b812210 100644
--- a/src/com/landawn/abacus/dataSource/PoolableConnection.java
+++ b/src/com/landawn/abacus/dataSource/PoolableConnection.java
@@ -78,7 +78,7 @@ void cachePreparedStatement(PoolablePreparedStatement stmt) {
CachedStatmentKey id = stmt.getId();
try {
- stmt.clearParameters();
+ stmt.reset();
synchronized (cachedStatementPool) {
if (cachedStatementPool.containsKey(id)) {
diff --git a/src/com/landawn/abacus/dataSource/PoolablePreparedStatement.java b/src/com/landawn/abacus/dataSource/PoolablePreparedStatement.java
index 8cd4cbb0..a1843cdc 100644
--- a/src/com/landawn/abacus/dataSource/PoolablePreparedStatement.java
+++ b/src/com/landawn/abacus/dataSource/PoolablePreparedStatement.java
@@ -1358,6 +1358,7 @@ public void setEscapeProcessing(boolean enable) throws SQLException {
*/
@Override
public void setFetchDirection(int direction) throws SQLException {
+ this.fetchDirection = internalStmt.getFetchDirection();
internalStmt.setFetchDirection(direction);
}
@@ -1370,6 +1371,7 @@ public void setFetchDirection(int direction) throws SQLException {
*/
@Override
public void setFetchSize(int rows) throws SQLException {
+ this.fetchSize = internalStmt.getFetchSize();
internalStmt.setFetchSize(rows);
}
@@ -1382,6 +1384,7 @@ public void setFetchSize(int rows) throws SQLException {
*/
@Override
public void setMaxFieldSize(int max) throws SQLException {
+ this.maxFieldSize = internalStmt.getMaxFieldSize();
internalStmt.setMaxFieldSize(max);
}
@@ -1394,31 +1397,33 @@ public void setMaxFieldSize(int max) throws SQLException {
*/
@Override
public void setMaxRows(int max) throws SQLException {
+ this.maxRows = internalStmt.getMaxRows();
internalStmt.setMaxRows(max);
}
/**
- * Method setPoolable.
+ * Method setQueryTimeout.
*
- * @param poolable
+ * @param seconds
* @throws SQLException
- * @see java.sql.Statement#setPoolable(boolean)
+ * @see java.sql.Statement#setQueryTimeout(int)
*/
@Override
- public void setPoolable(boolean poolable) throws SQLException {
- internalStmt.setPoolable(poolable);
+ public void setQueryTimeout(int seconds) throws SQLException {
+ this.queryTimeout = internalStmt.getQueryTimeout();
+ internalStmt.setQueryTimeout(seconds);
}
/**
- * Method setQueryTimeout.
+ * Method setPoolable.
*
- * @param seconds
+ * @param poolable
* @throws SQLException
- * @see java.sql.Statement#setQueryTimeout(int)
+ * @see java.sql.Statement#setPoolable(boolean)
*/
@Override
- public void setQueryTimeout(int seconds) throws SQLException {
- internalStmt.setQueryTimeout(seconds);
+ public void setPoolable(boolean poolable) throws SQLException {
+ internalStmt.setPoolable(poolable);
}
/**
@@ -1488,6 +1493,38 @@ public boolean isCloseOnCompletion() throws SQLException {
return internalStmt.isCloseOnCompletion();
}
+ private int fetchSize = -1;
+ private int fetchDirection = -1;
+ private int maxRows = -1;
+ private int maxFieldSize = -1;
+ private int queryTimeout = -1;
+
+ protected void reset() throws SQLException {
+ // internalStmt.clearParameters();
+ // internalStmt.clearBatch();
+ // internalStmt.clearWarnings();
+
+ if (fetchSize != -1) {
+ internalStmt.setFetchSize(fetchSize);
+ }
+
+ if (fetchDirection != -1) {
+ internalStmt.setFetchDirection(fetchDirection);
+ }
+
+ if (maxRows != -1) {
+ internalStmt.setMaxRows(maxRows);
+ }
+
+ if (maxFieldSize != -1) {
+ internalStmt.setMaxFieldSize(maxFieldSize);
+ }
+
+ if (queryTimeout != -1) {
+ internalStmt.setQueryTimeout(queryTimeout);
+ }
+ }
+
static class ResultSetProxy implements ResultSet {
private final ResultSet internalRS;
private final PoolablePreparedStatement poolableStmt;
diff --git a/src/com/landawn/abacus/dataSource/SQLConnectionManager.java b/src/com/landawn/abacus/dataSource/SQLConnectionManager.java
index b4569092..fee23bf4 100644
--- a/src/com/landawn/abacus/dataSource/SQLConnectionManager.java
+++ b/src/com/landawn/abacus/dataSource/SQLConnectionManager.java
@@ -46,6 +46,7 @@
import com.landawn.abacus.util.ClassUtil;
import com.landawn.abacus.util.Configuration;
import com.landawn.abacus.util.JdbcUtil;
+import com.landawn.abacus.util.N;
/**
*
@@ -184,9 +185,7 @@ public Connection getConnection() {
}
if (conn == null) {
- String msg = "Can not get connection. Max active connection is " + maxActive + ". Current active connection: " + xpool.size();
- logger.warn(msg);
- throw new RuntimeException(msg);
+ throw new RuntimeException("Can not get connection. Max active connection is " + maxActive + ". Current active connection: " + xpool.size());
}
}
@@ -376,7 +375,6 @@ private synchronized PoolableConnection newConnection() {
} catch (SQLException e) {
String msg = "Faied to create new connection for data source '" + url + "'." + " [Active connection number]: " + (xpool.size() + 1) + ". "
+ AbacusException.getErrorMsg(e);
- logger.error(msg, e);
throw new UncheckedSQLException(msg, e);
}
}
@@ -476,9 +474,7 @@ class DriverManagerDataSource extends AbstractDataSource {
try {
DriverManager.registerDriver((Driver) ClassUtil.forClass(driver).newInstance());
} catch (Exception e) {
- String msg = AbacusException.getErrorMsg(e);
- logger.warn(msg);
- throw new RuntimeException(msg, e);
+ throw N.toRuntimeException(e);
}
}
diff --git a/src/com/landawn/abacus/dataSource/SQLDataSource.java b/src/com/landawn/abacus/dataSource/SQLDataSource.java
index 547cfa8b..9706d987 100644
--- a/src/com/landawn/abacus/dataSource/SQLDataSource.java
+++ b/src/com/landawn/abacus/dataSource/SQLDataSource.java
@@ -96,7 +96,6 @@ public SQLDataSource(DataSourceConfiguration dsConfig) {
databaseProductVersion = metaData.getDatabaseProductVersion();
defaultConnectionIsolation = conn.getTransactionIsolation();
} catch (SQLException e) {
- logger.warn(AbacusException.getErrorMsg(e));
throw new UncheckedSQLException(e);
} finally {
close(conn);
@@ -148,7 +147,6 @@ public SQLDataSource(Map props) {
databaseProductVersion = metaData.getDatabaseProductVersion();
defaultConnectionIsolation = conn.getTransactionIsolation();
} catch (SQLException e) {
- logger.warn(AbacusException.getErrorMsg(e));
throw new UncheckedSQLException(e);
} finally {
close(conn);
@@ -216,9 +214,7 @@ private ConnectionManager createConnectionManager(String provider, Map ContinuableFuture insert(final String sql, final Object... parameters) {
- return asyncExecutor.execute(new Callable() {
+ public final ContinuableFuture insert(final String sql, final Object... parameters) {
+ return asyncExecutor.execute(new Callable() {
@Override
- public T call() throws Exception {
+ public ID call() throws Exception {
return sqlExecutor.insert(sql, parameters);
}
});
}
@SafeVarargs
- public final ContinuableFuture insert(final String sql, final StatementSetter statementSetter, final Object... parameters) {
- return asyncExecutor.execute(new Callable() {
+ public final ContinuableFuture insert(final String sql, final StatementSetter statementSetter, final Object... parameters) {
+ return asyncExecutor.execute(new Callable() {
@Override
- public T call() throws Exception {
+ public ID call() throws Exception {
return sqlExecutor.insert(sql, statementSetter, parameters);
}
});
}
@SafeVarargs
- public final ContinuableFuture insert(final String sql, final JdbcSettings jdbcSettings, final Object... parameters) {
- return asyncExecutor.execute(new Callable() {
+ public final ContinuableFuture insert(final String sql, final JdbcSettings jdbcSettings, final Object... parameters) {
+ return asyncExecutor.execute(new Callable() {
@Override
- public T call() throws Exception {
+ public ID call() throws Exception {
return sqlExecutor.insert(sql, jdbcSettings, parameters);
}
});
}
@SafeVarargs
- public final ContinuableFuture insert(final String sql, final StatementSetter statementSetter, final JdbcSettings jdbcSettings,
+ public final ContinuableFuture insert(final String sql, final StatementSetter statementSetter, final JdbcSettings jdbcSettings,
final Object... parameters) {
- return asyncExecutor.execute(new Callable() {
+ return asyncExecutor.execute(new Callable() {
@Override
- public T call() throws Exception {
+ public ID call() throws Exception {
return sqlExecutor.insert(sql, statementSetter, jdbcSettings, parameters);
}
});
}
@SafeVarargs
- public final ContinuableFuture insert(final Connection conn, final String sql, final Object... parameters) {
- return asyncExecutor.execute(new Callable() {
+ public final ContinuableFuture insert(final Connection conn, final String sql, final Object... parameters) {
+ return asyncExecutor.execute(new Callable() {
@Override
- public T call() throws Exception {
+ public ID call() throws Exception {
return sqlExecutor.insert(conn, sql, parameters);
}
});
}
@SafeVarargs
- public final ContinuableFuture insert(final Connection conn, final String sql, final StatementSetter statementSetter, final Object... parameters) {
- return asyncExecutor.execute(new Callable() {
+ public final ContinuableFuture insert(final Connection conn, final String sql, final StatementSetter statementSetter, final Object... parameters) {
+ return asyncExecutor.execute(new Callable() {
@Override
- public T call() throws Exception {
+ public ID call() throws Exception {
return sqlExecutor.insert(conn, sql, statementSetter, parameters);
}
});
}
@SafeVarargs
- public final ContinuableFuture insert(final Connection conn, final String sql, final JdbcSettings jdbcSettings, final Object... parameters) {
- return asyncExecutor.execute(new Callable() {
+ public final ContinuableFuture insert(final Connection conn, final String sql, final JdbcSettings jdbcSettings, final Object... parameters) {
+ return asyncExecutor.execute(new Callable() {
@Override
- public T call() throws Exception {
+ public ID call() throws Exception {
return sqlExecutor.insert(conn, sql, jdbcSettings, parameters);
}
});
}
@SafeVarargs
- public final ContinuableFuture insert(final Connection conn, final String sql, final StatementSetter statementSetter,
+ public final ContinuableFuture insert(final Connection conn, final String sql, final StatementSetter statementSetter,
final JdbcSettings jdbcSettings, final Object... parameters) {
- return asyncExecutor.execute(new Callable() {
+ return asyncExecutor.execute(new Callable() {
@Override
- public T call() throws Exception {
+ public ID call() throws Exception {
return sqlExecutor.insert(conn, sql, statementSetter, jdbcSettings, parameters);
}
});
}
- public ContinuableFuture> batchInsert(final String sql, final List> parametersList) {
- return asyncExecutor.execute(new Callable>() {
+ public ContinuableFuture> batchInsert(final String sql, final List> parametersList) {
+ return asyncExecutor.execute(new Callable>() {
@Override
- public List call() throws Exception {
+ public List call() throws Exception {
return sqlExecutor.batchInsert(sql, parametersList);
}
});
}
- public ContinuableFuture> batchInsert(final String sql, final StatementSetter statementSetter, final List> parametersList) {
- return asyncExecutor.execute(new Callable>() {
+ public ContinuableFuture> batchInsert(final String sql, final StatementSetter statementSetter, final List> parametersList) {
+ return asyncExecutor.execute(new Callable>() {
@Override
- public List call() throws Exception {
+ public List call() throws Exception {
return sqlExecutor.batchInsert(sql, statementSetter, parametersList);
}
});
}
- public ContinuableFuture> batchInsert(final String sql, final JdbcSettings jdbcSettings, final List> parametersList) {
- return asyncExecutor.execute(new Callable>() {
+ public ContinuableFuture> batchInsert(final String sql, final JdbcSettings jdbcSettings, final List> parametersList) {
+ return asyncExecutor.execute(new Callable>() {
@Override
- public List call() throws Exception {
+ public List call() throws Exception {
return sqlExecutor.batchInsert(sql, jdbcSettings, parametersList);
}
});
}
- public ContinuableFuture> batchInsert(final String sql, final StatementSetter statementSetter, final JdbcSettings jdbcSettings,
+ public ContinuableFuture> batchInsert(final String sql, final StatementSetter statementSetter, final JdbcSettings jdbcSettings,
final List> parametersList) {
- return asyncExecutor.execute(new Callable>() {
+ return asyncExecutor.execute(new Callable>() {
@Override
- public List call() throws Exception {
+ public List call() throws Exception {
return sqlExecutor.batchInsert(sql, statementSetter, jdbcSettings, parametersList);
}
});
}
- public ContinuableFuture> batchInsert(final Connection conn, final String sql, final List> parametersList) {
- return asyncExecutor.execute(new Callable>() {
+ public ContinuableFuture> batchInsert(final Connection conn, final String sql, final List> parametersList) {
+ return asyncExecutor.execute(new Callable>() {
@Override
- public List call() throws Exception {
+ public List call() throws Exception {
return sqlExecutor.batchInsert(conn, sql, parametersList);
}
});
}
- public ContinuableFuture> batchInsert(final Connection conn, final String sql, final StatementSetter statementSetter,
+ public ContinuableFuture> batchInsert(final Connection conn, final String sql, final StatementSetter statementSetter,
final List> parametersList) {
- return asyncExecutor.execute(new Callable>() {
+ return asyncExecutor.execute(new Callable>() {
@Override
- public List call() throws Exception {
+ public List call() throws Exception {
return sqlExecutor.batchInsert(conn, sql, statementSetter, parametersList);
}
});
}
- public ContinuableFuture> batchInsert(final Connection conn, final String sql, final JdbcSettings jdbcSettings, final List> parametersList) {
- return asyncExecutor.execute(new Callable>() {
+ public ContinuableFuture> batchInsert(final Connection conn, final String sql, final JdbcSettings jdbcSettings,
+ final List> parametersList) {
+ return asyncExecutor.execute(new Callable>() {
@Override
- public List call() throws Exception {
+ public List call() throws Exception {
return sqlExecutor.batchInsert(conn, sql, jdbcSettings, parametersList);
}
});
}
- public ContinuableFuture> batchInsert(final Connection conn, final String sql, final StatementSetter statementSetter,
+ public ContinuableFuture> batchInsert(final Connection conn, final String sql, final StatementSetter statementSetter,
final JdbcSettings jdbcSettings, final List> parametersList) {
- return asyncExecutor.execute(new Callable>() {
+ return asyncExecutor.execute(new Callable>() {
@Override
- public List call() throws Exception {
+ public List call() throws Exception {
return sqlExecutor.batchInsert(conn, sql, statementSetter, jdbcSettings, parametersList);
}
});
@@ -521,89 +522,88 @@ public Optional call() throws Exception {
}
@SafeVarargs
- public final ContinuableFuture> get(final String sql, final JdbcUtil.RecordGetter recordGetter,
- final Object... parameters) {
+ public final ContinuableFuture> get(final String sql, final JdbcUtil.RowMapper rowMapper, final Object... parameters) {
return asyncExecutor.execute(new Callable>() {
@Override
public Optional call() throws Exception {
- return sqlExecutor.get(sql, recordGetter, parameters);
+ return sqlExecutor.get(sql, rowMapper, parameters);
}
});
}
@SafeVarargs
public final ContinuableFuture> get(final String sql, final StatementSetter statementSetter,
- final JdbcUtil.RecordGetter recordGetter, final Object... parameters) {
+ final JdbcUtil.RowMapper rowMapper, final Object... parameters) {
return asyncExecutor.execute(new Callable>() {
@Override
public Optional call() throws Exception {
- return sqlExecutor.get(sql, statementSetter, recordGetter, parameters);
+ return sqlExecutor.get(sql, statementSetter, rowMapper, parameters);
}
});
}
@SafeVarargs
- public final ContinuableFuture> get(final String sql, final JdbcUtil.RecordGetter recordGetter,
+ public final ContinuableFuture> get(final String sql, final JdbcUtil.RowMapper rowMapper,
final JdbcSettings jdbcSettings, final Object... parameters) {
return asyncExecutor.execute(new Callable>() {
@Override
public Optional call() throws Exception {
- return sqlExecutor.get(sql, recordGetter, jdbcSettings, parameters);
+ return sqlExecutor.get(sql, rowMapper, jdbcSettings, parameters);
}
});
}
@SafeVarargs
public final ContinuableFuture> get(final String sql, final StatementSetter statementSetter,
- final JdbcUtil.RecordGetter recordGetter, final JdbcSettings jdbcSettings, final Object... parameters) {
+ final JdbcUtil.RowMapper rowMapper, final JdbcSettings jdbcSettings, final Object... parameters) {
return asyncExecutor.execute(new Callable>() {
@Override
public Optional call() throws Exception {
- return sqlExecutor.get(sql, statementSetter, recordGetter, jdbcSettings, parameters);
+ return sqlExecutor.get(sql, statementSetter, rowMapper, jdbcSettings, parameters);
}
});
}
@SafeVarargs
- public final ContinuableFuture> get(final Connection conn, final String sql, final JdbcUtil.RecordGetter recordGetter,
+ public final ContinuableFuture> get(final Connection conn, final String sql, final JdbcUtil.RowMapper rowMapper,
final Object... parameters) {
return asyncExecutor.execute(new Callable>() {
@Override
public Optional call() throws Exception {
- return sqlExecutor.get(conn, sql, recordGetter, parameters);
+ return sqlExecutor.get(conn, sql, rowMapper, parameters);
}
});
}
@SafeVarargs
public final ContinuableFuture> get(final Connection conn, final String sql, final StatementSetter statementSetter,
- final JdbcUtil.RecordGetter recordGetter, final Object... parameters) {
+ final JdbcUtil.RowMapper rowMapper, final Object... parameters) {
return asyncExecutor.execute(new Callable>() {
@Override
public Optional call() throws Exception {
- return sqlExecutor.get(conn, sql, statementSetter, recordGetter, parameters);
+ return sqlExecutor.get(conn, sql, statementSetter, rowMapper, parameters);
}
});
}
@SafeVarargs
- public final ContinuableFuture> get(final Connection conn, final String sql, final JdbcUtil.RecordGetter recordGetter,
+ public final ContinuableFuture> get(final Connection conn, final String sql, final JdbcUtil.RowMapper rowMapper,
final JdbcSettings jdbcSettings, final Object... parameters) {
return asyncExecutor.execute(new Callable>() {
@Override
public Optional call() throws Exception {
- return sqlExecutor.get(conn, sql, recordGetter, jdbcSettings, parameters);
+ return sqlExecutor.get(conn, sql, rowMapper, jdbcSettings, parameters);
}
});
}
@SafeVarargs
public final ContinuableFuture> get(final Connection conn, final String sql, final StatementSetter statementSetter,
- final JdbcUtil.RecordGetter recordGetter, final JdbcSettings jdbcSettings, final Object... parameters) {
+ final JdbcUtil.RowMapper rowMapper, final JdbcSettings jdbcSettings, final Object... parameters) {
return asyncExecutor.execute(new Callable>() {
@Override
public Optional call() throws Exception {
- return sqlExecutor.get(conn, sql, statementSetter, recordGetter, jdbcSettings, parameters);
+ return sqlExecutor.get(conn, sql, statementSetter, rowMapper, jdbcSettings, parameters);
}
});
}
@@ -694,88 +694,88 @@ public T call() throws Exception {
}
@SafeVarargs
- public final ContinuableFuture gett(final String sql, final JdbcUtil.RecordGetter recordGetter, final Object... parameters) {
+ public final ContinuableFuture gett(final String sql, final JdbcUtil.RowMapper rowMapper, final Object... parameters) {
return asyncExecutor.execute(new Callable() {
@Override
public T call() throws Exception {
- return sqlExecutor.gett(sql, recordGetter, parameters);
+ return sqlExecutor.gett(sql, rowMapper, parameters);
}
});
}
@SafeVarargs
- public final ContinuableFuture gett(final String sql, final StatementSetter statementSetter,
- final JdbcUtil.RecordGetter recordGetter, final Object... parameters) {
+ public final ContinuableFuture gett(final String sql, final StatementSetter statementSetter, final JdbcUtil.RowMapper rowMapper,
+ final Object... parameters) {
return asyncExecutor.execute(new Callable() {
@Override
public T call() throws Exception {
- return sqlExecutor.gett(sql, statementSetter, recordGetter, parameters);
+ return sqlExecutor.gett(sql, statementSetter, rowMapper, parameters);
}
});
}
@SafeVarargs
- public final ContinuableFuture gett(final String sql, final JdbcUtil.RecordGetter recordGetter, final JdbcSettings jdbcSettings,
+ public final ContinuableFuture gett(final String sql, final JdbcUtil.RowMapper rowMapper, final JdbcSettings jdbcSettings,
final Object... parameters) {
return asyncExecutor.execute(new Callable() {
@Override
public T call() throws Exception {
- return sqlExecutor.gett(sql, recordGetter, jdbcSettings, parameters);
+ return sqlExecutor.gett(sql, rowMapper, jdbcSettings, parameters);
}
});
}
@SafeVarargs
- public final ContinuableFuture gett(final String sql, final StatementSetter statementSetter,
- final JdbcUtil.RecordGetter recordGetter, final JdbcSettings jdbcSettings, final Object... parameters) {
+ public final ContinuableFuture gett(final String sql, final StatementSetter statementSetter, final JdbcUtil.RowMapper rowMapper,
+ final JdbcSettings jdbcSettings, final Object... parameters) {
return asyncExecutor.execute(new Callable() {
@Override
public T call() throws Exception {
- return sqlExecutor.gett(sql, statementSetter, recordGetter, jdbcSettings, parameters);
+ return sqlExecutor.gett(sql, statementSetter, rowMapper, jdbcSettings, parameters);
}
});
}
@SafeVarargs
- public final ContinuableFuture gett(final Connection conn, final String sql, final JdbcUtil.RecordGetter recordGetter,
+ public final ContinuableFuture gett(final Connection conn, final String sql, final JdbcUtil.RowMapper rowMapper,
final Object... parameters) {
return asyncExecutor.execute(new Callable() {
@Override
public T call() throws Exception {
- return sqlExecutor.gett(conn, sql, recordGetter, parameters);
+ return sqlExecutor.gett(conn, sql, rowMapper, parameters);
}
});
}
@SafeVarargs
public final ContinuableFuture gett(final Connection conn, final String sql, final StatementSetter statementSetter,
- final JdbcUtil.RecordGetter recordGetter, final Object... parameters) {
+ final JdbcUtil.RowMapper rowMapper, final Object... parameters) {
return asyncExecutor.execute(new Callable() {
@Override
public T call() throws Exception {
- return sqlExecutor.gett(conn, sql, statementSetter, recordGetter, parameters);
+ return sqlExecutor.gett(conn, sql, statementSetter, rowMapper, parameters);
}
});
}
@SafeVarargs
- public final ContinuableFuture gett(final Connection conn, final String sql, final JdbcUtil.RecordGetter recordGetter,
+ public final ContinuableFuture gett(final Connection conn, final String sql, final JdbcUtil.RowMapper rowMapper,
final JdbcSettings jdbcSettings, final Object... parameters) {
return asyncExecutor.execute(new Callable