Package org.apache.commons.dbutils
Class StatementConfiguration.Builder
- java.lang.Object
-
- org.apache.commons.dbutils.StatementConfiguration.Builder
-
- Enclosing class:
- StatementConfiguration
public static final class StatementConfiguration.Builder extends java.lang.Object
Builder class forStatementConfiguration
for more flexible construction.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Integer
fetchDirection
private java.lang.Integer
fetchSize
private java.lang.Integer
maxFieldSize
private java.lang.Integer
maxRows
private java.lang.Integer
queryTimeout
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StatementConfiguration
build()
StatementConfiguration.Builder
fetchDirection(java.lang.Integer fetchDirection)
StatementConfiguration.Builder
fetchSize(java.lang.Integer fetchSize)
StatementConfiguration.Builder
maxFieldSize(java.lang.Integer maxFieldSize)
StatementConfiguration.Builder
maxRows(java.lang.Integer maxRows)
StatementConfiguration.Builder
queryTimeout(java.lang.Integer queryTimeout)
-
-
-
Method Detail
-
fetchDirection
public StatementConfiguration.Builder fetchDirection(java.lang.Integer fetchDirection)
- Parameters:
fetchDirection
- The direction for fetching rows from database tables.- Returns:
- This builder for chaining.
- See Also:
StatementConfiguration.getFetchDirection()
-
fetchSize
public StatementConfiguration.Builder fetchSize(java.lang.Integer fetchSize)
- Parameters:
fetchSize
- The number of rows that should be fetched from the database when more rows are needed.- Returns:
- This builder for chaining.
- See Also:
StatementConfiguration.getFetchSize()
-
maxRows
public StatementConfiguration.Builder maxRows(java.lang.Integer maxRows)
- Parameters:
maxRows
- The maximum number of rows that aResultSet
can produce.- Returns:
- This builder for chaining.
- See Also:
StatementConfiguration.getMaxRows()
-
queryTimeout
public StatementConfiguration.Builder queryTimeout(java.lang.Integer queryTimeout)
- Parameters:
queryTimeout
- The number of seconds the driver will wait for execution.- Returns:
- This builder for chaining.
- See Also:
StatementConfiguration.getQueryTimeout()
-
maxFieldSize
public StatementConfiguration.Builder maxFieldSize(java.lang.Integer maxFieldSize)
- Parameters:
maxFieldSize
- The maximum number of bytes that can be returned for character and binary column values.- Returns:
- This builder for chaining.
- See Also:
StatementConfiguration.getMaxFieldSize()
-
build
public StatementConfiguration build()
- Returns:
- A new and configured
StatementConfiguration
.
-
-