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 Object

  Builder class for `StatementConfiguration` for more flexible construction.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `Builder()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `StatementConfiguration` | `build()` |
    `StatementConfiguration.Builder` | `fetchDirection​(Integer fetchDirection)` |
    `StatementConfiguration.Builder` | `fetchSize​(Integer fetchSize)` |
    `StatementConfiguration.Builder` | `maxFieldSize​(Integer maxFieldSize)` |
    `StatementConfiguration.Builder` | `maxRows​(Integer maxRows)` |
    `StatementConfiguration.Builder` | `queryTimeout​(Integer queryTimeout)` | Deprecated. Use `queryTimeout(Duration)`.
    `StatementConfiguration.Builder` | `queryTimeout​(Duration queryTimeout)` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Builder

          public Builder()

  - ### Method Detail

    - #### build

          public StatementConfiguration build()

      Returns:
        A new and configured `StatementConfiguration`.

    - #### fetchDirection

          public StatementConfiguration.Builder fetchDirection​(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​(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()`

    - #### maxFieldSize

          public StatementConfiguration.Builder maxFieldSize​(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()`

    - #### maxRows

          public StatementConfiguration.Builder maxRows​(Integer maxRows)

      Parameters:
        `maxRows` - The maximum number of rows that a `ResultSet` can produce.
      Returns:
        This builder for chaining.
      See Also:
        `StatementConfiguration.getMaxRows()`

    - #### queryTimeout

          public StatementConfiguration.Builder queryTimeout​(Duration queryTimeout)

      Parameters:
        `queryTimeout` - The number of seconds the driver will wait for execution.
      Returns:
        This builder for chaining.
      Since:
        1.8.0
      See Also:
        `StatementConfiguration.getQueryTimeoutDuration()`

    - #### queryTimeout

          @Deprecated
          public StatementConfiguration.Builder queryTimeout​(Integer queryTimeout)

      Deprecated.
      Use `queryTimeout(Duration)`.
      Parameters:
        `queryTimeout` - The number of seconds the driver will wait for execution.
      Returns:
        This builder for chaining.
      See Also:
        `StatementConfiguration.getQueryTimeout()`