public class DBUnitConfiguration extends Configuration
arquillian.xml
descriptor in the element with qualifier persistence-dbunit.
| Constructor and Description |
|---|
DBUnitConfiguration() |
| Modifier and Type | Method and Description |
|---|---|
int |
getBatchSize() |
String |
getCustomTableFilter() |
org.dbunit.dataset.datatype.IDataTypeFactory |
getDatatypeFactory() |
Format |
getDefaultDataSetFormat() |
String |
getDefaultDataSetLocation() |
String |
getEscapePattern() |
String[] |
getExcludeTablesFromCleanup() |
String[] |
getExcludeTablesFromComparisonWhenEmptyExpected() |
int |
getFetchSize() |
org.dbunit.dataset.filter.IColumnFilter |
getIdentityColumnFilter() |
org.dbunit.database.IMetadataHandler |
getMetadataHandler() |
org.dbunit.dataset.filter.IColumnFilter |
getPrimaryKeyFilter() |
org.dbunit.database.IResultSetTableFactory |
getResultSetTableFactory() |
String |
getSchema() |
org.dbunit.database.statement.IStatementFactory |
getStatementFactory() |
String[] |
getTableType() |
boolean |
isAllowEmptyFields() |
boolean |
isBatchedStatements() |
boolean |
isCaseSensitiveTableNames() |
boolean |
isDatatypeWarning() |
boolean |
isExcludePoi() |
boolean |
isFilterTables() |
boolean |
isQualifiedTableNames() |
boolean |
isSkipOracleRecycleBinTables() |
boolean |
isUseIdentityInsert() |
void |
setAllowEmptyFields(boolean allowEmptyFields) |
void |
setBatchedStatements(boolean batchedStatements) |
void |
setBatchSize(int batchSize) |
void |
setCaseSensitiveTableNames(boolean caseSensitiveTableNames) |
void |
setCustomTableFilter(String customTableFilter)
Specifies which implementation of
TableFilterProvider
should be used when filterTables is enabled. |
void |
setDatatypeFactory(org.dbunit.dataset.datatype.IDataTypeFactory datatypeFactory) |
void |
setDatatypeWarning(boolean datatypeWarning) |
void |
setDefaultDataSetFormat(Format defaultDataSetFormat) |
void |
setDefaultDataSetLocation(String defaultDataSetLocation) |
void |
setEscapePattern(String escapePattern) |
void |
setExcludePoi(boolean excludePoi) |
void |
setExcludeTablesFromCleanup(String[] excludeTablesFromCleanup) |
void |
setExcludeTablesFromComparisonWhenEmptyExpected(String[] excludeTablesFromComparisonWhenEmptyExpected) |
void |
setFetchSize(int fetchSize) |
void |
setFilterTables(boolean filterTables)
Orders tables using dependency information provided by foreign key metadata.
|
void |
setIdentityColumnFilter(org.dbunit.dataset.filter.IColumnFilter identityColumnFilter) |
void |
setMetadataHandler(org.dbunit.database.IMetadataHandler metadataHandler) |
void |
setPrimaryKeyFilter(org.dbunit.dataset.filter.IColumnFilter primaryKeyFilter) |
void |
setQualifiedTableNames(boolean qualifiedTableNames) |
void |
setResultSetTableFactory(org.dbunit.database.IResultSetTableFactory resultSetTableFactory) |
void |
setSchema(String schema) |
void |
setSkipOracleRecycleBinTables(boolean skipOracleRecycleBinTables) |
void |
setStatementFactory(org.dbunit.database.statement.IStatementFactory statementFactory) |
void |
setTableType(String[] tableType) |
void |
setUseIdentityInsert(boolean useIdentityInsert) |
exportUsing, getPrefix, getQualifier, importTo, toStringpublic boolean isBatchedStatements()
public void setBatchedStatements(boolean batchedStatements)
batchedStatements - Enable or disable usage of JDBC batched statement by DBUnit.
Default value is falsepublic boolean isCaseSensitiveTableNames()
public void setCaseSensitiveTableNames(boolean caseSensitiveTableNames)
caseSensitiveTableNames - Enable or disable case sensitive table names.
If enabled, DBUnit handles all table names in a case sensitive way.
Default value is false.public boolean isQualifiedTableNames()
public void setQualifiedTableNames(boolean qualifiedTableNames)
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.public boolean isDatatypeWarning()
public void setDatatypeWarning(boolean datatypeWarning)
datatypeWarning - Enable or disable the warning message displayed when
DBUnit encounters an unsupported data type.
Default value is true.public boolean isSkipOracleRecycleBinTables()
public void setSkipOracleRecycleBinTables(boolean skipOracleRecycleBinTables)
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.public boolean isAllowEmptyFields()
public void setAllowEmptyFields(boolean allowEmptyFields)
allowEmptyFields - Allow to call INSERT/UPDATE with empty strings ('').
Default value is false.public String getEscapePattern()
public void setEscapePattern(String escapePattern)
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 "\"?\"".public String[] getTableType()
public void setTableType(String[] tableType)
tableType - Used to configure the list of table types recognized by DBUnit.for possible values.public org.dbunit.dataset.datatype.IDataTypeFactory getDatatypeFactory()
public void setDatatypeFactory(org.dbunit.dataset.datatype.IDataTypeFactory datatypeFactory)
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.public org.dbunit.database.statement.IStatementFactory getStatementFactory()
public void setStatementFactory(org.dbunit.database.statement.IStatementFactory statementFactory)
statementFactory - Used to configure the statement factory.
Default value is PreparedStatementFactory.public org.dbunit.database.IResultSetTableFactory getResultSetTableFactory()
public void setResultSetTableFactory(org.dbunit.database.IResultSetTableFactory resultSetTableFactory)
resultSetTableFactory - Used to configure the ResultSet table factory.
Default value is CachedResultSetTableFactory.public org.dbunit.dataset.filter.IColumnFilter getPrimaryKeyFilter()
public void setPrimaryKeyFilter(org.dbunit.dataset.filter.IColumnFilter primaryKeyFilter)
primaryKeyFilter - Use to override primary keys detection.public org.dbunit.dataset.filter.IColumnFilter getIdentityColumnFilter()
public void setIdentityColumnFilter(org.dbunit.dataset.filter.IColumnFilter identityColumnFilter)
identityColumnFilter - Used to override IDENTITY column detection (MS SQL specific solution).public int getBatchSize()
public void setBatchSize(int batchSize)
batchSize - The size of batch updates.
Default value is 100.public int getFetchSize()
public void setFetchSize(int fetchSize)
fetchSize - The statement fetch size for loading data into a result set table.
Default value is 100.public org.dbunit.database.IMetadataHandler getMetadataHandler()
public void setMetadataHandler(org.dbunit.database.IMetadataHandler metadataHandler)
metadataHandler - Used to configure the handler used to control database metadata related methods.
Default value is DefaultMetadataHandler.public boolean isUseIdentityInsert()
public void setUseIdentityInsert(boolean useIdentityInsert)
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 falsepublic String getDefaultDataSetLocation()
public void setDefaultDataSetLocation(String defaultDataSetLocation)
defaultDataSetLocation - Folder where all datasets are located.
Default value is datsets.public Format getDefaultDataSetFormat()
public void setDefaultDataSetFormat(Format defaultDataSetFormat)
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.XMLpublic boolean isExcludePoi()
public void setExcludePoi(boolean excludePoi)
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 falsepublic String[] getExcludeTablesFromCleanup()
public void setExcludeTablesFromCleanup(String[] excludeTablesFromCleanup)
excludeTablesFromCleanup - List of tables to be excluded from cleanup procedure.
Especially handy for sequence tables which are most likely to be cleared
when using STRICT cleanup strategy.public String getSchema()
public void setSchema(String schema)
schema - Schema to be used while creating database connectionpublic String[] getExcludeTablesFromComparisonWhenEmptyExpected()
public void setExcludeTablesFromComparisonWhenEmptyExpected(String[] excludeTablesFromComparisonWhenEmptyExpected)
excludeTablesFromComparisonWhenEmptyExpected - list of tables which should not be considered when asserting database content for emptiness.public boolean isFilterTables()
public void setFilterTables(boolean filterTables)
customTableFilter which is used to specify which implementation of
TableFilterProvider should be used.
Should be registered using simple name exposed by given implementation TableFilterProviderpublic String getCustomTableFilter()
public void setCustomTableFilter(String customTableFilter)
TableFilterProvider
should be used when filterTables is enabled.Copyright © 2018 JBoss by Red Hat. All rights reserved.