org.jboss.arquillian.persistence.data.dbunit.configuration
Class DBUnitConfiguration
java.lang.Object
org.jboss.arquillian.persistence.configuration.Configuration
org.jboss.arquillian.persistence.data.dbunit.configuration.DBUnitConfiguration
- All Implemented Interfaces:
- Serializable
public class DBUnitConfiguration
- extends Configuration
DBUnit configuration which can be customized in arquillian.xml
descriptor in the element with qualifier persistence-dbunit.
Covers all features and properties described in
DBUnit documentation as of
version 2.4.8
- Author:
- Bartosz Majsak
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DBUnitConfiguration
public DBUnitConfiguration()
isBatchedStatements
public boolean isBatchedStatements()
setBatchedStatements
public void setBatchedStatements(boolean batchedStatements)
- Parameters:
batchedStatements - Enable or disable usage of JDBC batched statement by DBUnit.
Default value is false
isCaseSensitiveTableNames
public boolean isCaseSensitiveTableNames()
setCaseSensitiveTableNames
public void setCaseSensitiveTableNames(boolean caseSensitiveTableNames)
- Parameters:
caseSensitiveTableNames - Enable or disable case sensitive table names.
If enabled, DBUnit handles all table names in a case sensitive way.
Default value is false.
isQualifiedTableNames
public boolean isQualifiedTableNames()
setQualifiedTableNames
public void setQualifiedTableNames(boolean qualifiedTableNames)
- Parameters:
qualifiedTableNames - Enable or disable multiple schemas support. If enabled, DBUnit access
tables with names fully qualified by schema using this format: SCHEMA.TABLE.
Default value is false.
isDatatypeWarning
public boolean isDatatypeWarning()
setDatatypeWarning
public void setDatatypeWarning(boolean datatypeWarning)
- Parameters:
datatypeWarning - Enable or disable the warning message displayed when
DBUnit encounters an unsupported data type.
Default value is true.
isSkipOracleRecycleBinTables
public boolean isSkipOracleRecycleBinTables()
setSkipOracleRecycleBinTables
public void setSkipOracleRecycleBinTables(boolean skipOracleRecycleBinTables)
- Parameters:
skipOracleRecycleBinTables - Enable or disable the processing of oracle recycle bin tables (tables starting with BIN$).
Oracle 10g recycle bin tables may break DBUnit's assumption of tables name uniqueness within
a schema since these table are case sensitive. Enable this feature for Oracle 10g databases
until the bug in the oracle driver is fixed, which incorrectly reports this system tables
to DBUnit.
Default value is false.
getEscapePattern
public String getEscapePattern()
setEscapePattern
public void setEscapePattern(String escapePattern)
- Parameters:
escapePattern - Allows schema, table and column names escaping. The property value is an escape pattern
where the ? is replaced by the name. For example, the pattern "[?]" is expanded as "[MY_TABLE]"
for a table named "MY_TABLE". The most common escape pattern is "\"?\"" which surrounds
the table name with quotes (for the above example it would result in "\"MY_TABLE\"").
As a fallback if no questionmark is in the given String and its length is one it is used
to surround the table name on the left and right side. For example the escape pattern "\""
will have the same effect as the escape pattern "\"?\"".
getTableType
public String[] getTableType()
setTableType
public void setTableType(String[] tableType)
- Parameters:
tableType - Used to configure the list of table types recognized by DBUnit.- See Also:
for possible values.
getDatatypeFactory
public org.dbunit.dataset.datatype.IDataTypeFactory getDatatypeFactory()
setDatatypeFactory
public void setDatatypeFactory(org.dbunit.dataset.datatype.IDataTypeFactory datatypeFactory)
- Parameters:
datatypeFactory - Used to configure the DataType factory. You can replace the default factory to
add support for non-standard database vendor data types.
Default value is DefaultDataTypeFactory.
getStatementFactory
public org.dbunit.database.statement.IStatementFactory getStatementFactory()
setStatementFactory
public void setStatementFactory(org.dbunit.database.statement.IStatementFactory statementFactory)
- Parameters:
statementFactory - Used to configure the statement factory.
Default value is PreparedStatementFactory.
getResultSetTableFactory
public org.dbunit.database.IResultSetTableFactory getResultSetTableFactory()
setResultSetTableFactory
public void setResultSetTableFactory(org.dbunit.database.IResultSetTableFactory resultSetTableFactory)
- Parameters:
resultSetTableFactory - Used to configure the ResultSet table factory.
Default value is CachedResultSetTableFactory.
getPrimaryKeyFilter
public org.dbunit.dataset.filter.IColumnFilter getPrimaryKeyFilter()
setPrimaryKeyFilter
public void setPrimaryKeyFilter(org.dbunit.dataset.filter.IColumnFilter primaryKeyFilter)
- Parameters:
primaryKeyFilter - Use to override primary keys detection.
getIdentityColumnFilter
public org.dbunit.dataset.filter.IColumnFilter getIdentityColumnFilter()
setIdentityColumnFilter
public void setIdentityColumnFilter(org.dbunit.dataset.filter.IColumnFilter identityColumnFilter)
- Parameters:
identityColumnFilter - Used to override IDENTITY column detection (MS SQL specific solution).
getBatchSize
public int getBatchSize()
setBatchSize
public void setBatchSize(int batchSize)
- Parameters:
batchSize - The size of batch updates.
Default value is 100.
getFetchSize
public int getFetchSize()
setFetchSize
public void setFetchSize(int fetchSize)
- Parameters:
fetchSize - The statement fetch size for loading data into a result set table.
Default value is 100.
getMetadataHandler
public org.dbunit.database.IMetadataHandler getMetadataHandler()
setMetadataHandler
public void setMetadataHandler(org.dbunit.database.IMetadataHandler metadataHandler)
- Parameters:
metadataHandler - Used to configure the handler used to control database metadata related methods.
Default value is DefaultMetadataHandler.
getDataSeedStrategy
public DataSeedStrategy getDataSeedStrategy()
setDataSeedStrategy
public void setDataSeedStrategy(DataSeedStrategy strategy)
- Parameters:
strategy - Defines strategy of inserting data to the data store.
Default value is DataSeedStrategy.INSERT- See Also:
DataSeedStrategy
isUseIdentityInsert
public boolean isUseIdentityInsert()
setUseIdentityInsert
public void setUseIdentityInsert(boolean useIdentityInsert)
- Parameters:
useIdentityInsert - Disables MS SQL Server automatic identifier generation for the execution
of inserts. For usage with Microsoft driver you should append your JDBC connection with "SelectMethod=cursor".
Default value is false
getDefaultDataSetLocation
public String getDefaultDataSetLocation()
setDefaultDataSetLocation
public void setDefaultDataSetLocation(String defaultDataSetLocation)
- Parameters:
defaultDataSetLocation - Folder where all datasets are located.
Default value is datsets.
getDefaultDataSetFormat
public Format getDefaultDataSetFormat()
setDefaultDataSetFormat
public void setDefaultDataSetFormat(Format defaultDataSetFormat)
- Parameters:
defaultDataSetFormat - Default format of data sets when file name is inferred from test method name,
when file is not specified in UsingDataSet or ShouldMatchDataSet.
Default value is Format.XML
isExcludePoi
public boolean isExcludePoi()
setExcludePoi
public void setExcludePoi(boolean excludePoi)
- Parameters:
excludePoi - Excludes Apache POI from packaging process, which results in slimier deployment.
If you are not using Excel datasets you can safely turn it off.
Defalut value is false
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.