You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by si...@apache.org on 2011/09/16 22:50:32 UTC
svn commit: r1171771 - in
/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils: ./
handlers/ wrappers/
Author: simonetripodi
Date: Fri Sep 16 20:50:31 2011
New Revision: 1171771
URL: http://svn.apache.org/viewvc?rev=1171771&view=rev
Log:
removed trailing spaces
Modified:
commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/AbstractQueryRunner.java
commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/AsyncQueryRunner.java
commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/BasicRowProcessor.java
commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/AbstractKeyedHandler.java
commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/AbstractListHandler.java
commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/ArrayHandler.java
commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/ArrayListHandler.java
commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/BeanHandler.java
commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/BeanListHandler.java
commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/ColumnListHandler.java
commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/KeyedHandler.java
commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/MapHandler.java
commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/MapListHandler.java
commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/ScalarHandler.java
commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSet.java
commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/wrappers/StringTrimmedResultSet.java
Modified: commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/AbstractQueryRunner.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/AbstractQueryRunner.java?rev=1171771&r1=1171770&r2=1171771&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/AbstractQueryRunner.java (original)
+++ commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/AbstractQueryRunner.java Fri Sep 16 20:50:31 2011
@@ -33,7 +33,7 @@ import java.util.Arrays;
import javax.sql.DataSource;
/**
- * The base class for QueryRunner & AsyncQueryRunner.
+ * The base class for QueryRunner & AsyncQueryRunner.
* This class is thread safe.
*/
public abstract class AbstractQueryRunner {
@@ -41,7 +41,7 @@ public abstract class AbstractQueryRunne
* Is {@link ParameterMetaData#getParameterType(int)} broken (have we tried it yet)?
*/
protected volatile boolean pmdKnownBroken = false;
-
+
/**
* The DataSource to retrieve connections from.
*/
@@ -61,26 +61,26 @@ public abstract class AbstractQueryRunne
* and if it breaks, we'll remember not to use it again.
*/
public AbstractQueryRunner(boolean pmdKnownBroken) {
- this.pmdKnownBroken = pmdKnownBroken;
+ this.pmdKnownBroken = pmdKnownBroken;
ds = null;
}
-
+
/**
* Constructor to provide a <code>DataSource</code>.
* Methods that do not take a <code>Connection</code> parameter will
* retrieve connections from this <code>DataSource</code>.
- *
+ *
* @param ds The <code>DataSource</code> to retrieve connections from.
*/
public AbstractQueryRunner(DataSource ds) {
this.ds = ds;
}
-
+
/**
- * Constructor to allow workaround for Oracle drivers. Methods that do not take a
+ * Constructor to allow workaround for Oracle drivers. Methods that do not take a
* <code>Connection</code> parameter will retrieve connections from this
* <code>DataSource</code>.
- *
+ *
* @param ds The <code>DataSource</code> to retrieve connections from.
* @param pmdKnownBroken Oracle drivers don't support {@link ParameterMetaData#getParameterType(int) };
* if <code>pmdKnownBroken</code> is set to true, we won't even try it; if false, we'll try it,
@@ -92,7 +92,7 @@ public abstract class AbstractQueryRunne
}
/**
- * Returns the <code>DataSource</code> this runner is using.
+ * Returns the <code>DataSource</code> this runner is using.
* <code>QueryRunner</code> methods always call this method to get the
* <code>DataSource</code> so subclasses can provide specialized
* behavior.
@@ -105,14 +105,14 @@ public abstract class AbstractQueryRunne
/**
- * Factory method that creates and initializes a
- * <code>PreparedStatement</code> object for the given SQL.
- * <code>QueryRunner</code> methods always call this method to prepare
- * statements for them. Subclasses can override this method to provide
+ * Factory method that creates and initializes a
+ * <code>PreparedStatement</code> object for the given SQL.
+ * <code>QueryRunner</code> methods always call this method to prepare
+ * statements for them. Subclasses can override this method to provide
* special PreparedStatement configuration if needed. This implementation
* simply calls <code>conn.prepareStatement(sql)</code>.
- *
- * @param conn The <code>Connection</code> used to create the
+ *
+ * @param conn The <code>Connection</code> used to create the
* <code>PreparedStatement</code>
* @param sql The SQL statement to prepare.
* @return An initialized <code>PreparedStatement</code>.
@@ -120,18 +120,18 @@ public abstract class AbstractQueryRunne
*/
protected PreparedStatement prepareStatement(Connection conn, String sql)
throws SQLException {
-
+
return conn.prepareStatement(sql);
}
-
+
/**
- * Factory method that creates and initializes a
- * <code>Connection</code> object. <code>QueryRunner</code> methods
- * always call this method to retrieve connections from its DataSource.
- * Subclasses can override this method to provide
- * special <code>Connection</code> configuration if needed. This
+ * Factory method that creates and initializes a
+ * <code>Connection</code> object. <code>QueryRunner</code> methods
+ * always call this method to retrieve connections from its DataSource.
+ * Subclasses can override this method to provide
+ * special <code>Connection</code> configuration if needed. This
* implementation simply calls <code>ds.getConnection()</code>.
- *
+ *
* @return An initialized <code>Connection</code>.
* @throws SQLException if a database access error occurs
* @since DbUtils 1.1
@@ -145,7 +145,7 @@ public abstract class AbstractQueryRunne
}
/**
- * Fill the <code>PreparedStatement</code> replacement parameters with
+ * Fill the <code>PreparedStatement</code> replacement parameters with
* the given objects.
* @param stmt PreparedStatement to fill
* @param params Query replacement parameters; <code>null</code> is a valid
@@ -160,7 +160,7 @@ public abstract class AbstractQueryRunne
pmd = stmt.getParameterMetaData();
int stmtCount = pmd.getParameterCount();
int paramsCount = params == null ? 0 : params.length;
-
+
if (stmtCount != paramsCount) {
throw new SQLException("Wrong number of parameters: expected "
+ stmtCount + ", was given " + paramsCount);
@@ -177,7 +177,7 @@ public abstract class AbstractQueryRunne
stmt.setObject(i + 1, params[i]);
} else {
// VARCHAR works with many drivers regardless
- // of the actual column type. Oddly, NULL and
+ // of the actual column type. Oddly, NULL and
// OTHER don't work with Oracle's drivers.
int sqlType = Types.VARCHAR;
if (!pmdKnownBroken) {
@@ -195,7 +195,7 @@ public abstract class AbstractQueryRunne
/**
* Fill the <code>PreparedStatement</code> replacement parameters with the
* given object's bean property values.
- *
+ *
* @param stmt
* PreparedStatement to fill
* @param bean
@@ -225,7 +225,7 @@ public abstract class AbstractQueryRunne
throw new RuntimeException("Couldn't invoke method with 0 arguments: " + method, e);
} catch (IllegalAccessException e) {
throw new RuntimeException("Couldn't invoke method: " + method, e);
- }
+ }
params[i] = value;
}
fillStatement(stmt, params);
@@ -234,7 +234,7 @@ public abstract class AbstractQueryRunne
/**
* Fill the <code>PreparedStatement</code> replacement parameters with the
* given object's bean property values.
- *
+ *
* @param stmt PreparedStatement to fill
* @param bean A JavaBean object
* @param propertyNames An ordered array of property names (these should match the
@@ -275,15 +275,15 @@ public abstract class AbstractQueryRunne
/**
* Throws a new exception with a more informative error message.
- *
- * @param cause The original exception that will be chained to the new
- * exception when it's rethrown.
- *
+ *
+ * @param cause The original exception that will be chained to the new
+ * exception when it's rethrown.
+ *
* @param sql The query that was executing when the exception happened.
- *
- * @param params The query replacement parameters; <code>null</code> is a
+ *
+ * @param params The query replacement parameters; <code>null</code> is a
* valid value to pass in.
- *
+ *
* @throws SQLException if a database access error occurs
*/
protected void rethrow(SQLException cause, String sql, Object... params)
@@ -318,27 +318,27 @@ public abstract class AbstractQueryRunne
* without any decoration.
*
* <p>
- * Often, the implementation of this method can be done in an anonymous
+ * Often, the implementation of this method can be done in an anonymous
* inner class like this:
* </p>
- * <pre>
+ * <pre>
* QueryRunner run = new QueryRunner() {
* protected ResultSet wrap(ResultSet rs) {
* return StringTrimmedResultSet.wrap(rs);
* }
* };
* </pre>
- *
- * @param rs The <code>ResultSet</code> to decorate; never
+ *
+ * @param rs The <code>ResultSet</code> to decorate; never
* <code>null</code>.
- * @return The <code>ResultSet</code> wrapped in some decorator.
+ * @return The <code>ResultSet</code> wrapped in some decorator.
*/
protected ResultSet wrap(ResultSet rs) {
return rs;
}
-
+
/**
- * Close a <code>Connection</code>. This implementation avoids closing if
+ * Close a <code>Connection</code>. This implementation avoids closing if
* null and does <strong>not</strong> suppress any exceptions. Subclasses
* can override to provide special handling like logging.
* @param conn Connection to close
@@ -348,9 +348,9 @@ public abstract class AbstractQueryRunne
protected void close(Connection conn) throws SQLException {
DbUtils.close(conn);
}
-
+
/**
- * Close a <code>Statement</code>. This implementation avoids closing if
+ * Close a <code>Statement</code>. This implementation avoids closing if
* null and does <strong>not</strong> suppress any exceptions. Subclasses
* can override to provide special handling like logging.
* @param stmt Statement to close
@@ -362,7 +362,7 @@ public abstract class AbstractQueryRunne
}
/**
- * Close a <code>ResultSet</code>. This implementation avoids closing if
+ * Close a <code>ResultSet</code>. This implementation avoids closing if
* null and does <strong>not</strong> suppress any exceptions. Subclasses
* can override to provide special handling like logging.
* @param rs ResultSet to close
Modified: commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/AsyncQueryRunner.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/AsyncQueryRunner.java?rev=1171771&r1=1171770&r2=1171771&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/AsyncQueryRunner.java (original)
+++ commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/AsyncQueryRunner.java Fri Sep 16 20:50:31 2011
@@ -26,9 +26,9 @@ import java.util.concurrent.Callable;
import javax.sql.DataSource;
/**
- * Executes SQL queries with pluggable strategies for handling
+ * Executes SQL queries with pluggable strategies for handling
* <code>ResultSet</code>s. This class is thread safe.
- *
+ *
* @see ResultSetHandler
* @since 1.4
*/
@@ -38,7 +38,7 @@ public class AsyncQueryRunner extends Ab
* Constructor for AsyncQueryRunner.
*/
public AsyncQueryRunner() {
- super(null, false);
+ super(null, false);
}
/**
@@ -48,14 +48,14 @@ public class AsyncQueryRunner extends Ab
* and if it breaks, we'll remember not to use it again.
*/
public AsyncQueryRunner(boolean pmdKnownBroken) {
- super(null, pmdKnownBroken);
+ super(null, pmdKnownBroken);
}
/**
- * Constructor for AsyncQueryRunner which takes a <code>DataSource</code>. Methods that do not take a
+ * Constructor for AsyncQueryRunner which takes a <code>DataSource</code>. Methods that do not take a
* <code>Connection</code> parameter will retrieve connections from this
* <code>DataSource</code>.
- *
+ *
* @param ds The <code>DataSource</code> to retrieve connections from.
*/
public AsyncQueryRunner(DataSource ds) {
@@ -63,10 +63,10 @@ public class AsyncQueryRunner extends Ab
}
/**
- * Constructor for QueryRunner, allows workaround for Oracle drivers. Methods that do not take a
+ * Constructor for QueryRunner, allows workaround for Oracle drivers. Methods that do not take a
* <code>Connection</code> parameter will retrieve connections from this
* <code>DataSource</code>.
- *
+ *
* @param ds The <code>DataSource</code> to retrieve connections from.
* @param pmdKnownBroken Oracle drivers don't support {@link ParameterMetaData#getParameterType(int) };
* if <code>pmdKnownBroken</code> is set to true, we won't even try it; if false, we'll try it,
@@ -116,12 +116,12 @@ public class AsyncQueryRunner extends Ab
/**
* Execute a batch of SQL INSERT, UPDATE, or DELETE queries.
- *
+ *
* @param conn The <code>Connection</code> to use to run the query. The caller is
* responsible for closing this Connection.
* @param sql The SQL to execute.
* @param params An array of query replacement parameters. Each row in
- * this array is one set of batch replacement values.
+ * this array is one set of batch replacement values.
* @return A <code>Callable</code> which returns the number of rows updated per statement.
* @throws SQLException if a database access error occurs
* @since DbUtils 1.1
@@ -131,14 +131,14 @@ public class AsyncQueryRunner extends Ab
}
/**
- * Execute a batch of SQL INSERT, UPDATE, or DELETE queries. The
- * <code>Connection</code> is retrieved from the <code>DataSource</code>
- * set in the constructor. This <code>Connection</code> must be in
- * auto-commit mode or the update will not be saved.
- *
+ * Execute a batch of SQL INSERT, UPDATE, or DELETE queries. The
+ * <code>Connection</code> is retrieved from the <code>DataSource</code>
+ * set in the constructor. This <code>Connection</code> must be in
+ * auto-commit mode or the update will not be saved.
+ *
* @param sql The SQL to execute.
* @param params An array of query replacement parameters. Each row in
- * this array is one set of batch replacement values.
+ * this array is one set of batch replacement values.
* @return A <code>Callable</code> which returns the number of rows updated per statement.
* @throws SQLException if a database access error occurs
* @since DbUtils 1.1
@@ -155,7 +155,7 @@ public class AsyncQueryRunner extends Ab
* @param closeConn True if the connection should be closed, false otherwise.
* @param sql The SQL statement to execute.
* @param params An array of query replacement parameters. Each row in
- * this array is one set of batch replacement values.
+ * this array is one set of batch replacement values.
* @return A <code>Callable</code> which returns the number of rows updated per statement.
* @throws SQLException If there are database or parameter errors.
*/
@@ -248,7 +248,7 @@ public class AsyncQueryRunner extends Ab
* @param closeConn True if the connection should be closed, false otherwise.
* @param sql The SQL statement to execute.
* @param params An array of query replacement parameters. Each row in
- * this array is one set of query replacement values.
+ * this array is one set of query replacement values.
* @return A <code>Callable</code> which returns the result of the query call.
* @throws SQLException If there are database or parameter errors.
*/
@@ -275,7 +275,7 @@ public class AsyncQueryRunner extends Ab
try {
stmt = this.prepareStatement(conn, sql);
this.fillStatement(stmt, params);
-
+
ret = new QueryCallableStatement<T>(conn, closeConn, stmt, rsh, sql, params);
} catch (SQLException e) {
@@ -319,13 +319,13 @@ public class AsyncQueryRunner extends Ab
/**
* Executes the given SELECT SQL query and returns a result object.
- * The <code>Connection</code> is retrieved from the
+ * The <code>Connection</code> is retrieved from the
* <code>DataSource</code> set in the constructor.
* @param <T> The type of object that the handler returns
* @param sql The SQL statement to execute.
- * @param rsh The handler used to create the result object from
+ * @param rsh The handler used to create the result object from
* the <code>ResultSet</code>.
- * @param params Initialize the PreparedStatement's IN parameters with
+ * @param params Initialize the PreparedStatement's IN parameters with
* this array.
* @return A <code>Callable</code> which returns the result of the query call.
* @throws SQLException if a database access error occurs
@@ -341,9 +341,9 @@ public class AsyncQueryRunner extends Ab
* <code>DataSource</code> set in the constructor.
* @param <T> The type of object that the handler returns
* @param sql The SQL statement to execute.
- * @param rsh The handler used to create the result object from
+ * @param rsh The handler used to create the result object from
* the <code>ResultSet</code>.
- *
+ *
* @return A <code>Callable</code> which returns the result of the query call.
* @throws SQLException if a database access error occurs
*/
@@ -382,7 +382,7 @@ public class AsyncQueryRunner extends Ab
if(closeConn)
close(conn);
}
-
+
return rows;
}
@@ -394,7 +394,7 @@ public class AsyncQueryRunner extends Ab
* @param closeConn True if the connection should be closed, false otherwise.
* @param sql The SQL statement to execute.
* @param params An array of update replacement parameters. Each row in
- * this array is one set of update replacement values.
+ * this array is one set of update replacement values.
* @return A <code>Callable</code> which returns the number of rows updated.
* @throws SQLException If there are database or parameter errors.
*/
@@ -431,7 +431,7 @@ public class AsyncQueryRunner extends Ab
/**
* Execute an SQL INSERT, UPDATE, or DELETE query without replacement
* parameters.
- *
+ *
* @param conn The connection to use to run the query.
* @param sql The SQL to execute.
* @return A <code>Callable</code> which returns the number of rows updated.
@@ -444,7 +444,7 @@ public class AsyncQueryRunner extends Ab
/**
* Execute an SQL INSERT, UPDATE, or DELETE query with a single replacement
* parameter.
- *
+ *
* @param conn The connection to use to run the query.
* @param sql The SQL to execute.
* @param param The replacement parameter.
@@ -457,7 +457,7 @@ public class AsyncQueryRunner extends Ab
/**
* Execute an SQL INSERT, UPDATE, or DELETE query.
- *
+ *
* @param conn The connection to use to run the query.
* @param sql The SQL to execute.
* @param params The query replacement parameters.
@@ -470,11 +470,11 @@ public class AsyncQueryRunner extends Ab
/**
* Executes the given INSERT, UPDATE, or DELETE SQL statement without
- * any replacement parameters. The <code>Connection</code> is retrieved
- * from the <code>DataSource</code> set in the constructor. This
- * <code>Connection</code> must be in auto-commit mode or the update will
- * not be saved.
- *
+ * any replacement parameters. The <code>Connection</code> is retrieved
+ * from the <code>DataSource</code> set in the constructor. This
+ * <code>Connection</code> must be in auto-commit mode or the update will
+ * not be saved.
+ *
* @param sql The SQL statement to execute.
* @throws SQLException if a database access error occurs
* @return A <code>Callable</code> which returns the number of rows updated.
@@ -486,11 +486,11 @@ public class AsyncQueryRunner extends Ab
/**
* Executes the given INSERT, UPDATE, or DELETE SQL statement with
- * a single replacement parameter. The <code>Connection</code> is
+ * a single replacement parameter. The <code>Connection</code> is
* retrieved from the <code>DataSource</code> set in the constructor.
- * This <code>Connection</code> must be in auto-commit mode or the
- * update will not be saved.
- *
+ * This <code>Connection</code> must be in auto-commit mode or the
+ * update will not be saved.
+ *
* @param sql The SQL statement to execute.
* @param param The replacement parameter.
* @throws SQLException if a database access error occurs
@@ -502,13 +502,13 @@ public class AsyncQueryRunner extends Ab
}
/**
- * Executes the given INSERT, UPDATE, or DELETE SQL statement. The
- * <code>Connection</code> is retrieved from the <code>DataSource</code>
- * set in the constructor. This <code>Connection</code> must be in
- * auto-commit mode or the update will not be saved.
- *
+ * Executes the given INSERT, UPDATE, or DELETE SQL statement. The
+ * <code>Connection</code> is retrieved from the <code>DataSource</code>
+ * set in the constructor. This <code>Connection</code> must be in
+ * auto-commit mode or the update will not be saved.
+ *
* @param sql The SQL statement to execute.
- * @param params Initializes the PreparedStatement's IN (i.e. '?')
+ * @param params Initializes the PreparedStatement's IN (i.e. '?')
* parameters.
* @throws SQLException if a database access error occurs
* @return A <code>Callable</code> which returns the number of rows updated.
Modified: commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/BasicRowProcessor.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/BasicRowProcessor.java?rev=1171771&r1=1171770&r2=1171771&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/BasicRowProcessor.java (original)
+++ commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/BasicRowProcessor.java Fri Sep 16 20:50:31 2011
@@ -25,11 +25,11 @@ import java.util.Map;
/**
* Basic implementation of the <code>RowProcessor</code> interface.
- *
+ *
* <p>
* This class is thread-safe.
* </p>
- *
+ *
* @see RowProcessor
*/
public class BasicRowProcessor implements RowProcessor {
@@ -49,7 +49,7 @@ public class BasicRowProcessor implement
* Returns the Singleton instance of this class.
*
* @return The single instance of this class.
- * @deprecated Create instances with the constructors instead. This will
+ * @deprecated Create instances with the constructors instead. This will
* be removed after DbUtils 1.1.
*/
@Deprecated
@@ -63,16 +63,16 @@ public class BasicRowProcessor implement
private final BeanProcessor convert;
/**
- * BasicRowProcessor constructor. Bean processing defaults to a
+ * BasicRowProcessor constructor. Bean processing defaults to a
* BeanProcessor instance.
*/
public BasicRowProcessor() {
this(defaultConvert);
}
-
+
/**
* BasicRowProcessor constructor.
- * @param convert The BeanProcessor to use when converting columns to
+ * @param convert The BeanProcessor to use when converting columns to
* bean properties.
* @since DbUtils 1.1
*/
@@ -83,7 +83,7 @@ public class BasicRowProcessor implement
/**
* Convert a <code>ResultSet</code> row into an <code>Object[]</code>.
- * This implementation copies column values into the array in the same
+ * This implementation copies column values into the array in the same
* order they're returned from the <code>ResultSet</code>. Array elements
* will be set to <code>null</code> if the column was SQL NULL.
*
@@ -105,7 +105,7 @@ public class BasicRowProcessor implement
}
/**
- * Convert a <code>ResultSet</code> row into a JavaBean. This
+ * Convert a <code>ResultSet</code> row into a JavaBean. This
* implementation delegates to a BeanProcessor instance.
* @see org.apache.commons.dbutils.RowProcessor#toBean(java.sql.ResultSet, java.lang.Class)
* @see org.apache.commons.dbutils.BeanProcessor#toBean(java.sql.ResultSet, java.lang.Class)
@@ -113,22 +113,22 @@ public class BasicRowProcessor implement
* @param rs ResultSet that supplies the bean data
* @param type Class from which to create the bean instance
* @throws SQLException if a database access error occurs
- * @return the newly created bean
+ * @return the newly created bean
*/
public <T> T toBean(ResultSet rs, Class<T> type) throws SQLException {
return this.convert.toBean(rs, type);
}
/**
- * Convert a <code>ResultSet</code> into a <code>List</code> of JavaBeans.
- * This implementation delegates to a BeanProcessor instance.
+ * Convert a <code>ResultSet</code> into a <code>List</code> of JavaBeans.
+ * This implementation delegates to a BeanProcessor instance.
* @see org.apache.commons.dbutils.RowProcessor#toBeanList(java.sql.ResultSet, java.lang.Class)
* @see org.apache.commons.dbutils.BeanProcessor#toBeanList(java.sql.ResultSet, java.lang.Class)
* @param <T> The type of bean to create
* @param rs ResultSet that supplies the bean data
* @param type Class from which to create the bean instance
* @throws SQLException if a database access error occurs
- * @return A <code>List</code> of beans with the given type in the order
+ * @return A <code>List</code> of beans with the given type in the order
* they were returned by the <code>ResultSet</code>.
*/
public <T> List<T> toBeanList(ResultSet rs, Class<T> type) throws SQLException {
@@ -136,9 +136,9 @@ public class BasicRowProcessor implement
}
/**
- * Convert a <code>ResultSet</code> row into a <code>Map</code>. This
+ * Convert a <code>ResultSet</code> row into a <code>Map</code>. This
* implementation returns a <code>Map</code> with case insensitive column
- * names as keys. Calls to <code>map.get("COL")</code> and
+ * names as keys. Calls to <code>map.get("COL")</code> and
* <code>map.get("col")</code> return the same value.
* @see org.apache.commons.dbutils.RowProcessor#toMap(java.sql.ResultSet)
* @param rs ResultSet that supplies the map data
@@ -156,16 +156,16 @@ public class BasicRowProcessor implement
return result;
}
-
+
/**
* A Map that converts all keys to lowercase Strings for case insensitive
- * lookups. This is needed for the toMap() implementation because
- * databases don't consistently handle the casing of column names.
- *
+ * lookups. This is needed for the toMap() implementation because
+ * databases don't consistently handle the casing of column names.
+ *
* <p>The keys are stored as they are given [BUG #DBUTILS-34], so we maintain
- * an internal mapping from lowercase keys to the real keys in order to
+ * an internal mapping from lowercase keys to the real keys in order to
* achieve the case insensitive lookup.
- *
+ *
* <p>Note: This implementation does not allow <tt>null</tt>
* for key, whereas {@link HashMap} does, because of the code:
* <pre>
@@ -175,9 +175,9 @@ public class BasicRowProcessor implement
private static class CaseInsensitiveHashMap extends HashMap<String, Object> {
/**
* The internal mapping from lowercase keys to the real keys.
- *
+ *
* <p>
- * Any query operation using the key
+ * Any query operation using the key
* ({@link #get(Object)}, {@link #containsKey(Object)})
* is done in three steps:
* <ul>
@@ -191,9 +191,9 @@ public class BasicRowProcessor implement
/**
* Required for serialization support.
- *
+ *
* @see java.io.Serializable
- */
+ */
private static final long serialVersionUID = -2848100435296897392L;
/** {@inheritDoc} */
@@ -219,7 +219,7 @@ public class BasicRowProcessor implement
public Object put(String key, Object value) {
/*
* In order to keep the map and lowerCaseMap synchronized,
- * we have to remove the old mapping before putting the
+ * we have to remove the old mapping before putting the
* new one. Indeed, oldKey and key are not necessaliry equals.
* (That's why we call super.remove(oldKey) and not just
* super.put(key, value))
@@ -247,5 +247,5 @@ public class BasicRowProcessor implement
return super.remove(realKey);
}
}
-
+
}
Modified: commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/AbstractKeyedHandler.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/AbstractKeyedHandler.java?rev=1171771&r1=1171770&r2=1171771&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/AbstractKeyedHandler.java (original)
+++ commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/AbstractKeyedHandler.java Fri Sep 16 20:50:31 2011
@@ -29,7 +29,7 @@ import org.apache.commons.dbutils.Result
* <code>ResultSet</code> rows are converted into objects (Vs) which are then stored
* in a Map under the given keys (Ks).
* </p>
- *
+ *
* @see org.apache.commons.dbutils.ResultSetHandler
* @since DbUtils 1.3
*/
@@ -37,10 +37,10 @@ public abstract class AbstractKeyedHandl
/**
- * Convert each row's columns into a Map and store then
+ * Convert each row's columns into a Map and store then
* in a <code>Map</code> under <code>ResultSet.getObject(key)</code> key.
* @param rs <code>ResultSet</code> to process.
- * @return A <code>Map</code>, never <code>null</code>.
+ * @return A <code>Map</code>, never <code>null</code>.
* @throws SQLException if a database access error occurs
* @see org.apache.commons.dbutils.ResultSetHandler#handle(java.sql.ResultSet)
*/
Modified: commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/AbstractListHandler.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/AbstractListHandler.java?rev=1171771&r1=1171770&r2=1171771&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/AbstractListHandler.java (original)
+++ commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/AbstractListHandler.java Fri Sep 16 20:50:31 2011
@@ -47,7 +47,7 @@ public abstract class AbstractListHandle
}
return rows;
}
-
+
/**
* Row handler. Method converts current row into some Java object.
*
Modified: commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/ArrayHandler.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/ArrayHandler.java?rev=1171771&r1=1171770&r2=1171771&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/ArrayHandler.java (original)
+++ commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/ArrayHandler.java Fri Sep 16 20:50:31 2011
@@ -24,10 +24,10 @@ import org.apache.commons.dbutils.Result
import org.apache.commons.dbutils.RowProcessor;
/**
- * <code>ResultSetHandler</code> implementation that converts a
- * <code>ResultSet</code> into an <code>Object[]</code>. This class is
+ * <code>ResultSetHandler</code> implementation that converts a
+ * <code>ResultSet</code> into an <code>Object[]</code>. This class is
* thread safe.
- *
+ *
* @see org.apache.commons.dbutils.ResultSetHandler
*/
public class ArrayHandler implements ResultSetHandler<Object[]> {
@@ -40,23 +40,23 @@ public class ArrayHandler implements Res
static final RowProcessor ROW_PROCESSOR = new BasicRowProcessor();
/**
- * The RowProcessor implementation to use when converting rows
+ * The RowProcessor implementation to use when converting rows
* into arrays.
*/
private final RowProcessor convert;
- /**
- * Creates a new instance of ArrayHandler using a
+ /**
+ * Creates a new instance of ArrayHandler using a
* <code>BasicRowProcessor</code> for conversion.
*/
public ArrayHandler() {
this(ROW_PROCESSOR);
}
- /**
+ /**
* Creates a new instance of ArrayHandler.
- *
- * @param convert The <code>RowProcessor</code> implementation
+ *
+ * @param convert The <code>RowProcessor</code> implementation
* to use when converting rows into arrays.
*/
public ArrayHandler(RowProcessor convert) {
@@ -69,7 +69,7 @@ public class ArrayHandler implements Res
* @param rs <code>ResultSet</code> to process.
* @return An Object[] or <code>null</code> if there are no rows in the
* <code>ResultSet</code>.
- *
+ *
* @throws SQLException if a database access error occurs
* @see org.apache.commons.dbutils.ResultSetHandler#handle(java.sql.ResultSet)
*/
Modified: commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/ArrayListHandler.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/ArrayListHandler.java?rev=1171771&r1=1171770&r2=1171771&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/ArrayListHandler.java (original)
+++ commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/ArrayListHandler.java Fri Sep 16 20:50:31 2011
@@ -22,32 +22,32 @@ import java.sql.SQLException;
import org.apache.commons.dbutils.RowProcessor;
/**
- * <code>ResultSetHandler</code> implementation that converts the
+ * <code>ResultSetHandler</code> implementation that converts the
* <code>ResultSet</code> into a <code>List</code> of <code>Object[]</code>s.
* This class is thread safe.
- *
+ *
* @see org.apache.commons.dbutils.ResultSetHandler
*/
public class ArrayListHandler extends AbstractListHandler<Object[]> {
/**
- * The RowProcessor implementation to use when converting rows
+ * The RowProcessor implementation to use when converting rows
* into Object[]s.
*/
private final RowProcessor convert;
- /**
- * Creates a new instance of ArrayListHandler using a
+ /**
+ * Creates a new instance of ArrayListHandler using a
* <code>BasicRowProcessor</code> for conversions.
*/
public ArrayListHandler() {
this(ArrayHandler.ROW_PROCESSOR);
}
- /**
+ /**
* Creates a new instance of ArrayListHandler.
- *
- * @param convert The <code>RowProcessor</code> implementation
+ *
+ * @param convert The <code>RowProcessor</code> implementation
* to use when converting rows into Object[]s.
*/
public ArrayListHandler(RowProcessor convert) {
@@ -55,12 +55,12 @@ public class ArrayListHandler extends Ab
this.convert = convert;
}
-
+
/**
* Convert row's columns into an <code>Object[]</code>.
* @param rs <code>ResultSet</code> to process.
* @return <code>Object[]</code>, never <code>null</code>.
- *
+ *
* @throws SQLException if a database access error occurs
* @see org.apache.commons.dbutils.handlers.AbstractListHandler#handle(ResultSet)
*/
Modified: commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/BeanHandler.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/BeanHandler.java?rev=1171771&r1=1171770&r2=1171771&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/BeanHandler.java (original)
+++ commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/BeanHandler.java Fri Sep 16 20:50:31 2011
@@ -23,9 +23,9 @@ import org.apache.commons.dbutils.Result
import org.apache.commons.dbutils.RowProcessor;
/**
- * <code>ResultSetHandler</code> implementation that converts the first
+ * <code>ResultSetHandler</code> implementation that converts the first
* <code>ResultSet</code> row into a JavaBean. This class is thread safe.
- *
+ *
* @see org.apache.commons.dbutils.ResultSetHandler
*/
public class BeanHandler<T> implements ResultSetHandler<T> {
@@ -36,14 +36,14 @@ public class BeanHandler<T> implements R
private final Class<T> type;
/**
- * The RowProcessor implementation to use when converting rows
+ * The RowProcessor implementation to use when converting rows
* into beans.
*/
private final RowProcessor convert;
- /**
+ /**
* Creates a new instance of BeanHandler.
- *
+ *
* @param type The Class that objects returned from <code>handle()</code>
* are created from.
*/
@@ -51,12 +51,12 @@ public class BeanHandler<T> implements R
this(type, ArrayHandler.ROW_PROCESSOR);
}
- /**
+ /**
* Creates a new instance of BeanHandler.
- *
+ *
* @param type The Class that objects returned from <code>handle()</code>
* are created from.
- * @param convert The <code>RowProcessor</code> implementation
+ * @param convert The <code>RowProcessor</code> implementation
* to use when converting rows into beans.
*/
public BeanHandler(Class<T> type, RowProcessor convert) {
@@ -68,9 +68,9 @@ public class BeanHandler<T> implements R
* Convert the first row of the <code>ResultSet</code> into a bean with the
* <code>Class</code> given in the constructor.
* @param rs <code>ResultSet</code> to process.
- * @return An initialized JavaBean or <code>null</code> if there were no
+ * @return An initialized JavaBean or <code>null</code> if there were no
* rows in the <code>ResultSet</code>.
- *
+ *
* @throws SQLException if a database access error occurs
* @see org.apache.commons.dbutils.ResultSetHandler#handle(java.sql.ResultSet)
*/
Modified: commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/BeanListHandler.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/BeanListHandler.java?rev=1171771&r1=1171770&r2=1171771&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/BeanListHandler.java (original)
+++ commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/BeanListHandler.java Fri Sep 16 20:50:31 2011
@@ -25,9 +25,9 @@ import org.apache.commons.dbutils.RowPro
/**
* <code>ResultSetHandler</code> implementation that converts a
- * <code>ResultSet</code> into a <code>List</code> of beans. This class is
+ * <code>ResultSet</code> into a <code>List</code> of beans. This class is
* thread safe.
- *
+ *
* @see org.apache.commons.dbutils.ResultSetHandler
*/
public class BeanListHandler<T> implements ResultSetHandler<List<T>> {
@@ -38,14 +38,14 @@ public class BeanListHandler<T> implemen
private final Class<T> type;
/**
- * The RowProcessor implementation to use when converting rows
+ * The RowProcessor implementation to use when converting rows
* into beans.
*/
private final RowProcessor convert;
- /**
+ /**
* Creates a new instance of BeanListHandler.
- *
+ *
* @param type The Class that objects returned from <code>handle()</code>
* are created from.
*/
@@ -53,12 +53,12 @@ public class BeanListHandler<T> implemen
this(type, ArrayHandler.ROW_PROCESSOR);
}
- /**
+ /**
* Creates a new instance of BeanListHandler.
- *
+ *
* @param type The Class that objects returned from <code>handle()</code>
* are created from.
- * @param convert The <code>RowProcessor</code> implementation
+ * @param convert The <code>RowProcessor</code> implementation
* to use when converting rows into beans.
*/
public BeanListHandler(Class<T> type, RowProcessor convert) {
@@ -69,11 +69,11 @@ public class BeanListHandler<T> implemen
/**
* Convert the whole <code>ResultSet</code> into a List of beans with
* the <code>Class</code> given in the constructor.
- *
+ *
* @param rs The <code>ResultSet</code> to handle.
- *
+ *
* @return A List of beans, never <code>null</code>.
- *
+ *
* @throws SQLException if a database access error occurs
* @see org.apache.commons.dbutils.RowProcessor#toBeanList(ResultSet, Class)
*/
Modified: commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/ColumnListHandler.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/ColumnListHandler.java?rev=1171771&r1=1171770&r2=1171771&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/ColumnListHandler.java (original)
+++ commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/ColumnListHandler.java Fri Sep 16 20:50:31 2011
@@ -23,7 +23,7 @@ import java.sql.SQLException;
* <code>ResultSetHandler</code> implementation that converts one
* <code>ResultSet</code> column into a <code>List</code> of
* <code>Object</code>s. This class is thread safe.
- *
+ *
* @see org.apache.commons.dbutils.ResultSetHandler
* @since DbUtils 1.1
*/
@@ -40,7 +40,7 @@ public class ColumnListHandler extends A
*/
private final String columnName;
- /**
+ /**
* Creates a new instance of ColumnListHandler. The first column of each
* row will be returned from <code>handle()</code>.
*/
@@ -48,20 +48,20 @@ public class ColumnListHandler extends A
this(1, null);
}
- /**
+ /**
* Creates a new instance of ColumnListHandler.
- *
- * @param columnIndex The index of the column to retrieve from the
+ *
+ * @param columnIndex The index of the column to retrieve from the
* <code>ResultSet</code>.
*/
public ColumnListHandler(int columnIndex) {
this(columnIndex, null);
}
- /**
+ /**
* Creates a new instance of ColumnListHandler.
- *
- * @param columnName The name of the column to retrieve from the
+ *
+ * @param columnName The name of the column to retrieve from the
* <code>ResultSet</code>.
*/
public ColumnListHandler(String columnName) {
@@ -69,24 +69,24 @@ public class ColumnListHandler extends A
}
/** Private Helper
- * @param columnIndex The index of the column to retrieve from the
+ * @param columnIndex The index of the column to retrieve from the
* <code>ResultSet</code>.
- * @param columnName The name of the column to retrieve from the
+ * @param columnName The name of the column to retrieve from the
* <code>ResultSet</code>.
*/
private ColumnListHandler(int columnIndex, String columnName) {
super();
this.columnIndex = columnIndex;
- this.columnName = columnName;
+ this.columnName = columnName;
}
-
+
/**
* Returns one <code>ResultSet</code> column value as <code>Object</code>.
* @param rs <code>ResultSet</code> to process.
* @return <code>Object</code>, never <code>null</code>.
- *
+ *
* @throws SQLException if a database access error occurs
- *
+ *
* @see org.apache.commons.dbutils.handlers.AbstractListHandler#handle(ResultSet)
*/
@Override
Modified: commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/KeyedHandler.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/KeyedHandler.java?rev=1171771&r1=1171770&r2=1171771&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/KeyedHandler.java (original)
+++ commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/KeyedHandler.java Fri Sep 16 20:50:31 2011
@@ -29,7 +29,7 @@ import org.apache.commons.dbutils.RowPro
* in a Map under the given key.
* </p>
* <p>
- * If you had a Person table with a primary key column called ID, you could
+ * If you had a Person table with a primary key column called ID, you could
* retrieve rows from the table like this:
* <pre>
* ResultSetHandler h = new KeyedHandler("id");
@@ -40,11 +40,11 @@ import org.apache.commons.dbutils.RowPro
* </pre>
* Note that the "id" passed to KeyedHandler and "name" and "age" passed to the
* returned Map's get() method can be in any case. The data types returned for
- * name and age are dependent upon how your JDBC driver converts SQL column
- * types from the Person table into Java types.
+ * name and age are dependent upon how your JDBC driver converts SQL column
+ * types from the Person table into Java types.
* </p>
* <p>This class is thread safe.</p>
- *
+ *
* @see org.apache.commons.dbutils.ResultSetHandler
* @since DbUtils 1.1
*/
@@ -62,13 +62,13 @@ public class KeyedHandler extends Abstra
protected final int columnIndex;
/**
- * The column name to retrieve key values from. Either columnName or
+ * The column name to retrieve key values from. Either columnName or
* columnIndex will be used but never both.
*/
protected final String columnName;
- /**
- * Creates a new instance of KeyedHandler. The value of the first column
+ /**
+ * Creates a new instance of KeyedHandler. The value of the first column
* of each row will be a key in the Map.
*/
public KeyedHandler() {
@@ -76,7 +76,7 @@ public class KeyedHandler extends Abstra
}
/**
- * Creates a new instance of KeyedHandler. The value of the first column
+ * Creates a new instance of KeyedHandler. The value of the first column
* of each row will be a key in the Map.
*
* @param convert The <code>RowProcessor</code> implementation
@@ -86,33 +86,33 @@ public class KeyedHandler extends Abstra
this(convert, 1, null);
}
- /**
+ /**
* Creates a new instance of KeyedHandler.
- *
- * @param columnIndex The values to use as keys in the Map are
+ *
+ * @param columnIndex The values to use as keys in the Map are
* retrieved from the column at this index.
*/
public KeyedHandler(int columnIndex) {
this(ArrayHandler.ROW_PROCESSOR, columnIndex, null);
}
- /**
+ /**
* Creates a new instance of KeyedHandler.
- *
- * @param columnName The values to use as keys in the Map are
+ *
+ * @param columnName The values to use as keys in the Map are
* retrieved from the column with this name.
*/
public KeyedHandler(String columnName) {
this(ArrayHandler.ROW_PROCESSOR, 1, columnName);
}
- /** Private Helper
+ /** Private Helper
* @param convert The <code>RowProcessor</code> implementation
* to use when converting rows into Maps
- * @param columnIndex The values to use as keys in the Map are
+ * @param columnIndex The values to use as keys in the Map are
* retrieved from the column at this index.
- * @param columnName The values to use as keys in the Map are
- * retrieved from the column with this name.
+ * @param columnName The values to use as keys in the Map are
+ * retrieved from the column with this name.
*/
private KeyedHandler(RowProcessor convert, int columnIndex,
String columnName) {
@@ -123,9 +123,9 @@ public class KeyedHandler extends Abstra
}
/**
* This factory method is called by <code>handle()</code> to retrieve the
- * key value from the current <code>ResultSet</code> row. This
- * implementation returns <code>ResultSet.getObject()</code> for the
- * configured key column name or index.
+ * key value from the current <code>ResultSet</code> row. This
+ * implementation returns <code>ResultSet.getObject()</code> for the
+ * configured key column name or index.
* @param rs ResultSet to create a key from
* @return Object from the configured key column name/index
* @throws SQLException if a database access error occurs
@@ -138,9 +138,9 @@ public class KeyedHandler extends Abstra
/**
* This factory method is called by <code>handle()</code> to store the
- * current <code>ResultSet</code> row in some object. This
+ * current <code>ResultSet</code> row in some object. This
* implementation returns a <code>Map</code> with case insensitive column
- * names as keys. Calls to <code>map.get("COL")</code> and
+ * names as keys. Calls to <code>map.get("COL")</code> and
* <code>map.get("col")</code> return the same value.
* @param rs ResultSet to create a row from
* @return Object typed Map containing column names to values
Modified: commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/MapHandler.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/MapHandler.java?rev=1171771&r1=1171770&r2=1171771&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/MapHandler.java (original)
+++ commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/MapHandler.java Fri Sep 16 20:50:31 2011
@@ -25,31 +25,31 @@ import org.apache.commons.dbutils.RowPro
/**
* <code>ResultSetHandler</code> implementation that converts the first
- * <code>ResultSet</code> row into a <code>Map</code>. This class is thread
+ * <code>ResultSet</code> row into a <code>Map</code>. This class is thread
* safe.
- *
+ *
* @see org.apache.commons.dbutils.ResultSetHandler
*/
public class MapHandler implements ResultSetHandler<Map<String,Object>> {
/**
- * The RowProcessor implementation to use when converting rows
+ * The RowProcessor implementation to use when converting rows
* into Maps.
*/
private final RowProcessor convert;
- /**
- * Creates a new instance of MapHandler using a
+ /**
+ * Creates a new instance of MapHandler using a
* <code>BasicRowProcessor</code> for conversion.
*/
public MapHandler() {
this(ArrayHandler.ROW_PROCESSOR);
}
- /**
+ /**
* Creates a new instance of MapHandler.
- *
- * @param convert The <code>RowProcessor</code> implementation
+ *
+ * @param convert The <code>RowProcessor</code> implementation
* to use when converting rows into Maps.
*/
public MapHandler(RowProcessor convert) {
@@ -58,14 +58,14 @@ public class MapHandler implements Resul
}
/**
- * Converts the first row in the <code>ResultSet</code> into a
+ * Converts the first row in the <code>ResultSet</code> into a
* <code>Map</code>.
* @param rs <code>ResultSet</code> to process.
- * @return A <code>Map</code> with the values from the first row or
- * <code>null</code> if there are no rows in the <code>ResultSet</code>.
- *
+ * @return A <code>Map</code> with the values from the first row or
+ * <code>null</code> if there are no rows in the <code>ResultSet</code>.
+ *
* @throws SQLException if a database access error occurs
- *
+ *
* @see org.apache.commons.dbutils.ResultSetHandler#handle(java.sql.ResultSet)
*/
public Map<String,Object> handle(ResultSet rs) throws SQLException {
Modified: commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/MapListHandler.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/MapListHandler.java?rev=1171771&r1=1171770&r2=1171771&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/MapListHandler.java (original)
+++ commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/MapListHandler.java Fri Sep 16 20:50:31 2011
@@ -26,29 +26,29 @@ import org.apache.commons.dbutils.RowPro
* <code>ResultSetHandler</code> implementation that converts a
* <code>ResultSet</code> into a <code>List</code> of <code>Map</code>s.
* This class is thread safe.
- *
+ *
* @see org.apache.commons.dbutils.ResultSetHandler
*/
public class MapListHandler extends AbstractListHandler<Map<String,Object>> {
/**
- * The RowProcessor implementation to use when converting rows
+ * The RowProcessor implementation to use when converting rows
* into Maps.
*/
private final RowProcessor convert;
- /**
- * Creates a new instance of MapListHandler using a
+ /**
+ * Creates a new instance of MapListHandler using a
* <code>BasicRowProcessor</code> for conversion.
*/
public MapListHandler() {
this(ArrayHandler.ROW_PROCESSOR);
}
- /**
+ /**
* Creates a new instance of MapListHandler.
- *
- * @param convert The <code>RowProcessor</code> implementation
+ *
+ * @param convert The <code>RowProcessor</code> implementation
* to use when converting rows into Maps.
*/
public MapListHandler(RowProcessor convert) {
@@ -59,10 +59,10 @@ public class MapListHandler extends Abst
/**
* Converts the <code>ResultSet</code> row into a <code>Map</code> object.
* @param rs <code>ResultSet</code> to process.
- * @return A <code>Map</code>, never null.
- *
+ * @return A <code>Map</code>, never null.
+ *
* @throws SQLException if a database access error occurs
- *
+ *
* @see org.apache.commons.dbutils.handlers.AbstractListHandler#handle(ResultSet)
*/
@Override
Modified: commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/ScalarHandler.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/ScalarHandler.java?rev=1171771&r1=1171770&r2=1171771&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/ScalarHandler.java (original)
+++ commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/ScalarHandler.java Fri Sep 16 20:50:31 2011
@@ -24,7 +24,7 @@ import org.apache.commons.dbutils.Result
/**
* <code>ResultSetHandler</code> implementation that converts one
* <code>ResultSet</code> column into an Object. This class is thread safe.
- *
+ *
* @see org.apache.commons.dbutils.ResultSetHandler
*/
public class ScalarHandler implements ResultSetHandler<Object> {
@@ -40,7 +40,7 @@ public class ScalarHandler implements Re
*/
private final String columnName;
- /**
+ /**
* Creates a new instance of ScalarHandler. The first column will
* be returned from <code>handle()</code>.
*/
@@ -48,20 +48,20 @@ public class ScalarHandler implements Re
this(1, null);
}
- /**
+ /**
* Creates a new instance of ScalarHandler.
- *
- * @param columnIndex The index of the column to retrieve from the
+ *
+ * @param columnIndex The index of the column to retrieve from the
* <code>ResultSet</code>.
*/
public ScalarHandler(int columnIndex) {
this(columnIndex, null);
}
- /**
+ /**
* Creates a new instance of ScalarHandler.
- *
- * @param columnName The name of the column to retrieve from the
+ *
+ * @param columnName The name of the column to retrieve from the
* <code>ResultSet</code>.
*/
public ScalarHandler(String columnName) {
@@ -69,26 +69,26 @@ public class ScalarHandler implements Re
}
/** Helper constructor
- * @param columnIndex The index of the column to retrieve from the
+ * @param columnIndex The index of the column to retrieve from the
* <code>ResultSet</code>.
- * @param columnName The name of the column to retrieve from the
+ * @param columnName The name of the column to retrieve from the
* <code>ResultSet</code>.
*/
private ScalarHandler(int columnIndex, String columnName){
this.columnIndex = columnIndex;
- this.columnName = columnName;
+ this.columnName = columnName;
}
/**
* Returns one <code>ResultSet</code> column as an object via the
- * <code>ResultSet.getObject()</code> method that performs type
+ * <code>ResultSet.getObject()</code> method that performs type
* conversions.
* @param rs <code>ResultSet</code> to process.
* @return The column or <code>null</code> if there are no rows in
* the <code>ResultSet</code>.
- *
+ *
* @throws SQLException if a database access error occurs
- *
+ *
* @see org.apache.commons.dbutils.ResultSetHandler#handle(java.sql.ResultSet)
*/
public Object handle(ResultSet rs) throws SQLException {
Modified: commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSet.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSet.java?rev=1171771&r1=1171770&r2=1171771&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSet.java (original)
+++ commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSet.java Fri Sep 16 20:50:31 2011
@@ -36,12 +36,12 @@ import org.apache.commons.dbutils.ProxyF
/**
* Decorates a <code>ResultSet</code> with checks for a SQL NULL value on each
- * <code>getXXX</code> method. If a column value obtained by a
+ * <code>getXXX</code> method. If a column value obtained by a
* <code>getXXX</code> method is not SQL NULL, the column value is returned. If
* the column value is SQL null, an alternate value is returned. The alternate
* value defaults to the Java <code>null</code> value, which can be overridden
* for instances of the class.
- *
+ *
* <p>
* Usage example:
* <blockquote>
@@ -49,13 +49,13 @@ import org.apache.commons.dbutils.ProxyF
* Connection conn = // somehow get a connection
* Statement stmt = conn.createStatement();
* ResultSet rs = stmt.executeQuery("SELECT col1, col2 FROM table1");
- *
+ *
* // Wrap the result set for SQL NULL checking
* SqlNullCheckedResultSet wrapper = new SqlNullCheckedResultSet(rs);
* wrapper.setNullString("---N/A---"); // Set null string
* wrapper.setNullInt(-999); // Set null integer
* rs = ProxyFactory.instance().createResultSet(wrapper);
- *
+ *
* while (rs.next()) {
* // If col1 is SQL NULL, value returned will be "---N/A---"
* String col1 = rs.getString("col1");
@@ -99,7 +99,7 @@ public class SqlNullCheckedResultSet imp
* <pre>
* ProxyFactory.instance().createResultSet(new SqlNullCheckedResultSet(rs));
* </pre>
- *
+ *
* @param rs The <code>ResultSet</code> to wrap.
* @return wrapped ResultSet
*/
@@ -130,7 +130,7 @@ public class SqlNullCheckedResultSet imp
private URL nullURL = null;
/**
- * The wrapped result.
+ * The wrapped result.
*/
private final ResultSet rs;
@@ -364,7 +364,7 @@ public class SqlNullCheckedResultSet imp
* Intercepts calls to <code>get*</code> methods and calls the appropriate
* <code>getNull*</code> method if the <code>ResultSet</code> returned
* <code>null</code>.
- *
+ *
* @see java.lang.reflect.InvocationHandler#invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])
* @param proxy Not used; all method calls go to the internal result set
* @param method The method to invoke on the result set
Modified: commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/wrappers/StringTrimmedResultSet.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/wrappers/StringTrimmedResultSet.java?rev=1171771&r1=1171770&r2=1171771&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/wrappers/StringTrimmedResultSet.java (original)
+++ commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/wrappers/StringTrimmedResultSet.java Fri Sep 16 20:50:31 2011
@@ -25,20 +25,20 @@ import org.apache.commons.dbutils.ProxyF
/**
* Wraps a <code>ResultSet</code> to trim strings returned by the
* <code>getString()</code> and <code>getObject()</code> methods.
- *
+ *
* <p>
* Usage Example:
- * This example shows how to decorate ResultSets so processing continues as
- * normal but all Strings are trimmed before being returned from the
+ * This example shows how to decorate ResultSets so processing continues as
+ * normal but all Strings are trimmed before being returned from the
* <code>ResultSet</code>.
* </p>
- *
+ *
* <pre>
* ResultSet rs = // somehow get a ResultSet;
- *
+ *
* // Substitute wrapped ResultSet with additional behavior for real ResultSet
* rs = StringTrimmedResultSet.wrap(rs);
- *
+ *
* // Pass wrapped ResultSet to processor
* List list = new BasicRowProcessor().toBeanList(rs);
* </pre>
@@ -56,7 +56,7 @@ public class StringTrimmedResultSet impl
* <pre>
* ProxyFactory.instance().createResultSet(new StringTrimmedResultSet(rs));
* </pre>
- *
+ *
* @param rs The <code>ResultSet</code> to wrap.
* @return wrapped ResultSet
*/
@@ -65,7 +65,7 @@ public class StringTrimmedResultSet impl
}
/**
- * The wrapped result.
+ * The wrapped result.
*/
private final ResultSet rs;
@@ -80,10 +80,10 @@ public class StringTrimmedResultSet impl
}
/**
- * Intercept calls to the <code>getString()</code> and
+ * Intercept calls to the <code>getString()</code> and
* <code>getObject()</code> methods and trim any Strings before they're
* returned.
- *
+ *
* @see java.lang.reflect.InvocationHandler#invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])
* @param proxy Not used; all method calls go to the internal result set
* @param method The method to invoke on the result set