Package org.apache.commons.configuration2.builder

## Class DatabaseBuilderParametersImpl

- java.lang.Object
- - org.apache.commons.configuration2.builder.BasicBuilderParameters
  - - org.apache.commons.configuration2.builder.DatabaseBuilderParametersImpl

- All Implemented Interfaces:
    `Cloneable`, `BasicBuilderProperties<BasicBuilderParameters>`, `BuilderParameters`, `DatabaseBuilderProperties<DatabaseBuilderParametersImpl>`

      public class DatabaseBuilderParametersImpl
      extends BasicBuilderParameters
      implements DatabaseBuilderProperties<DatabaseBuilderParametersImpl>

  A specialized parameters object for database configurations.

  This class has properties for defining the database structures the configuration operates on.

  This class is not thread-safe. It is intended that an instance is constructed and initialized by a single thread during configuration of a `ConfigurationBuilder`.

  Since:
    2.0

- - ### Field Summary

    - ### Fields inherited from interface org.apache.commons.configuration2.builder.BuilderParameters

      `RESERVED_PARAMETER_PREFIX`

  - ### Constructor Summary

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

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `DatabaseBuilderParametersImpl` | `setAutoCommit​(boolean f)` | Enables or disable auto commit mode.
    `DatabaseBuilderParametersImpl` | `setConfigurationName​(String name)` | Sets the name of this configuration instance.
    `DatabaseBuilderParametersImpl` | `setConfigurationNameColumn​(String name)` | Sets the name of the table column containing the configuration name.
    `DatabaseBuilderParametersImpl` | `setDataSource​(DataSource src)` | Sets the data source for the database configuration.
    `DatabaseBuilderParametersImpl` | `setKeyColumn​(String name)` | Sets the name of the table column containing configuration keys.
    `DatabaseBuilderParametersImpl` | `setTable​(String tname)` | Sets the name of the table containing configuration data.
    `DatabaseBuilderParametersImpl` | `setValueColumn​(String name)` | Sets the name of the table column containing the configuration property value.

    - ### Methods inherited from class org.apache.commons.configuration2.builder.BasicBuilderParameters

      `clone, copyPropertiesFrom, fetchBeanHelper, fetchInterpolatorSpecification, fetchProperty, getParameters, inheritFrom, merge, setBeanHelper, setConfigurationDecoder, setConversionHandler, setDefaultLookups, setInterpolator, setListDelimiterHandler, setLogger, setParentInterpolator, setPrefixLookups, setSynchronizer, setThrowExceptionOnMissing, storeProperty`

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

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

- - ### Constructor Detail

    - #### DatabaseBuilderParametersImpl

          public DatabaseBuilderParametersImpl()

  - ### Method Detail

    - #### setDataSource

          public DatabaseBuilderParametersImpl setDataSource​(DataSource src)

      Description copied from interface: `DatabaseBuilderProperties`
      Sets the data source for the database configuration. All database connections are obtained from this data source. This is a mandatory property.
      Specified by:
        `setDataSource` in interface `DatabaseBuilderProperties<DatabaseBuilderParametersImpl>`
      Parameters:
        `src` - the data source for the database configuration
      Returns:
        a reference to this object for method chaining

    - #### setTable

          public DatabaseBuilderParametersImpl setTable​(String tname)

      Description copied from interface: `DatabaseBuilderProperties`
      Sets the name of the table containing configuration data. Database configuration will access this database table. This is a mandatory property.
      Specified by:
        `setTable` in interface `DatabaseBuilderProperties<DatabaseBuilderParametersImpl>`
      Parameters:
        `tname` - the name of the table with configuration data
      Returns:
        a reference to this object for method chaining

    - #### setKeyColumn

          public DatabaseBuilderParametersImpl setKeyColumn​(String name)

      Description copied from interface: `DatabaseBuilderProperties`
      Sets the name of the table column containing configuration keys. This is a mandatory property.
      Specified by:
        `setKeyColumn` in interface `DatabaseBuilderProperties<DatabaseBuilderParametersImpl>`
      Parameters:
        `name` - the column name
      Returns:
        a reference to this object for method chaining

    - #### setValueColumn

          public DatabaseBuilderParametersImpl setValueColumn​(String name)

      Description copied from interface: `DatabaseBuilderProperties`
      Sets the name of the table column containing the configuration property value. This is a mandatory property.
      Specified by:
        `setValueColumn` in interface `DatabaseBuilderProperties<DatabaseBuilderParametersImpl>`
      Parameters:
        `name` - the column name
      Returns:
        a reference to this object for method chaining

    - #### setConfigurationNameColumn

          public DatabaseBuilderParametersImpl setConfigurationNameColumn​(String name)

      Description copied from interface: `DatabaseBuilderProperties`
      Sets the name of the table column containing the configuration name. This property is needed if a single database table contains the data of multiple configuration instances. Then this column is used as discriminator to select a specific configuration instance.
      Specified by:
        `setConfigurationNameColumn` in interface `DatabaseBuilderProperties<DatabaseBuilderParametersImpl>`
      Parameters:
        `name` - the column name
      Returns:
        a reference to this method for method chaining

    - #### setConfigurationName

          public DatabaseBuilderParametersImpl setConfigurationName​(String name)

      Description copied from interface: `DatabaseBuilderProperties`
      Sets the name of this configuration instance. This property is needed if a single database table contains the data of multiple configuration instances. Then SQL statements generated by the configuration contain an additional constraint filtering the configuration name column for this name.
      Specified by:
        `setConfigurationName` in interface `DatabaseBuilderProperties<DatabaseBuilderParametersImpl>`
      Parameters:
        `name` - the name of this configuration instance
      Returns:
        a reference to this object for method chaining

    - #### setAutoCommit

          public DatabaseBuilderParametersImpl setAutoCommit​(boolean f)

      Description copied from interface: `DatabaseBuilderProperties`
      Enables or disable auto commit mode. If enabled, the database configuration instance performs a commit after each database update.
      Specified by:
        `setAutoCommit` in interface `DatabaseBuilderProperties<DatabaseBuilderParametersImpl>`
      Parameters:
        `f` - the value of the auto commit flag
      Returns:
        a reference to this object for method chaining