commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thecarlh...@apache.org
Subject [51/58] [abbrv] commons-dbutils git commit: Changed protected methods to package private for AbstractExecutor
Date Fri, 07 Jul 2017 02:07:13 GMT
Changed protected methods to package private for AbstractExecutor

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/dbutils/branches/2_0@1482407 13f79535-47bb-0310-9956-ffa450edef68


Project: http://git-wip-us.apache.org/repos/asf/commons-dbutils/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-dbutils/commit/c0dba072
Tree: http://git-wip-us.apache.org/repos/asf/commons-dbutils/tree/c0dba072
Diff: http://git-wip-us.apache.org/repos/asf/commons-dbutils/diff/c0dba072

Branch: refs/heads/2_0
Commit: c0dba072dfa319bd54c617eaffdd97eb85fc69ee
Parents: 8914548
Author: Bill Speirs <wspeirs@apache.org>
Authored: Tue May 14 15:45:33 2013 +0000
Committer: Bill Speirs <wspeirs@apache.org>
Committed: Tue May 14 15:45:33 2013 +0000

----------------------------------------------------------------------
 .../commons/dbutils2/AbstractExecutor.java      | 25 ++++++++++----------
 1 file changed, 12 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-dbutils/blob/c0dba072/src/main/java/org/apache/commons/dbutils2/AbstractExecutor.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbutils2/AbstractExecutor.java b/src/main/java/org/apache/commons/dbutils2/AbstractExecutor.java
index d7bcc96..89f99e7 100644
--- a/src/main/java/org/apache/commons/dbutils2/AbstractExecutor.java
+++ b/src/main/java/org/apache/commons/dbutils2/AbstractExecutor.java
@@ -87,7 +87,7 @@ abstract class AbstractExecutor<T extends AbstractExecutor<T>>
{
      * 
      * @return the SQL statement passed into the constructor.
      */
-    protected String getSql() {
+    String getSql() {
         return sql;
     }
 
@@ -96,7 +96,7 @@ abstract class AbstractExecutor<T extends AbstractExecutor<T>>
{
      * 
      * @return the underlying prepared statement.
      */
-    protected PreparedStatement getStatement() {
+    PreparedStatement getStatement() {
         return stmt;
     }
 
@@ -105,7 +105,7 @@ abstract class AbstractExecutor<T extends AbstractExecutor<T>>
{
      * 
      * @return the underlying connection.
      */
-    protected Connection getConnection() {
+    Connection getConnection() {
         return conn;
     }
 
@@ -114,7 +114,7 @@ abstract class AbstractExecutor<T extends AbstractExecutor<T>>
{
      * 
      * @throws SQLException if there are unmapped params.
      */
-    protected void throwIfUnmappedParams() throws SQLException {
+    void throwIfUnmappedParams() throws SQLException {
         if (paramPosMap.size() != 0) {
             final Set<String> unmappedParams = paramPosMap.keySet();
             final StringBuilder sb = new StringBuilder("There are unbound parameters: ");
@@ -178,7 +178,7 @@ abstract class AbstractExecutor<T extends AbstractExecutor<T>>
{
      * @return this
      * @throws SQLException if there is an SQLException during binding.
      */
-    protected T bindNull(String name, int sqlType, boolean removeFromPosMap) throws SQLException
{
+    T bindNull(String name, int sqlType, boolean removeFromPosMap) throws SQLException {
         name = name.replace(COLON, ""); // so we can take ":name" or "name"
 
         final List<Integer> pos = removeFromPosMap ? paramPosMap.remove(name) : paramPosMap.get(name);
@@ -211,7 +211,7 @@ abstract class AbstractExecutor<T extends AbstractExecutor<T>>
{
      * @return this
      * @throws SQLException if there is an SQLException during binding.
      */
-    protected T bind(String name, final Object value, boolean removeFromPosMap) throws SQLException
{
+    T bind(String name, final Object value, boolean removeFromPosMap) throws SQLException
{
         name = name.replace(COLON, ""); // so we can take ":name" or "name"
 
         final List<Integer> pos = removeFromPosMap ? paramPosMap.remove(name) : paramPosMap.get(name);
@@ -239,7 +239,7 @@ abstract class AbstractExecutor<T extends AbstractExecutor<T>>
{
     /**
      * Used for batch calls so we can clear the map after the addBatch call.
      */
-    protected void clearValueMap() {
+    void clearValueMap() {
         paramValueMap.clear();
     }
 
@@ -251,7 +251,7 @@ abstract class AbstractExecutor<T extends AbstractExecutor<T>>
{
      *
      * @throws SQLException if a database access error occurs
      */
-    protected void rethrow(SQLException cause) throws SQLException {
+    void rethrow(SQLException cause) throws SQLException {
         String causeMessage = cause.getMessage();
 
         if (causeMessage == null) {
@@ -286,7 +286,7 @@ abstract class AbstractExecutor<T extends AbstractExecutor<T>>
{
      * @param rs The <code>ResultSet</code> to decorate; never <code>null</code>.
      * @return The <code>ResultSet</code> wrapped in some decorator.
      */
-    protected ResultSet wrap(ResultSet rs) {
+    ResultSet wrap(ResultSet rs) {
         return rs;
     }
 
@@ -298,7 +298,7 @@ abstract class AbstractExecutor<T extends AbstractExecutor<T>>
{
      * @param conn Connection to close
      * @throws SQLException if a database access error occurs
      */
-    protected void close(Connection conn) throws SQLException {
+    void close(Connection conn) throws SQLException {
         DbUtils.close(conn);
     }
 
@@ -310,7 +310,7 @@ abstract class AbstractExecutor<T extends AbstractExecutor<T>>
{
      * @param stmt Statement to close
      * @throws SQLException if a database access error occurs
      */
-    protected void close(Statement stmt) throws SQLException {
+    void close(Statement stmt) throws SQLException {
         DbUtils.close(stmt);
     }
 
@@ -322,9 +322,8 @@ abstract class AbstractExecutor<T extends AbstractExecutor<T>>
{
      * @param rs ResultSet to close
      * @throws SQLException if a database access error occurs
      */
-    protected void close(ResultSet rs) throws SQLException {
+    void close(ResultSet rs) throws SQLException {
         DbUtils.close(rs);
     }
 
-
 }


Mime
View raw message