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
-
Method Summary
Modifier and TypeMethodDescriptionsetAutoCommit
(boolean f) Enables or disable auto commit mode.setConfigurationName
(String name) Sets the name of this configuration instance.Sets the name of the table column containing the configuration name.setDataSource
(DataSource src) Sets the data source for the database configuration.setKeyColumn
(String name) Sets the name of the table column containing configuration keys.Sets the name of the table containing configuration data.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
-
Constructor Details
-
DatabaseBuilderParametersImpl
public DatabaseBuilderParametersImpl()
-
-
Method Details
-
setAutoCommit
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 interfaceDatabaseBuilderProperties<DatabaseBuilderParametersImpl>
- Parameters:
f
- the value of the auto commit flag- Returns:
- a reference to this object for method chaining
-
setConfigurationName
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 interfaceDatabaseBuilderProperties<DatabaseBuilderParametersImpl>
- Parameters:
name
- the name of this configuration instance- Returns:
- a reference to this object for method chaining
-
setConfigurationNameColumn
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 interfaceDatabaseBuilderProperties<DatabaseBuilderParametersImpl>
- Parameters:
name
- the column name- Returns:
- a reference to this method for method chaining
-
setDataSource
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 interfaceDatabaseBuilderProperties<DatabaseBuilderParametersImpl>
- Parameters:
src
- the data source for the database configuration- Returns:
- a reference to this object for method chaining
-
setKeyColumn
Description copied from interface:DatabaseBuilderProperties
Sets the name of the table column containing configuration keys. This is a mandatory property.- Specified by:
setKeyColumn
in interfaceDatabaseBuilderProperties<DatabaseBuilderParametersImpl>
- Parameters:
name
- the column name- Returns:
- a reference to this object for method chaining
-
setTable
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 interfaceDatabaseBuilderProperties<DatabaseBuilderParametersImpl>
- Parameters:
tableName
- the name of the table with configuration data- Returns:
- a reference to this object for method chaining
-
setValueColumn
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 interfaceDatabaseBuilderProperties<DatabaseBuilderParametersImpl>
- Parameters:
name
- the column name- Returns:
- a reference to this object for method chaining
-