diff --git a/pom.xml b/pom.xml
index de92a6272..1bc35aed0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -680,9 +680,13 @@
- *
* Each queryset is internally converted to a
* You can use it as follows:
- * null
* @since 2.4.3
@@ -146,6 +151,8 @@ public void setTearDownOperation(DatabaseOperation tearDownOperation)
/**
* Returns the schema value.
+ *
+ * @return the schema value, or {@code null} if none is set.
*/
protected String getSchema()
{
diff --git a/src/main/java/org/dbunit/DatabaseUnitException.java b/src/main/java/org/dbunit/DatabaseUnitException.java
index 34bb6936c..c3b9fdca6 100644
--- a/src/main/java/org/dbunit/DatabaseUnitException.java
+++ b/src/main/java/org/dbunit/DatabaseUnitException.java
@@ -23,6 +23,8 @@
/**
+ * Base checked exception for errors raised by the DbUnit framework.
+ *
* @author Manuel Laflamme
* @version $Revision$
*/
diff --git a/src/main/java/org/dbunit/DatabaseUnitRuntimeException.java b/src/main/java/org/dbunit/DatabaseUnitRuntimeException.java
index 5d515a10e..b625b0900 100644
--- a/src/main/java/org/dbunit/DatabaseUnitRuntimeException.java
+++ b/src/main/java/org/dbunit/DatabaseUnitRuntimeException.java
@@ -22,6 +22,8 @@
/**
+ * Base unchecked exception for errors raised by the DbUnit framework.
+ *
* @author Manuel Laflamme
* @author Last changed by: $Author$
* @version $Revision$ $Date$
diff --git a/src/main/java/org/dbunit/DefaultPrepAndExpectedTestCase.java b/src/main/java/org/dbunit/DefaultPrepAndExpectedTestCase.java
index 611e0036c..cc8d02a9e 100644
--- a/src/main/java/org/dbunit/DefaultPrepAndExpectedTestCase.java
+++ b/src/main/java/org/dbunit/DefaultPrepAndExpectedTestCase.java
@@ -1107,7 +1107,7 @@ public IDataSet getExpectedDataset()
/**
* Get the databaseTester.
*
- * @see {@link #databaseTester}.
+ * @see #databaseTester
*
* @return The databaseTester.
*/
@@ -1120,7 +1120,7 @@ public IDatabaseTester getDatabaseTester()
/**
* Set the databaseTester.
*
- * @see {@link #databaseTester}.
+ * @see #databaseTester
*
* @param databaseTester
* The databaseTester to set.
@@ -1134,7 +1134,7 @@ public void setDatabaseTester(final IDatabaseTester databaseTester)
* Get whether the connection lookupFeatureValue() and cleanupData() are
* done with is closed.
*
- * @see {@link #closeConnectionAfterTest}.
+ * @see #closeConnectionAfterTest
*
* @return True if it is closed, false if not.
* @since 3.4.0
@@ -1151,7 +1151,7 @@ public boolean isCloseConnectionAfterTest()
* test methods, so this instance does not close a connection other tests
* still expect to reuse.
*
- * @see {@link #closeConnectionAfterTest}.
+ * @see #closeConnectionAfterTest
*
* @param closeConnectionAfterTest
* True to close it, false to leave it open.
@@ -1166,7 +1166,7 @@ public void setCloseConnectionAfterTest(
/**
* Get the dataFileLoader.
*
- * @see {@link #dataFileLoader}.
+ * @see #dataFileLoader
*
* @return The dataFileLoader.
*/
@@ -1178,7 +1178,7 @@ public DataFileLoader getDataFileLoader()
/**
* Set the dataFileLoader.
*
- * @see {@link #dataFileLoader}.
+ * @see #dataFileLoader
*
* @param dataFileLoader
* The dataFileLoader to set.
@@ -1191,7 +1191,7 @@ public void setDataFileLoader(final DataFileLoader dataFileLoader)
/**
* Set the prepDs.
*
- * @see {@link #prepDataSet}.
+ * @see #prepDataSet
*
* @param prepDataSet
* The prepDs to set.
@@ -1204,7 +1204,7 @@ public void setPrepDs(final IDataSet prepDataSet)
/**
* Set the expectedDs.
*
- * @see {@link #expectedDataSet}.
+ * @see #expectedDataSet
*
* @param expectedDataSet
* The expectedDs to set.
@@ -1217,7 +1217,7 @@ public void setExpectedDs(final IDataSet expectedDataSet)
/**
* Get the tableDefs.
*
- * @see {@link #verifyTableDefs}.
+ * @see #verifyTableDefs
*
* @return The tableDefs.
*/
@@ -1229,7 +1229,7 @@ public VerifyTableDefinition[] getVerifyTableDefs()
/**
* Set the tableDefs.
*
- * @see {@link #verifyTableDefs}.
+ * @see #verifyTableDefs
*
* @param verifyTableDefs
* The tableDefs to set.
diff --git a/src/main/java/org/dbunit/IDatabaseTester.java b/src/main/java/org/dbunit/IDatabaseTester.java
index ecaf21296..25bd8b91a 100644
--- a/src/main/java/org/dbunit/IDatabaseTester.java
+++ b/src/main/java/org/dbunit/IDatabaseTester.java
@@ -39,6 +39,8 @@ public interface IDatabaseTester
/**
* Close the specified connection.
*
+ * @param connection the connection to close.
+ * @throws Exception if the connection cannot be closed.
* @deprecated since 2.4.4 define a user defined
* {@link #setOperationListener(IOperationListener)} in advance
*/
@@ -47,32 +49,44 @@ public interface IDatabaseTester
/**
* Returns the test database connection.
+ *
+ * @return the test database connection.
+ * @throws Exception if the connection cannot be retrieved or created.
*/
IDatabaseConnection getConnection() throws Exception;
/**
* Returns the test dataset.
+ *
+ * @return the test dataset.
*/
IDataSet getDataSet();
/**
* Gets the DatabaseOperation to call when starting the test.
+ *
+ * @return the setup {@link DatabaseOperation}.
*/
DatabaseOperation getSetUpOperation();
/**
* Gets the DatabaseOperation to call when ending the test.
+ *
+ * @return the tear-down {@link DatabaseOperation}.
*/
DatabaseOperation getTearDownOperation();
/**
* Sets the test dataset to use.
+ *
+ * @param dataSet the test dataset to use.
*/
void setDataSet(IDataSet dataSet);
/**
* Sets the schema value.
*
+ * @param schema the schema name.
* @deprecated since 2.4.3 Should not be used anymore. Every concrete
* {@link IDatabaseTester} implementation that needs a schema
* has the possibility to set it somehow in the constructor
@@ -82,25 +96,35 @@ public interface IDatabaseTester
/**
* Sets the DatabaseOperation to call when starting the test.
+ *
+ * @param setUpOperation the setup {@link DatabaseOperation}.
*/
void setSetUpOperation(DatabaseOperation setUpOperation);
/**
* Sets the DatabaseOperation to call when ending the test.
+ *
+ * @param tearDownOperation the tear-down {@link DatabaseOperation}.
*/
void setTearDownOperation(DatabaseOperation tearDownOperation);
/**
* TestCases must call this method inside setUp()
+ *
+ * @throws Exception if the setup operation fails.
*/
void onSetup() throws Exception;
/**
* TestCases must call this method inside tearDown()
+ *
+ * @throws Exception if the tear-down operation fails.
*/
void onTearDown() throws Exception;
/**
+ * Sets the listener notified of connection-retrieval and setup/tear-down events.
+ *
* @param operationListener
* The operation listener that is invoked on specific events in
* the {@link IDatabaseTester}.
diff --git a/src/main/java/org/dbunit/PropertiesBasedJdbcDatabaseTester.java b/src/main/java/org/dbunit/PropertiesBasedJdbcDatabaseTester.java
index 362176a5f..a136a462c 100644
--- a/src/main/java/org/dbunit/PropertiesBasedJdbcDatabaseTester.java
+++ b/src/main/java/org/dbunit/PropertiesBasedJdbcDatabaseTester.java
@@ -27,7 +27,7 @@
* DatabaseTester that configures a DriverManager from environment properties.
* This class defines a set of keys for system properties that need to be
* present in the environment before using it. Example:
- *
* System.setProperty( PropertiesBasedJdbcDatabaseTester.DBUNIT_DRIVER_CLASS,
* "com.mycompany.myDriver" );
* System.setProperty( PropertiesBasedJdbcDatabaseTester.DBUNIT_CONNECTION_URL,
@@ -38,7 +38,7 @@
* "mypasswd" );
* System.setProperty( PropertiesBasedJdbcDatabaseTester.DBUNIT_SCHEMA,
* "myschema" );
- *
QueryDataSet and then
* combined using a CompositeDataSet. This means that you can use
* more than one query element for any given table provided they
diff --git a/src/main/java/org/dbunit/assertion/DbUnitAssert.java b/src/main/java/org/dbunit/assertion/DbUnitAssert.java
index f24448701..13b54803f 100644
--- a/src/main/java/org/dbunit/assertion/DbUnitAssert.java
+++ b/src/main/java/org/dbunit/assertion/DbUnitAssert.java
@@ -231,13 +231,13 @@ public void assertEquals(final ITable expectedTable,
* Asserts that the two specified tables are equals. This method ignores the
* table names, the columns order, the columns data type and which columns
* are composing the primary keys.
- * Example:
+ *
*
* @param expectedTable
* Table containing all expected results.
@@ -272,13 +272,13 @@ public void assertEquals(final ITable expectedTable,
* Asserts that the two specified tables are equals. This method ignores the
* table names, the columns order, the columns data type and which columns
* are composing the primary keys.
+ * Example:
* ITable actualTable = ...;
* ITable expectedTable = ...;
* ITableMetaData metaData = actualTable.getTableMetaData();
* Column[] additionalInfoCols = Columns.getColumns(new String[] {"MY_PK_COLUMN"}, metaData.getColumns());
* assertEquals(expectedTable, actualTable, additionalInfoCols);
- *
- * Example:
+ *
*
* @param expectedTable
* Table containing all expected results.
diff --git a/src/main/java/org/dbunit/assertion/DiffCollectingFailureHandler.java b/src/main/java/org/dbunit/assertion/DiffCollectingFailureHandler.java
index f6b376221..1aba6efab 100644
--- a/src/main/java/org/dbunit/assertion/DiffCollectingFailureHandler.java
+++ b/src/main/java/org/dbunit/assertion/DiffCollectingFailureHandler.java
@@ -28,7 +28,7 @@
* were found without throwing an exception.
*
+ * Example:
* ITable actualTable = ...;
* ITable expectedTable = ...;
* ITableMetaData metaData = actualTable.getTableMetaData();
* FailureHandler failureHandler = new DefaultFailureHandler();
* assertEquals(expectedTable, actualTable, failureHandler);
- *
- *
+ *
+ *
* @author gommma (gommma AT users.sourceforge.net)
* @author Last changed by: $Author$
* @version $Revision$ $Date$
diff --git a/src/main/java/org/dbunit/assertion/SimpleAssert.java b/src/main/java/org/dbunit/assertion/SimpleAssert.java
index f515578e1..356fe0c74 100644
--- a/src/main/java/org/dbunit/assertion/SimpleAssert.java
+++ b/src/main/java/org/dbunit/assertion/SimpleAssert.java
@@ -53,6 +53,9 @@ public SimpleAssert(FailureHandler failureHandler)
/**
* Asserts that propertyName is not a null String and has a length greater
* than zero.
+ *
+ * @param propertyName the name of the property being validated, used in the failure message.
+ * @param property the property value to validate.
*/
protected void assertNotNullNorEmpty( String propertyName, String property )
{
diff --git a/src/main/java/org/dbunit/database/AbstractDatabaseConnection.java b/src/main/java/org/dbunit/database/AbstractDatabaseConnection.java
index 9e6533452..5556d8e07 100644
--- a/src/main/java/org/dbunit/database/AbstractDatabaseConnection.java
+++ b/src/main/java/org/dbunit/database/AbstractDatabaseConnection.java
@@ -38,6 +38,9 @@
import org.slf4j.LoggerFactory;
/**
+ * Base implementation of {@link IDatabaseConnection} that lazily creates and caches the
+ * connection's whole-database {@link IDataSet} and owns its {@link DatabaseConfig}.
+ *
* @author Manuel Laflamme
* @version $Revision$
* @since Mar 6, 2002
@@ -54,6 +57,9 @@ public abstract class AbstractDatabaseConnection implements IDatabaseConnection
private IDataSet _dataSet = null;
private final DatabaseConfig _databaseConfig;
+ /**
+ * Creates a connection with a new, default {@link DatabaseConfig}.
+ */
public AbstractDatabaseConnection()
{
_databaseConfig = new DatabaseConfig();
@@ -77,7 +83,7 @@ public IDataSet createDataSet() throws SQLException
public IDataSet createDataSet(String[] tableNames)
throws DataSetException, SQLException
{
- logger.debug("createDataSet(tableNames={}) - start", tableNames);
+ logger.debug("createDataSet(tableNames={}) - start", (Object) tableNames);
return new FilteredDataSet(tableNames, createDataSet());
}
diff --git a/src/main/java/org/dbunit/database/AbstractResultSetTable.java b/src/main/java/org/dbunit/database/AbstractResultSetTable.java
index 439b95456..a08570b95 100644
--- a/src/main/java/org/dbunit/database/AbstractResultSetTable.java
+++ b/src/main/java/org/dbunit/database/AbstractResultSetTable.java
@@ -27,11 +27,14 @@
import org.dbunit.dataset.AbstractTable;
import org.dbunit.dataset.DataSetException;
+import org.dbunit.dataset.ITable;
import org.dbunit.dataset.ITableMetaData;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
+ * Abstract base for {@link ITable} implementations backed directly by a JDBC {@link ResultSet}.
+ *
* @author Manuel Laflamme
* @since Apr 10, 2003
* @version $Revision$
diff --git a/src/main/java/org/dbunit/database/CachedResultSetTable.java b/src/main/java/org/dbunit/database/CachedResultSetTable.java
index 87e169274..af0fd053c 100644
--- a/src/main/java/org/dbunit/database/CachedResultSetTable.java
+++ b/src/main/java/org/dbunit/database/CachedResultSetTable.java
@@ -29,6 +29,8 @@
import java.sql.SQLException;
/**
+ * {@link IResultSetTable} that eagerly loads and caches an entire {@link ResultSet} in memory.
+ *
* @author Manuel Laflamme
* @version $Revision$
* @since Feb 20, 2002
diff --git a/src/main/java/org/dbunit/database/CachedResultSetTableFactory.java b/src/main/java/org/dbunit/database/CachedResultSetTableFactory.java
index 22feabb47..5d9e60c20 100644
--- a/src/main/java/org/dbunit/database/CachedResultSetTableFactory.java
+++ b/src/main/java/org/dbunit/database/CachedResultSetTableFactory.java
@@ -29,6 +29,8 @@
import org.slf4j.LoggerFactory;
/**
+ * {@link IResultSetTableFactory} that creates fully cached, disconnected {@link IResultSetTable} instances.
+ *
* @author manuel.laflamme
* @author Last changed by: $Author$
* @version $Revision$ $Date$
diff --git a/src/main/java/org/dbunit/database/CyclicTablesDependencyException.java b/src/main/java/org/dbunit/database/CyclicTablesDependencyException.java
index fc9b48b1e..c4a675522 100644
--- a/src/main/java/org/dbunit/database/CyclicTablesDependencyException.java
+++ b/src/main/java/org/dbunit/database/CyclicTablesDependencyException.java
@@ -25,6 +25,9 @@
import org.dbunit.dataset.DataSetException;
/**
+ * Signals that a set of tables has a foreign-key dependency cycle that cannot be
+ * resolved into a linear ordering.
+ *
* @author Manuel Laflamme
* @since Mar 23, 2003
* @version $Revision$
diff --git a/src/main/java/org/dbunit/database/DatabaseConfig.java b/src/main/java/org/dbunit/database/DatabaseConfig.java
index 882a7117f..87fd1df93 100644
--- a/src/main/java/org/dbunit/database/DatabaseConfig.java
+++ b/src/main/java/org/dbunit/database/DatabaseConfig.java
@@ -474,6 +474,8 @@ public String toString()
/**
+ * Descriptor for a single named, typed, nullable {@link DatabaseConfig} property.
+ *
* @author gommma (gommma AT users.sourceforge.net)
* @author Last changed by: $Author$
* @version $Revision$ $Date$
diff --git a/src/main/java/org/dbunit/database/DatabaseTableIterator.java b/src/main/java/org/dbunit/database/DatabaseTableIterator.java
index 662251280..33adc4f8d 100644
--- a/src/main/java/org/dbunit/database/DatabaseTableIterator.java
+++ b/src/main/java/org/dbunit/database/DatabaseTableIterator.java
@@ -29,6 +29,8 @@
import org.slf4j.LoggerFactory;
/**
+ * {@link ITableIterator} over the tables of a live database connection.
+ *
* @author Manuel Laflamme
* @author Last changed by: $Author$
* @version $Revision$ $Date$
diff --git a/src/main/java/org/dbunit/database/ForwardOnlyResultSetTable.java b/src/main/java/org/dbunit/database/ForwardOnlyResultSetTable.java
index 494b3b60d..b81704411 100644
--- a/src/main/java/org/dbunit/database/ForwardOnlyResultSetTable.java
+++ b/src/main/java/org/dbunit/database/ForwardOnlyResultSetTable.java
@@ -32,6 +32,8 @@
import java.sql.SQLException;
/**
+ * {@link IResultSetTable} implementation backed by a forward-only, non-cached {@link ResultSet}.
+ *
* @author Manuel Laflamme
* @since Apr 10, 2003
* @version $Revision$
diff --git a/src/main/java/org/dbunit/database/ForwardOnlyResultSetTableFactory.java b/src/main/java/org/dbunit/database/ForwardOnlyResultSetTableFactory.java
index a0f5d78c9..e4b9eebae 100644
--- a/src/main/java/org/dbunit/database/ForwardOnlyResultSetTableFactory.java
+++ b/src/main/java/org/dbunit/database/ForwardOnlyResultSetTableFactory.java
@@ -31,6 +31,8 @@
import org.slf4j.LoggerFactory;
/**
+ * {@link IResultSetTableFactory} that creates forward-only, non-cached {@link IResultSetTable} instances.
+ *
* @author manuel.laflamme
* @author Last changed by: $Author$
* @version $Revision$ $Date$
diff --git a/src/main/java/org/dbunit/database/IDatabaseConnection.java b/src/main/java/org/dbunit/database/IDatabaseConnection.java
index 44180cad1..ae3d67d99 100644
--- a/src/main/java/org/dbunit/database/IDatabaseConnection.java
+++ b/src/main/java/org/dbunit/database/IDatabaseConnection.java
@@ -41,21 +41,31 @@ public interface IDatabaseConnection
{
/**
* Returns a JDBC database connection.
+ *
+ * @return the underlying JDBC connection.
+ * @throws SQLException if a database access error occurs.
*/
public Connection getConnection() throws SQLException;
/**
* Returns the database schema name.
+ *
+ * @return the schema name, or {@code null} if none is set.
*/
public String getSchema();
/**
* Close this connection.
+ *
+ * @throws SQLException if a database access error occurs.
*/
public void close() throws SQLException;
/**
* Creates a dataset corresponding to the entire database.
+ *
+ * @return the new dataset.
+ * @throws SQLException if a database access error occurs.
*/
public IDataSet createDataSet() throws SQLException;
@@ -64,10 +74,10 @@ public interface IDatabaseConnection
* the database.
* @param tableNames The tables for which a dataset shall be created
* @return The new dataset
- * @throws SQLException
- * @throws DataSetException
+ * @throws SQLException if a database access error occurs.
+ * @throws DataSetException if a table in
+ *
* IDataSet dataSet = getDataSet();
* DiffCollectingFailureHandler myHandler = new DiffCollectingFailureHandler();
* //invoke the assertion with the custom handler
@@ -39,8 +39,8 @@
* List diffList = myHandler.getDiffList();
* Difference diff = (Difference)diffList.get(0);
* ...
- * tableNames does not exist in the database.
*/
- public IDataSet createDataSet(String[] tableNames)
+ public IDataSet createDataSet(String[] tableNames)
throws SQLException, DataSetException;
/**
@@ -77,8 +87,8 @@ public IDataSet createDataSet(String[] tableNames)
* @param tableName The name to be returned by {@link org.dbunit.dataset.ITableMetaData#getTableName}.
* @param sql The SQL SELECT statement
* @return The new table
- * @throws DataSetException
- * @throws SQLException
+ * @throws DataSetException if an error occurs building the table's metadata.
+ * @throws SQLException if a database access error occurs.
*/
public ITable createQueryTable(String tableName, String sql)
throws DataSetException, SQLException;
@@ -89,27 +99,31 @@ public ITable createQueryTable(String tableName, String sql)
* @param tableName The name to be returned by {@link org.dbunit.dataset.ITableMetaData#getTableName}.
* @param preparedStatement The statement to be executed as query
* @return The new table
- * @throws DataSetException
- * @throws SQLException
+ * @throws DataSetException if an error occurs building the table's metadata.
+ * @throws SQLException if a database access error occurs.
* @since 2.4.4
*/
public ITable createTable(String tableName, PreparedStatement preparedStatement)
throws DataSetException, SQLException;
/**
- * Creates a table with the result of a select * from tableName SQL statement.
+ * Creates a table with the result of a select * from tableName SQL statement.
*
- * @param tableName The name of the database table to be queried which is also returned by
+ * @param tableName The name of the database table to be queried which is also returned by
* {@link org.dbunit.dataset.ITableMetaData#getTableName}.
+ * @return The new table.
+ * @throws DataSetException if an error occurs building the table's metadata.
+ * @throws SQLException if a database access error occurs.
*/
public ITable createTable(String tableName)
throws DataSetException, SQLException;
-
+
/**
* Returns the specified table row count.
*
* @param tableName the table name
* @return the row count
+ * @throws SQLException if a database access error occurs.
*/
public int getRowCount(String tableName) throws SQLException;
@@ -119,15 +133,21 @@ public ITable createTable(String tableName)
* @param tableName the table name
* @param whereClause the where clause
* @return the row count
+ * @throws SQLException if a database access error occurs.
*/
public int getRowCount(String tableName, String whereClause) throws SQLException;
/**
* Returns this connection database configuration
+ *
+ * @return this connection's {@link DatabaseConfig}.
*/
public DatabaseConfig getConfig();
/**
+ * Returns the statement factory configured on this connection.
+ *
+ * @return this connection's {@link IStatementFactory}.
* @deprecated Use {@link #getConfig}
*/
public IStatementFactory getStatementFactory();
diff --git a/src/main/java/org/dbunit/database/IResultSetTable.java b/src/main/java/org/dbunit/database/IResultSetTable.java
index 8ecf45311..10dcd6c54 100644
--- a/src/main/java/org/dbunit/database/IResultSetTable.java
+++ b/src/main/java/org/dbunit/database/IResultSetTable.java
@@ -25,6 +25,8 @@
/**
+ * An {@link ITable} backed by a JDBC result set that must be closed after use.
+ *
* @author Manuel Laflamme
* @since Apr 10, 2003
* @version $Revision$
diff --git a/src/main/java/org/dbunit/database/IResultSetTableFactory.java b/src/main/java/org/dbunit/database/IResultSetTableFactory.java
index a3393705e..425a603f8 100644
--- a/src/main/java/org/dbunit/database/IResultSetTableFactory.java
+++ b/src/main/java/org/dbunit/database/IResultSetTableFactory.java
@@ -27,6 +27,7 @@
import java.sql.SQLException;
/**
+ * Factory that creates {@link IResultSetTable} instances for a given query.
*
* @author manuel.laflamme
* @since Jul 17, 2003
diff --git a/src/main/java/org/dbunit/database/ResultSetTableMetaData.java b/src/main/java/org/dbunit/database/ResultSetTableMetaData.java
index 84ca6e15e..869c04025 100644
--- a/src/main/java/org/dbunit/database/ResultSetTableMetaData.java
+++ b/src/main/java/org/dbunit/database/ResultSetTableMetaData.java
@@ -66,9 +66,8 @@
* directly (for example {@link ResultSetMetaData#getColumnType(int)}. (This is also the way
* dbunit worked until the 2.4 release)
*
- *
- *
DataType
+ *
+ * @param value the value to typecast.
+ * @return the typecast value.
+ * @throws TypeCastException if the value cannot be typecast to this DataType.
*/
public abstract Object typeCast(Object value) throws TypeCastException;
@@ -132,6 +136,10 @@ public abstract class DataType
*
* The two values are typecast to this DataType before being compared.
*
+ * @param o1 the first value to compare.
+ * @param o2 the second value to compare.
+ * @return a negative integer, zero, or a positive integer as o1
+ * is less than, equal to, or greater than o2.
* @throws TypeCastException
* if the arguments' types prevent them from being compared by
* this Comparator.
@@ -140,16 +148,22 @@ public abstract class DataType
/**
* Returns the corresponding {@link java.sql.Types}.
+ *
+ * @return the corresponding {@link java.sql.Types} constant.
*/
public abstract int getSqlType();
/**
* Returns the runtime class of the typecast result.
+ *
+ * @return the runtime class of the typecast result.
*/
public abstract Class getTypeClass();
/**
* Returns the SQL type name for user types (null for basic SQL types)
+ *
+ * @return the SQL type name for user types, or null for basic SQL types.
*/
public String getSqlTypeName()
{
@@ -159,29 +173,49 @@ public String getSqlTypeName()
/**
* Returns true if this DataType represents a
* number.
+ *
+ * @return true if this DataType represents a number.
*/
public abstract boolean isNumber();
/**
* Returns true if this DataType represents a date
* and/or time.
+ *
+ * @return true if this DataType represents a date and/or time.
*/
public abstract boolean isDateTime();
/**
* Returns the specified column value from the specified resultset object.
+ *
+ * @param column the column index to read, starting at 1.
+ * @param resultSet the result set to read the column value from.
+ * @return the column value.
+ * @throws SQLException if a database access error occurs.
+ * @throws TypeCastException if the value cannot be typecast to this DataType.
*/
public abstract Object getSqlValue(int column, ResultSet resultSet)
throws SQLException, TypeCastException;
/**
* Set the specified value to the specified prepared statement object.
+ *
+ * @param value the value to bind.
+ * @param column the parameter index to bind to, starting at 1.
+ * @param statement the prepared statement to bind the value on.
+ * @throws SQLException if a database access error occurs.
+ * @throws TypeCastException if the value cannot be typecast to this DataType.
*/
public abstract void setSqlValue(Object value, int column,
PreparedStatement statement) throws SQLException, TypeCastException;
/**
* Typecast the specified value to string.
+ *
+ * @param value the value to typecast.
+ * @return the typecast value.
+ * @throws TypeCastException if the value cannot be typecast to a string.
*/
public static String asString(Object value) throws TypeCastException
{
@@ -194,6 +228,9 @@ public static String asString(Object value) throws TypeCastException
* Returns the DataType corresponding to the specified Sql
* type. See {@link java.sql.Types}.
*
+ * @param sqlType the {@link java.sql.Types} constant to look up.
+ * @return the corresponding DataType, or {@code DataType.UNKNOWN} if not recognized.
+ * @throws DataTypeException if the corresponding DataType cannot be determined.
*/
public static DataType forSqlType(int sqlType) throws DataTypeException
{
@@ -214,6 +251,9 @@ public static DataType forSqlType(int sqlType) throws DataTypeException
* Returns the DataType corresponding to the specified Sql type
* name.
*
+ * @param sqlTypeName the Sql type name to look up.
+ * @return the corresponding DataType, or {@code DataType.UNKNOWN} if not recognized.
+ * @throws DataTypeException if the corresponding DataType cannot be determined.
* @deprecated Should not be used anymore
*/
public static DataType forSqlTypeName(String sqlTypeName)
@@ -236,6 +276,9 @@ public static DataType forSqlTypeName(String sqlTypeName)
* Returns the DataType corresponding to the specified value
* runtime class. This method returns DataType.UNKNOWN if the
* value is null or runtime class not recognized.
+ *
+ * @param value the value whose runtime class is to be mapped.
+ * @return the corresponding DataType, or {@code DataType.UNKNOWN} if not recognized.
*/
public static DataType forObject(Object value)
{
diff --git a/src/main/java/org/dbunit/dataset/datatype/DataTypeException.java b/src/main/java/org/dbunit/dataset/datatype/DataTypeException.java
index ee07e5803..3ed124ea1 100644
--- a/src/main/java/org/dbunit/dataset/datatype/DataTypeException.java
+++ b/src/main/java/org/dbunit/dataset/datatype/DataTypeException.java
@@ -24,6 +24,8 @@
import org.dbunit.dataset.DataSetException;
/**
+ * Base checked exception for errors related to {@link DataType} value conversion.
+ *
* @author Manuel Laflamme
* @version $Revision$
*/
diff --git a/src/main/java/org/dbunit/dataset/datatype/DateDataType.java b/src/main/java/org/dbunit/dataset/datatype/DateDataType.java
index 548a66662..d355e77a3 100644
--- a/src/main/java/org/dbunit/dataset/datatype/DateDataType.java
+++ b/src/main/java/org/dbunit/dataset/datatype/DateDataType.java
@@ -33,6 +33,8 @@
import org.slf4j.LoggerFactory;
/**
+ * {@link DataType} mapping the SQL DATE type to {@link java.sql.Date}.
+ *
* @author Manuel Laflamme
* @version $Revision$
* @since Feb 19, 2002
diff --git a/src/main/java/org/dbunit/dataset/datatype/DoubleDataType.java b/src/main/java/org/dbunit/dataset/datatype/DoubleDataType.java
index ac5aa5ecf..0b7088b91 100644
--- a/src/main/java/org/dbunit/dataset/datatype/DoubleDataType.java
+++ b/src/main/java/org/dbunit/dataset/datatype/DoubleDataType.java
@@ -31,6 +31,8 @@
import org.slf4j.LoggerFactory;
/**
+ * {@link DataType} mapping floating-point SQL column types to {@link Double}.
+ *
* @author Manuel Laflamme
* @version $Revision$
*/
diff --git a/src/main/java/org/dbunit/dataset/datatype/FloatDataType.java b/src/main/java/org/dbunit/dataset/datatype/FloatDataType.java
index a97e241ee..6f00a153b 100644
--- a/src/main/java/org/dbunit/dataset/datatype/FloatDataType.java
+++ b/src/main/java/org/dbunit/dataset/datatype/FloatDataType.java
@@ -32,6 +32,8 @@
import org.slf4j.LoggerFactory;
/**
+ * {@link DataType} mapping the SQL REAL type to {@link Float}.
+ *
* @author Manuel Laflamme
* @version $Revision$
*/
diff --git a/src/main/java/org/dbunit/dataset/datatype/IntegerDataType.java b/src/main/java/org/dbunit/dataset/datatype/IntegerDataType.java
index bc93b4efe..fb3e41b63 100644
--- a/src/main/java/org/dbunit/dataset/datatype/IntegerDataType.java
+++ b/src/main/java/org/dbunit/dataset/datatype/IntegerDataType.java
@@ -31,6 +31,8 @@
import org.slf4j.LoggerFactory;
/**
+ * {@link DataType} mapping integer SQL column types to {@link Integer}.
+ *
* @author Manuel Laflamme
* @version $Revision$
*/
diff --git a/src/main/java/org/dbunit/dataset/datatype/LongDataType.java b/src/main/java/org/dbunit/dataset/datatype/LongDataType.java
index 4017662d0..a5b9fc7cb 100644
--- a/src/main/java/org/dbunit/dataset/datatype/LongDataType.java
+++ b/src/main/java/org/dbunit/dataset/datatype/LongDataType.java
@@ -32,6 +32,8 @@
import org.slf4j.LoggerFactory;
/**
+ * {@link DataType} mapping the SQL BIGINT type to {@link Long}.
+ *
* @author Manuel Laflamme
* @version $Revision$
*/
diff --git a/src/main/java/org/dbunit/dataset/datatype/NumberDataType.java b/src/main/java/org/dbunit/dataset/datatype/NumberDataType.java
index d9c81c7c7..a93668207 100644
--- a/src/main/java/org/dbunit/dataset/datatype/NumberDataType.java
+++ b/src/main/java/org/dbunit/dataset/datatype/NumberDataType.java
@@ -31,6 +31,8 @@
import org.slf4j.LoggerFactory;
/**
+ * {@link DataType} mapping numeric SQL column types to {@link java.math.BigDecimal}.
+ *
* @author Manuel Laflamme
* @version $Revision$
* @since Feb 17, 2002
diff --git a/src/main/java/org/dbunit/dataset/datatype/StringDataType.java b/src/main/java/org/dbunit/dataset/datatype/StringDataType.java
index f3de19c47..de379df80 100644
--- a/src/main/java/org/dbunit/dataset/datatype/StringDataType.java
+++ b/src/main/java/org/dbunit/dataset/datatype/StringDataType.java
@@ -33,6 +33,8 @@
import org.slf4j.LoggerFactory;
/**
+ * {@link DataType} mapping character-based SQL column types to {@link String}.
+ *
* @author Manuel Laflamme
* @author Last changed by: $Author$
* @version $Revision$ $Date$
diff --git a/src/main/java/org/dbunit/dataset/datatype/TimestampDataType.java b/src/main/java/org/dbunit/dataset/datatype/TimestampDataType.java
index 23d73a877..68f67f5a6 100644
--- a/src/main/java/org/dbunit/dataset/datatype/TimestampDataType.java
+++ b/src/main/java/org/dbunit/dataset/datatype/TimestampDataType.java
@@ -42,6 +42,8 @@
import org.slf4j.LoggerFactory;
/**
+ * {@link DataType} mapping the SQL TIMESTAMP type to {@link java.sql.Timestamp}.
+ *
* @author Manuel Laflamme
* @author Last changed by: $Author$
* @version $Revision$ $Date$
diff --git a/src/main/java/org/dbunit/dataset/datatype/TypeCastException.java b/src/main/java/org/dbunit/dataset/datatype/TypeCastException.java
index 45afcfbde..44bbdeb91 100644
--- a/src/main/java/org/dbunit/dataset/datatype/TypeCastException.java
+++ b/src/main/java/org/dbunit/dataset/datatype/TypeCastException.java
@@ -22,6 +22,8 @@
package org.dbunit.dataset.datatype;
/**
+ * Signals that a value could not be cast to the Java type required by a {@link DataType}.
+ *
* @author Manuel Laflamme
* @version $Revision$
*/
diff --git a/src/main/java/org/dbunit/dataset/datatype/UnknownDataType.java b/src/main/java/org/dbunit/dataset/datatype/UnknownDataType.java
index 49c90b15a..02288ebe7 100644
--- a/src/main/java/org/dbunit/dataset/datatype/UnknownDataType.java
+++ b/src/main/java/org/dbunit/dataset/datatype/UnknownDataType.java
@@ -29,6 +29,9 @@
import java.sql.Types;
/**
+ * {@link DataType} fallback used for SQL types that DbUnit does not otherwise
+ * recognize, mapped to {@link Object}.
+ *
* @author Manuel Laflamme
* @version $Revision$
*/
diff --git a/src/main/java/org/dbunit/dataset/filter/DefaultColumnFilter.java b/src/main/java/org/dbunit/dataset/filter/DefaultColumnFilter.java
index 8f3c99b04..121b623dc 100644
--- a/src/main/java/org/dbunit/dataset/filter/DefaultColumnFilter.java
+++ b/src/main/java/org/dbunit/dataset/filter/DefaultColumnFilter.java
@@ -65,7 +65,7 @@ public void includeColumn(String columnPattern)
*/
public void includeColumns(Column[] columns)
{
- logger.debug("includeColumns(columns={}) - start", columns);
+ logger.debug("includeColumns(columns={}) - start", (Object) columns);
for (int i = 0; i < columns.length; i++)
{
@@ -91,7 +91,7 @@ public void excludeColumn(String columnPattern)
*/
public void excludeColumns(Column[] columns)
{
- logger.debug("excludeColumns(columns={} - start", columns);
+ logger.debug("excludeColumns(columns={}) - start", (Object) columns);
for (int i = 0; i < columns.length; i++)
{
diff --git a/src/main/java/org/dbunit/dataset/filter/SequenceTableIterator.java b/src/main/java/org/dbunit/dataset/filter/SequenceTableIterator.java
index 12cbea6af..c8e0c2cda 100644
--- a/src/main/java/org/dbunit/dataset/filter/SequenceTableIterator.java
+++ b/src/main/java/org/dbunit/dataset/filter/SequenceTableIterator.java
@@ -29,6 +29,9 @@
import org.slf4j.LoggerFactory;
/**
+ * {@link ITableIterator} that returns a dataset's tables in a caller-specified
+ * name order.
+ *
* @author Manuel Laflamme
* @author Last changed by: $Author$
* @version $Revision$ $Date$
diff --git a/src/main/java/org/dbunit/dataset/sqlloader/SqlLoaderControlDataSet.java b/src/main/java/org/dbunit/dataset/sqlloader/SqlLoaderControlDataSet.java
index 21dc69399..a691625d8 100644
--- a/src/main/java/org/dbunit/dataset/sqlloader/SqlLoaderControlDataSet.java
+++ b/src/main/java/org/dbunit/dataset/sqlloader/SqlLoaderControlDataSet.java
@@ -32,21 +32,21 @@
* files. It handles translations of "null"(the string), into null.
*
* Example usage:
- *
+ *
* The file
+ *
* File ctlDir = new File("src/sqlloader");
* File orderedTablesFile = new File("src/sqlloader/tables.lst");
* IDataSet dataSet = new SqlLoaderControlDataSet(ctlDir, orderedTablesFile);
- * orderedTablesFile must contain the names of the tables to
* be imported. As a convention the .ctl file must have the same name as the table names file.
* Here an example of the "tables.lst" file:
*
*
| LANGUAGE COUNTRY |
ctlDir directory must then contain the files COUNTRY.ctl
* and LANGUAGE.ctl.
- *
*
* @author Stephan Strittmatter (stritti AT users.sourceforge.net), gommma (gommma AT users.sourceforge.net)
* @author Last changed by: $Author$
diff --git a/src/main/java/org/dbunit/dataset/sqlloader/SqlLoaderControlParserException.java b/src/main/java/org/dbunit/dataset/sqlloader/SqlLoaderControlParserException.java
index 6498438f7..0f95a915b 100644
--- a/src/main/java/org/dbunit/dataset/sqlloader/SqlLoaderControlParserException.java
+++ b/src/main/java/org/dbunit/dataset/sqlloader/SqlLoaderControlParserException.java
@@ -23,6 +23,8 @@
import org.dbunit.DatabaseUnitRuntimeException;
/**
+ * Signals an error while parsing a SQL*Loader control (.ctl) file.
+ *
* @author Stephan Strittmatter (stritti AT users.sourceforge.net)
* @author Last changed by: $Author$
* @version $Revision$ $Date$
diff --git a/src/main/java/org/dbunit/dataset/xml/FlatDtdDataSet.java b/src/main/java/org/dbunit/dataset/xml/FlatDtdDataSet.java
index a4c586f00..1f733fda0 100644
--- a/src/main/java/org/dbunit/dataset/xml/FlatDtdDataSet.java
+++ b/src/main/java/org/dbunit/dataset/xml/FlatDtdDataSet.java
@@ -46,6 +46,9 @@
import org.xml.sax.InputSource;
/**
+ * {@link org.dbunit.dataset.IDataSet} built by consuming table metadata declared
+ * in a flat DTD document.
+ *
* @author Manuel Laflamme
* @author Last changed by: $Author$
* @version $Revision$ $Date$
diff --git a/src/main/java/org/dbunit/dataset/xml/FlatDtdWriter.java b/src/main/java/org/dbunit/dataset/xml/FlatDtdWriter.java
index fa029dd25..91538f930 100644
--- a/src/main/java/org/dbunit/dataset/xml/FlatDtdWriter.java
+++ b/src/main/java/org/dbunit/dataset/xml/FlatDtdWriter.java
@@ -30,6 +30,8 @@
import org.slf4j.LoggerFactory;
/**
+ * Writes a flat DTD document describing a dataset's tables and columns.
+ *
* @author Manuel Laflamme
* @author Last changed by: $Author$
* @version $Revision$ $Date$
@@ -125,6 +127,9 @@ public void write(IDataSet dataSet) throws DataSetException
}
/**
+ * Abstract strategy for rendering a DTD element's content model (the part
+ * between the parentheses in an <!ELEMENT> declaration).
+ *
* @author Manuel Laflamme
* @author Last changed by: $Author$
* @version $Revision$ $Date$
@@ -150,6 +155,9 @@ public abstract void write(PrintWriter writer, String tableName,
/**
+ * {@link ContentModel} that renders table names as a comma-separated,
+ * ordered sequence.
+ *
* @author Manuel Laflamme
* @author Last changed by: $Author$
* @version $Revision$ $Date$
@@ -189,6 +197,8 @@ public void write(PrintWriter writer, String tableName, int tableIndex, int tabl
}
/**
+ * {@link ContentModel} that renders table names as a pipe-separated choice group.
+ *
* @author Manuel Laflamme
* @author Last changed by: $Author$
* @version $Revision$ $Date$
diff --git a/src/main/java/org/dbunit/dataset/xml/FlatXmlDataSet.java b/src/main/java/org/dbunit/dataset/xml/FlatXmlDataSet.java
index b196e1930..6ed6e5224 100644
--- a/src/main/java/org/dbunit/dataset/xml/FlatXmlDataSet.java
+++ b/src/main/java/org/dbunit/dataset/xml/FlatXmlDataSet.java
@@ -45,7 +45,6 @@
* correspond to table columns.
* * Flat XML dataset document sample: - *
*
* <!DOCTYPE dataset SYSTEM "my-dataset.dtd"> * <dataset> @@ -85,8 +84,7 @@ ** * - * - * + * * @author Manuel Laflamme * @author gommma (gommma AT users.sourceforge.net) * @author Last changed by: $Author$ diff --git a/src/main/java/org/dbunit/dataset/xml/FlatXmlProducer.java b/src/main/java/org/dbunit/dataset/xml/FlatXmlProducer.java index ac4c8d9c4..47de7c681 100644 --- a/src/main/java/org/dbunit/dataset/xml/FlatXmlProducer.java +++ b/src/main/java/org/dbunit/dataset/xml/FlatXmlProducer.java @@ -56,6 +56,9 @@ import org.xml.sax.helpers.DefaultHandler; /** + * {@link IDataSetProducer} that parses a flat XML dataset document via SAX and + * streams table/row events. + * * @author Manuel Laflamme * @author Last changed by: $Author$ * @version $Revision$ $Date$ diff --git a/src/main/java/org/dbunit/dataset/xml/FlatXmlWriter.java b/src/main/java/org/dbunit/dataset/xml/FlatXmlWriter.java index e29b65a92..b41adc19a 100644 --- a/src/main/java/org/dbunit/dataset/xml/FlatXmlWriter.java +++ b/src/main/java/org/dbunit/dataset/xml/FlatXmlWriter.java @@ -39,6 +39,8 @@ import org.slf4j.LoggerFactory; /** + * {@link IDataSetConsumer} that writes a dataset to the DbUnit flat XML dataset format. + * * @author Manuel Laflamme * @author Last changed by: $Author$ * @version $Revision$ $Date$ diff --git a/src/main/java/org/dbunit/dataset/xml/XmlDataSetWriter.java b/src/main/java/org/dbunit/dataset/xml/XmlDataSetWriter.java index 0187198f9..33d03ec79 100644 --- a/src/main/java/org/dbunit/dataset/xml/XmlDataSetWriter.java +++ b/src/main/java/org/dbunit/dataset/xml/XmlDataSetWriter.java @@ -39,6 +39,8 @@ import org.slf4j.LoggerFactory; /** + * {@link IDataSetConsumer} that writes a dataset to the DbUnit XML dataset format. + * * @author Manuel Laflamme * @author Last changed by: $Author$ * @version $Revision$ $Date$ diff --git a/src/main/java/org/dbunit/dataset/yaml/YamlProducer.java b/src/main/java/org/dbunit/dataset/yaml/YamlProducer.java index f50fe99d6..1ff37d580 100644 --- a/src/main/java/org/dbunit/dataset/yaml/YamlProducer.java +++ b/src/main/java/org/dbunit/dataset/yaml/YamlProducer.java @@ -46,6 +46,9 @@ import java.util.Set; /** + * {@link IDataSetProducer} that parses a YAML dataset document and streams + * table/row events. + * * @author Björn Beskow * @version $Revision$ $Date$ */ diff --git a/src/main/java/org/dbunit/ext/db2/Db2MetadataHandler.java b/src/main/java/org/dbunit/ext/db2/Db2MetadataHandler.java index d8d2d36d1..e19e03cbc 100644 --- a/src/main/java/org/dbunit/ext/db2/Db2MetadataHandler.java +++ b/src/main/java/org/dbunit/ext/db2/Db2MetadataHandler.java @@ -51,7 +51,7 @@ public Db2MetadataHandler() { * problem that the {@link DatabaseMetaData} does not return the same values for catalog and schema * like the columns {@link ResultSet} does. The debugging constellation is as follows *
- * catalog="BLA", catalogName=* This problem is taken into account by this metadata handler. diff --git a/src/main/java/org/dbunit/ext/h2/H2Connection.java b/src/main/java/org/dbunit/ext/h2/H2Connection.java index 2c1132c1c..1c3f03827 100644 --- a/src/main/java/org/dbunit/ext/h2/H2Connection.java +++ b/src/main/java/org/dbunit/ext/h2/H2Connection.java @@ -27,6 +27,8 @@ import java.sql.Connection; /** + * {@link DatabaseConnection} specialization that configures H2-specific connection + * behavior. * * @author Felipe Leme * @author Last changed by: $Author$ diff --git a/src/main/java/org/dbunit/ext/hsqldb/HsqldbConnection.java b/src/main/java/org/dbunit/ext/hsqldb/HsqldbConnection.java index 5ec44e293..71ea1fde9 100644 --- a/src/main/java/org/dbunit/ext/hsqldb/HsqldbConnection.java +++ b/src/main/java/org/dbunit/ext/hsqldb/HsqldbConnection.java @@ -27,6 +27,9 @@ import java.sql.Connection; /** + * {@link DatabaseConnection} specialization that configures HSQLDB-specific + * connection behavior. + * * @author Klas Axell * @author Last changed by: $Author$ * @version $Revision$ $Date$ diff --git a/src/main/java/org/dbunit/ext/mssql/DateTimeOffsetType.java b/src/main/java/org/dbunit/ext/mssql/DateTimeOffsetType.java index e9c5c07d9..3ffb82707 100644 --- a/src/main/java/org/dbunit/ext/mssql/DateTimeOffsetType.java +++ b/src/main/java/org/dbunit/ext/mssql/DateTimeOffsetType.java @@ -33,6 +33,8 @@ import org.dbunit.dataset.datatype.TypeCastException; /** + * {@link AbstractDataType} mapping Microsoft SQL Server's DATETIMEOFFSET type. + * * @author Richard DiCroce * @since 2.7.0 */ diff --git a/src/main/java/org/dbunit/ext/mssql/MsSqlConnection.java b/src/main/java/org/dbunit/ext/mssql/MsSqlConnection.java index 3da20e94d..997b4414b 100644 --- a/src/main/java/org/dbunit/ext/mssql/MsSqlConnection.java +++ b/src/main/java/org/dbunit/ext/mssql/MsSqlConnection.java @@ -36,6 +36,9 @@ import java.sql.SQLException; /** + * {@link DatabaseConnection} specialization that configures Microsoft SQL Server-specific + * connection behavior. + * * @author Manuel Laflamme * @since May 19, 2003 * @version $Revision$ @@ -91,7 +94,7 @@ public IDataSet createDataSet() throws SQLException public IDataSet createDataSet(String[] tableNames) throws SQLException, DataSetException { - logger.debug("createDataSet(tableNames={}) - start", tableNames); + logger.debug("createDataSet(tableNames={}) - start", (Object) tableNames); IDataSet dataSet = super.createDataSet(tableNames); return new FilteredDataSet(_filter, dataSet); diff --git a/src/main/java/org/dbunit/ext/mysql/MySqlConnection.java b/src/main/java/org/dbunit/ext/mysql/MySqlConnection.java index 090a58ae7..60f0fde0d 100644 --- a/src/main/java/org/dbunit/ext/mysql/MySqlConnection.java +++ b/src/main/java/org/dbunit/ext/mysql/MySqlConnection.java @@ -27,6 +27,8 @@ import java.sql.Connection; /** + * {@link DatabaseConnection} specialization that configures MySQL-specific + * connection behavior. * * @author manuel.laflamme * @since Sep 4, 2003 diff --git a/src/main/java/org/dbunit/ext/oracle/OracleBlobDataType.java b/src/main/java/org/dbunit/ext/oracle/OracleBlobDataType.java index d0b80f57f..e4fa1e046 100644 --- a/src/main/java/org/dbunit/ext/oracle/OracleBlobDataType.java +++ b/src/main/java/org/dbunit/ext/oracle/OracleBlobDataType.java @@ -34,6 +34,9 @@ import java.sql.SQLException; /** + * {@link BlobDataType} specialization that works around Oracle JDBC driver + * BLOB handling quirks. + * * @author Manuel Laflamme * @author Last changed by: $Author$ * @version $Revision$ $Date$ diff --git a/src/main/java/org/dbunit/ext/oracle/OracleClobDataType.java b/src/main/java/org/dbunit/ext/oracle/OracleClobDataType.java index a789694c4..78bf740dd 100644 --- a/src/main/java/org/dbunit/ext/oracle/OracleClobDataType.java +++ b/src/main/java/org/dbunit/ext/oracle/OracleClobDataType.java @@ -34,6 +34,9 @@ import org.slf4j.LoggerFactory; /** + * {@link ClobDataType} specialization that works around Oracle JDBC driver + * CLOB handling quirks. + * * @author Manuel Laflamme * @author Last changed by: $Author$ * @version $Revision$ $Date$ diff --git a/src/main/java/org/dbunit/ext/oracle/OracleConnection.java b/src/main/java/org/dbunit/ext/oracle/OracleConnection.java index 025328d5f..ef25eceb7 100644 --- a/src/main/java/org/dbunit/ext/oracle/OracleConnection.java +++ b/src/main/java/org/dbunit/ext/oracle/OracleConnection.java @@ -28,6 +28,8 @@ import java.util.Locale; /** + * {@link DatabaseConnection} specialization that configures Oracle-specific + * connection behavior. * * @author manuel.laflamme * @since Sep 3, 2003 diff --git a/src/main/java/org/dbunit/ext/oracle/OracleSdoGeometryDataType.java b/src/main/java/org/dbunit/ext/oracle/OracleSdoGeometryDataType.java index cd772a283..6f9b8cdce 100644 --- a/src/main/java/org/dbunit/ext/oracle/OracleSdoGeometryDataType.java +++ b/src/main/java/org/dbunit/ext/oracle/OracleSdoGeometryDataType.java @@ -110,7 +110,6 @@ * in test cases. Note that I did have to bash the jpub startup script (change classpath) * because it assumes oracle 10g database but I ran it with 11g. Theoretically, this * process can be repeated for other custom oracle object data types. - * * * @author clucas@e-miles.com * @author Last changed by: $Author$ diff --git a/src/main/java/org/dbunit/ext/oracle/OracleXMLTypeDataType.java b/src/main/java/org/dbunit/ext/oracle/OracleXMLTypeDataType.java index 741d66862..902f6af3f 100644 --- a/src/main/java/org/dbunit/ext/oracle/OracleXMLTypeDataType.java +++ b/src/main/java/org/dbunit/ext/oracle/OracleXMLTypeDataType.java @@ -36,6 +36,7 @@ import oracle.jdbc.OracleResultSet; /** + * {@link BlobDataType} specialization mapping Oracle's XMLTYPE column type. * * @author Phil Barr * @author Last changed by: $Author$ diff --git a/src/main/java/org/dbunit/ext/postgresql/CitextType.java b/src/main/java/org/dbunit/ext/postgresql/CitextType.java index 26076b552..62954d20d 100644 --- a/src/main/java/org/dbunit/ext/postgresql/CitextType.java +++ b/src/main/java/org/dbunit/ext/postgresql/CitextType.java @@ -75,8 +75,8 @@ private Object getCitext(Object value, Connection connection) throws TypeCastExc try { Class aPGObjectClass = super.loadClass("org.postgresql.util.PGobject", connection); - Constructor ct = aPGObjectClass.getConstructor(null); - tempCitext = ct.newInstance(null); + Constructor ct = aPGObjectClass.getConstructor(); + tempCitext = ct.newInstance(); Method setTypeMethod = aPGObjectClass.getMethod("setType", new Class[]{String.class}); setTypeMethod.invoke(tempCitext, new Object[]{"citext"}); diff --git a/src/main/java/org/dbunit/ext/postgresql/GenericEnumType.java b/src/main/java/org/dbunit/ext/postgresql/GenericEnumType.java index a7390375e..03914c766 100644 --- a/src/main/java/org/dbunit/ext/postgresql/GenericEnumType.java +++ b/src/main/java/org/dbunit/ext/postgresql/GenericEnumType.java @@ -92,8 +92,8 @@ private Object getEnum(Object value, Connection connection) throws TypeCastExcep try { Class aPGObjectClass = super.loadClass("org.postgresql.util.PGobject", connection); - Constructor ct = aPGObjectClass.getConstructor(null); - tempEnum = ct.newInstance(null); + Constructor ct = aPGObjectClass.getConstructor(); + tempEnum = ct.newInstance(); Method setTypeMethod = aPGObjectClass.getMethod("setType", new Class[]{String.class}); setTypeMethod.invoke(tempEnum, new Object[]{this.sqlTypeName}); diff --git a/src/main/java/org/dbunit/ext/postgresql/InetType.java b/src/main/java/org/dbunit/ext/postgresql/InetType.java index 2c451234a..53dc08d0a 100644 --- a/src/main/java/org/dbunit/ext/postgresql/InetType.java +++ b/src/main/java/org/dbunit/ext/postgresql/InetType.java @@ -73,8 +73,8 @@ private Object getInet(Object value, Connection connection) throws TypeCastExcep try { Class aPGObjectClass = super.loadClass("org.postgresql.util.PGobject", connection); - Constructor ct = aPGObjectClass.getConstructor(null); - tempInet = ct.newInstance(null); + Constructor ct = aPGObjectClass.getConstructor(); + tempInet = ct.newInstance(); Method setTypeMethod = aPGObjectClass.getMethod("setType", new Class[]{String.class}); setTypeMethod.invoke(tempInet, new Object[]{"inet"}); diff --git a/src/main/java/org/dbunit/ext/postgresql/UuidType.java b/src/main/java/org/dbunit/ext/postgresql/UuidType.java index 36e761d46..b5c7edc5e 100644 --- a/src/main/java/org/dbunit/ext/postgresql/UuidType.java +++ b/src/main/java/org/dbunit/ext/postgresql/UuidType.java @@ -75,8 +75,8 @@ private Object getUUID(Object value, Connection connection) throws TypeCastExcep try { Class aPGObjectClass = super.loadClass("org.postgresql.util.PGobject", connection); - Constructor ct = aPGObjectClass.getConstructor(null); - tempUUID = ct.newInstance(null); + Constructor ct = aPGObjectClass.getConstructor(); + tempUUID = ct.newInstance(); Method setTypeMethod = aPGObjectClass.getMethod("setType", new Class[]{String.class}); setTypeMethod.invoke(tempUUID, new Object[]{"uuid"}); diff --git a/src/main/java/org/dbunit/operation/AbstractBatchOperation.java b/src/main/java/org/dbunit/operation/AbstractBatchOperation.java index ca591a3e4..b06a6b847 100644 --- a/src/main/java/org/dbunit/operation/AbstractBatchOperation.java +++ b/src/main/java/org/dbunit/operation/AbstractBatchOperation.java @@ -57,8 +57,21 @@ public abstract class AbstractBatchOperation extends AbstractOperation LoggerFactory.getLogger(AbstractBatchOperation.class); private static final BitSet EMPTY_BITSET = new BitSet(); + + /** + * Whether the tables of the dataset are processed in reverse order, as + * needed by operations (for example deletes) that must respect + * foreign-key dependency order in the opposite direction of inserts. + */ protected boolean _reverseRowOrder = false; + /** + * Default constructor. + */ + protected AbstractBatchOperation() + { + } + static boolean isEmpty(ITable table) throws DataSetException { logger.debug("isEmpty(table={}) - start", table); @@ -86,6 +99,10 @@ static boolean isEmpty(ITable table) throws DataSetException /** * Returns list of tables this operation is applied to. This method allow * subclass to do filtering. + * + * @param dataSet the dataset whose tables are to be iterated. + * @return an iterator over the tables this operation applies to. + * @throws DatabaseUnitException if the iterator cannot be created. */ protected ITableIterator iterator(IDataSet dataSet) throws DatabaseUnitException @@ -248,6 +265,13 @@ public void execute(IDatabaseConnection connection, IDataSet dataSet) } } + /** + * Reports that a column required to have a value was empty, respecting + * the {@code DatabaseConfig.FEATURE_ALLOW_EMPTY_FIELDS} setting. + * + * @param tableName the name of the table containing the column. + * @param columnName the name of the column that had no value. + */ protected void handleColumnHasNoValue(String tableName, String columnName) { final String tableColumnName = tableName + "." + columnName; diff --git a/src/main/java/org/dbunit/operation/AbstractOperation.java b/src/main/java/org/dbunit/operation/AbstractOperation.java index 652d3c29a..63e4c1167 100644 --- a/src/main/java/org/dbunit/operation/AbstractOperation.java +++ b/src/main/java/org/dbunit/operation/AbstractOperation.java @@ -36,6 +36,9 @@ import org.slf4j.LoggerFactory; /** + * Abstract base {@link DatabaseOperation} implementation providing shared + * row-iteration and column-filtering behavior. + * * @author Manuel Laflamme * @since Jan 17, 2004 * @version $Revision$ diff --git a/src/main/java/org/dbunit/operation/DatabaseOperation.java b/src/main/java/org/dbunit/operation/DatabaseOperation.java index e41d569ce..7c887ce79 100644 --- a/src/main/java/org/dbunit/operation/DatabaseOperation.java +++ b/src/main/java/org/dbunit/operation/DatabaseOperation.java @@ -36,21 +36,43 @@ */ public abstract class DatabaseOperation { - /** @see DummyOperation */ + /** + * No-op that does nothing to the database. + * @see DummyOperation + */ public static final DatabaseOperation NONE = new DummyOperation(); - /** @see UpdateOperation */ + /** + * Updates existing rows matching the dataset's primary keys. + * @see UpdateOperation + */ public static final DatabaseOperation UPDATE = new UpdateOperation(); - /** @see InsertOperation */ + /** + * Inserts the dataset's rows. + * @see InsertOperation + */ public static final DatabaseOperation INSERT = new InsertOperation(); - /** @see RefreshOperation */ + /** + * Updates existing rows and inserts rows that do not yet exist (upsert). + * @see RefreshOperation + */ public static final DatabaseOperation REFRESH = new RefreshOperation(); - /** @see DeleteOperation */ + /** + * Deletes rows matching the dataset's primary keys. + * @see DeleteOperation + */ public static final DatabaseOperation DELETE = new DeleteOperation(); - /** @see DeleteAllOperation */ + /** + * Deletes all rows of the dataset's tables. + * @see DeleteAllOperation + */ public static final DatabaseOperation DELETE_ALL = new DeleteAllOperation(); - /** @see TruncateTableOperation */ + /** + * Truncates the dataset's tables. + * @see TruncateTableOperation + */ public static final DatabaseOperation TRUNCATE_TABLE = new TruncateTableOperation(); /** + * Deletes all rows of the dataset's tables, then inserts the dataset's rows. * @see DeleteAllOperation * @see InsertOperation * @see CompositeOperation @@ -58,12 +80,22 @@ public abstract class DatabaseOperation public static final DatabaseOperation CLEAN_INSERT = new CompositeOperation( DELETE_ALL, INSERT); - /** @see TransactionOperation */ + /** + * Wraps the given operation so it runs within its own transaction. + * @param operation the operation to wrap. + * @return the wrapped, transactional operation. + * @see TransactionOperation + */ public static final DatabaseOperation TRANSACTION(DatabaseOperation operation) { return new TransactionOperation(operation); } - /** @see CloseConnectionOperation */ + /** + * Wraps the given operation so it closes the connection after executing. + * @param operation the operation to wrap. + * @return the wrapped operation. + * @see CloseConnectionOperation + */ public static final DatabaseOperation CLOSE_CONNECTION(DatabaseOperation operation) { return new CloseConnectionOperation(operation); } @@ -74,6 +106,8 @@ public static final DatabaseOperation CLOSE_CONNECTION(DatabaseOperation operati * * @param connection the database connection. * @param dataSet the dataset to be used by this operation. + * @throws DatabaseUnitException if a DbUnit-specific error occurs while executing the operation. + * @throws SQLException if a database access error occurs while executing the operation. */ public abstract void execute(IDatabaseConnection connection, IDataSet dataSet) throws DatabaseUnitException, SQLException; diff --git a/src/main/java/org/dbunit/operation/DeleteAllOperation.java b/src/main/java/org/dbunit/operation/DeleteAllOperation.java index a56e1abd7..e7c54386b 100644 --- a/src/main/java/org/dbunit/operation/DeleteAllOperation.java +++ b/src/main/java/org/dbunit/operation/DeleteAllOperation.java @@ -43,7 +43,7 @@ * does not contains a particular table, but that table exists in the database, * the database table is not affected. Table are truncated in * reverse sequence. - * + *+ * catalog="BLA", catalogName=<null> * schema="BLA", schemaName="BLA" *
* This operation has the same effect of as {@link TruncateTableOperation}.
* TruncateTableOperation is faster, and it is non-logged, meaning it cannot be
* rollback. DeleteAllOperation is more portable because not all database vendor
diff --git a/src/main/java/org/dbunit/operation/ExclusiveTransactionException.java b/src/main/java/org/dbunit/operation/ExclusiveTransactionException.java
index fd02380aa..60573ee49 100644
--- a/src/main/java/org/dbunit/operation/ExclusiveTransactionException.java
+++ b/src/main/java/org/dbunit/operation/ExclusiveTransactionException.java
@@ -24,6 +24,9 @@
import org.dbunit.DatabaseUnitException;
/**
+ * Signals that a transaction could not be started because another transaction
+ * is already active.
+ *
* @author Manuel Laflamme
* @version $Revision$
* @since Feb 21, 2002
diff --git a/src/main/java/org/dbunit/operation/OperationData.java b/src/main/java/org/dbunit/operation/OperationData.java
index 1326ca464..6010da5ea 100644
--- a/src/main/java/org/dbunit/operation/OperationData.java
+++ b/src/main/java/org/dbunit/operation/OperationData.java
@@ -26,6 +26,8 @@
import org.dbunit.dataset.Column;
/**
+ * Pairs a SQL statement with the columns whose values are bound as its parameters.
+ *
* @author Manuel Laflamme
* @version $Revision$
* @since Mar 16, 2002
diff --git a/src/main/java/org/dbunit/util/Base64.java b/src/main/java/org/dbunit/util/Base64.java
index 6f4f28da9..9059ec492 100644
--- a/src/main/java/org/dbunit/util/Base64.java
+++ b/src/main/java/org/dbunit/util/Base64.java
@@ -47,11 +47,11 @@ public class Base64
*/
private static final Logger logger = LoggerFactory.getLogger(Base64.class);
- /** Specify encoding (value is true). */
+ /** Specify encoding (value is true). */
public final static boolean ENCODE = true;
- /** Specify decoding (value is false). */
+ /** Specify decoding (value is false). */
public final static boolean DECODE = false;
@@ -282,7 +282,7 @@ private static byte[] encode3to4(
* Serializes an object and returns the Base64-encoded
* version of that serialized object. If the object
* cannot be serialized or there is another error,
- * the method will return null.
+ * the method will return null.
*
* @param serializableObject The object to encode
* @return The Base64-encoded object
@@ -552,7 +552,7 @@ public static String decodeToString(String s)
/**
* Attempts to decode Base64 data and deserialize a Java
- * Object within. Returns null if there was an error.
+ * Object within. Returns null if there was an error.
*
* @param encodedObject The Base64 data to decode
* @return The decoded and deserialized object
diff --git a/src/main/java/org/dbunit/util/QualifiedTableName.java b/src/main/java/org/dbunit/util/QualifiedTableName.java
index efcbf4f77..f447ca5e4 100644
--- a/src/main/java/org/dbunit/util/QualifiedTableName.java
+++ b/src/main/java/org/dbunit/util/QualifiedTableName.java
@@ -187,8 +187,8 @@ private String getQualifiedName(String prefix, String name,
String escapePattern)
{
if(logger.isDebugEnabled())
- logger.debug("getQualifiedName(prefix={}, name={}, escapePattern={}) - start",
- new String[] {prefix, name, escapePattern});
+ logger.debug("getQualifiedName(prefix={}, name={}, escapePattern={}) - start",
+ prefix, name, escapePattern);
if (escapePattern != null)
{
diff --git a/src/main/java/org/dbunit/util/RelativeDateTimeParser.java b/src/main/java/org/dbunit/util/RelativeDateTimeParser.java
index b6f3d6cb3..7af6e7a75 100644
--- a/src/main/java/org/dbunit/util/RelativeDateTimeParser.java
+++ b/src/main/java/org/dbunit/util/RelativeDateTimeParser.java
@@ -40,11 +40,11 @@
* supported units. There can be multiple 'diff's and they can be specified in
* any order.
* 'time' is a string that can be parsed by
- * LocalTime#parse(). If specified, it is used instead of the current time.
+ * LocalTime#parse(). If specified, it is used instead of the current time.
* Both 'diff' and 'time' are optional.
* Whitespaces are allowed before and after each 'diff'.
*
[ Introduction to this package. ]
- * + *
[ Introduction to this package. ] + * * @author Doug Lea * @author Last changed by: $Author$ * @version $Revision$ $Date$ diff --git a/src/main/java/org/dbunit/util/concurrent/BoundedChannel.java b/src/main/java/org/dbunit/util/concurrent/BoundedChannel.java index f9a65dcaa..be497f3b9 100644 --- a/src/main/java/org/dbunit/util/concurrent/BoundedChannel.java +++ b/src/main/java/org/dbunit/util/concurrent/BoundedChannel.java @@ -21,8 +21,8 @@ * intrinsically hard-wired capacities, capacities that are fixed upon * construction, or dynamically adjustable capacities. * @see DefaultChannelCapacity - *
[ Introduction to this package. ]
- * + *
[ Introduction to this package. ] + * * @author Doug Lea * @author Last changed by: $Author$ * @version $Revision$ $Date$ diff --git a/src/main/java/org/dbunit/util/concurrent/BoundedLinkedQueue.java b/src/main/java/org/dbunit/util/concurrent/BoundedLinkedQueue.java index 7bd6b3d82..f8a460def 100644 --- a/src/main/java/org/dbunit/util/concurrent/BoundedLinkedQueue.java +++ b/src/main/java/org/dbunit/util/concurrent/BoundedLinkedQueue.java @@ -41,10 +41,10 @@ * normally does not hurt much performance-wise: When the * queue is not empty or full, most puts and * takes are still usually able to execute concurrently. - * @see LinkedQueue - * @see BoundedBuffer - *
[ Introduction to this package. ]
- * + * @see LinkedQueue + * @see BoundedBuffer + *
[ Introduction to this package. ] + * * @author Doug Lea * @author Last changed by: $Author$ * @version $Revision$ $Date$ diff --git a/src/main/java/org/dbunit/util/concurrent/DefaultChannelCapacity.java b/src/main/java/org/dbunit/util/concurrent/DefaultChannelCapacity.java index e67469ed1..aeb46886c 100644 --- a/src/main/java/org/dbunit/util/concurrent/DefaultChannelCapacity.java +++ b/src/main/java/org/dbunit/util/concurrent/DefaultChannelCapacity.java @@ -21,8 +21,8 @@ * BoundedChannel * implementations that otherwise require a capacity argument * @see BoundedChannel - * [ Introduction to this package. ]
- * + * [ Introduction to this package. ] + * * @author Doug Lea * @author Last changed by: $Author$ * @version $Revision$ $Date$ diff --git a/src/main/java/org/dbunit/util/concurrent/Executor.java b/src/main/java/org/dbunit/util/concurrent/Executor.java index 73337cee5..788036e82 100644 --- a/src/main/java/org/dbunit/util/concurrent/Executor.java +++ b/src/main/java/org/dbunit/util/concurrent/Executor.java @@ -31,8 +31,7 @@ * However, this interface allows implementations that instead * employ queueing or pooling, or perform additional * bookkeeping. - *
- * + * *
[ Introduction to this package. ] * * @author Doug Lea diff --git a/src/main/java/org/dbunit/util/concurrent/SemaphoreControlledChannel.java b/src/main/java/org/dbunit/util/concurrent/SemaphoreControlledChannel.java index ea73901f6..f650ef08b 100644 --- a/src/main/java/org/dbunit/util/concurrent/SemaphoreControlledChannel.java +++ b/src/main/java/org/dbunit/util/concurrent/SemaphoreControlledChannel.java @@ -81,10 +81,8 @@ public SemaphoreControlledChannel(int capacity, Class semaphoreClass) capacity_ = capacity; Class[] longarg = { Long.TYPE }; Constructor ctor = semaphoreClass.getDeclaredConstructor(longarg); - Long[] cap = {Long.valueOf(capacity)}; - putGuard_ = (Semaphore)(ctor.newInstance(cap)); - Long[] zero = {0L}; - takeGuard_ = (Semaphore)(ctor.newInstance(zero)); + putGuard_ = (Semaphore)(ctor.newInstance(Long.valueOf(capacity))); + takeGuard_ = (Semaphore)(ctor.newInstance(Long.valueOf(0L))); } diff --git a/src/main/java/org/dbunit/util/concurrent/SynchronizedVariable.java b/src/main/java/org/dbunit/util/concurrent/SynchronizedVariable.java index 9ff6508bd..2735f15f4 100644 --- a/src/main/java/org/dbunit/util/concurrent/SynchronizedVariable.java +++ b/src/main/java/org/dbunit/util/concurrent/SynchronizedVariable.java @@ -70,14 +70,12 @@ * example, a variable that is always associated with a * particular object can use that object's lock. *
* Update methods
* Each class supports several kinds of update methods:
*
set method that sets to a new value and returns
* previous value. For example, for a SynchronizedBoolean b,
* boolean old = b.set(true) performs a test-and-set.
- * *
commit method that sets to new value only
* if currently holding a given value.
*
@@ -104,10 +102,8 @@
* int compute(int l) { ... some kind of computation ... }
* }
*
- * - *
swap method that atomically swaps with another
+ * swap method that atomically swaps with another
* object of the same class using a deadlock-avoidance strategy.
- * *
- * - * - * *
[ Introduction to this package. ]
* * @author Doug Lea diff --git a/src/main/java/org/dbunit/util/concurrent/SynchronousChannel.java b/src/main/java/org/dbunit/util/concurrent/SynchronousChannel.java index bd44dc5ff..4f303dc41 100644 --- a/src/main/java/org/dbunit/util/concurrent/SynchronousChannel.java +++ b/src/main/java/org/dbunit/util/concurrent/SynchronousChannel.java @@ -29,7 +29,7 @@ * in order to hand it some information, event, or task. *If you only need threads to synch up without * exchanging information, consider using a Barrier. If you need - * bidirectional exchanges, consider using a Rendezvous.
+ * bidirectional exchanges, consider using a Rendezvous. * *
Read the
* introduction to this package
diff --git a/src/main/java/org/dbunit/util/fileloader/CsvDataFileLoader.java b/src/main/java/org/dbunit/util/fileloader/CsvDataFileLoader.java
index 1e38c3813..e2671727c 100644
--- a/src/main/java/org/dbunit/util/fileloader/CsvDataFileLoader.java
+++ b/src/main/java/org/dbunit/util/fileloader/CsvDataFileLoader.java
@@ -30,6 +30,8 @@
import org.dbunit.dataset.csv.CsvURLDataSet;
/**
+ * {@link DataFileLoader} that loads CSV dataset files.
+ *
* @author Jeff Jensen jeffjensen AT users.sourceforge.net
* @author Last changed by: $Author$
* @version $Revision$ $Date$
diff --git a/src/main/java/org/dbunit/util/fileloader/FlatXmlDataFileLoader.java b/src/main/java/org/dbunit/util/fileloader/FlatXmlDataFileLoader.java
index f56927f5f..1f6897131 100644
--- a/src/main/java/org/dbunit/util/fileloader/FlatXmlDataFileLoader.java
+++ b/src/main/java/org/dbunit/util/fileloader/FlatXmlDataFileLoader.java
@@ -29,6 +29,8 @@
import org.dbunit.dataset.xml.FlatXmlDataSetBuilder;
/**
+ * {@link DataFileLoader} that loads flat XML dataset files.
+ *
* @author Jeff Jensen jeffjensen AT users.sourceforge.net
* @author Last changed by: $Author$
* @version $Revision$ $Date$
@@ -109,9 +111,9 @@ public IDataSet loadDataSet(URL url) throws DataSetException,
/**
* Get the builder.
- *
- * @see {@link builder}.
- *
+ *
+ * @see #builder
+ *
* @return The builder.
*/
public FlatXmlDataSetBuilder getBuilder() {
@@ -120,9 +122,9 @@ public FlatXmlDataSetBuilder getBuilder() {
/**
* Set the builder.
- *
- * @see {@link builder}.
- *
+ *
+ * @see #builder
+ *
* @param builder
* The builder to set.
*/
diff --git a/src/main/java/org/dbunit/util/fileloader/FullXmlDataFileLoader.java b/src/main/java/org/dbunit/util/fileloader/FullXmlDataFileLoader.java
index db83fc0d1..68a218b40 100644
--- a/src/main/java/org/dbunit/util/fileloader/FullXmlDataFileLoader.java
+++ b/src/main/java/org/dbunit/util/fileloader/FullXmlDataFileLoader.java
@@ -31,6 +31,8 @@
import org.dbunit.dataset.xml.XmlDataSet;
/**
+ * {@link DataFileLoader} that loads full-format XML dataset files.
+ *
* @author Jeff Jensen jeffjensen AT users.sourceforge.net
* @author Last changed by: $Author$
* @version $Revision$ $Date$
diff --git a/src/main/java/org/dbunit/util/fileloader/XlsDataFileLoader.java b/src/main/java/org/dbunit/util/fileloader/XlsDataFileLoader.java
index e7a871dfa..323a470bb 100644
--- a/src/main/java/org/dbunit/util/fileloader/XlsDataFileLoader.java
+++ b/src/main/java/org/dbunit/util/fileloader/XlsDataFileLoader.java
@@ -31,11 +31,13 @@
import org.dbunit.dataset.excel.XlsDataSet;
/**
+ * {@link DataFileLoader} that loads Excel (.xls) dataset files.
+ *
* @author Jeff Jensen jeffjensen AT users.sourceforge.net
* @author Last changed by: $Author$
* @version $Revision$ $Date$
* @since 2.4.8
- *
+ *
*/
public class XlsDataFileLoader extends AbstractDataFileLoader {
/** Create new instance. */
diff --git a/src/main/java/org/dbunit/util/search/AbstractExcludeNodesSearchCallback.java b/src/main/java/org/dbunit/util/search/AbstractExcludeNodesSearchCallback.java
index aa19cb42f..023efcecb 100644
--- a/src/main/java/org/dbunit/util/search/AbstractExcludeNodesSearchCallback.java
+++ b/src/main/java/org/dbunit/util/search/AbstractExcludeNodesSearchCallback.java
@@ -23,10 +23,12 @@
import java.util.Set;
/**
+ * Search callback that excludes a fixed set of denied nodes from traversal.
+ *
* @author Felipe Leme (dbunit@felipeal.net)
* @version $Revision$
* @since Aug 25, 2005
- *
+ *
*/
public abstract class AbstractExcludeNodesSearchCallback extends
AbstractNodesFilterSearchCallback {
diff --git a/src/main/java/org/dbunit/util/search/AbstractIncludeNodesSearchCallback.java b/src/main/java/org/dbunit/util/search/AbstractIncludeNodesSearchCallback.java
index ddbba3ac8..1fb1f576f 100644
--- a/src/main/java/org/dbunit/util/search/AbstractIncludeNodesSearchCallback.java
+++ b/src/main/java/org/dbunit/util/search/AbstractIncludeNodesSearchCallback.java
@@ -23,10 +23,12 @@
import java.util.Set;
/**
+ * Search callback that restricts traversal to a fixed set of allowed nodes.
+ *
* @author Felipe Leme (dbunit@felipeal.net)
* @version $Revision$
* @since Aug 25, 2005
- *
+ *
*/
public abstract class AbstractIncludeNodesSearchCallback extends
AbstractNodesFilterSearchCallback {
diff --git a/src/main/java/org/dbunit/util/search/ISearchAlgorithm.java b/src/main/java/org/dbunit/util/search/ISearchAlgorithm.java
index 7dabcaa9c..40de9324c 100644
--- a/src/main/java/org/dbunit/util/search/ISearchAlgorithm.java
+++ b/src/main/java/org/dbunit/util/search/ISearchAlgorithm.java
@@ -39,7 +39,7 @@ public interface ISearchAlgorithm {
* @param nodesFrom input nodes
* @param callback helper callback
* @return all nodes, in the right dependent order (like a LinkedHashSet)
- * @throws Exception exception wrapper
+ * @throws SearchException if the search fails.
*/
Set search(Set nodesFrom, ISearchCallback callback) throws SearchException;
diff --git a/src/main/java/org/dbunit/util/search/ISearchCallback.java b/src/main/java/org/dbunit/util/search/ISearchCallback.java
index 79a5e0641..eff31cb96 100644
--- a/src/main/java/org/dbunit/util/search/ISearchCallback.java
+++ b/src/main/java/org/dbunit/util/search/ISearchCallback.java
@@ -39,8 +39,7 @@ public interface ISearchCallback {
*
* @param fromNode node from
* @return all edges originating from this node.
- * @throws Exception
- * exception wrapper
+ * @throws SearchException if the edges originating from the node cannot be determined.
*/
SortedSet getEdges(Object fromNode) throws SearchException;
@@ -49,8 +48,7 @@ public interface ISearchCallback {
*
* @param fromNode
* node that has been added.
- * @throws Exception
- * exception wrapper
+ * @throws SearchException if the callback cannot process the added node.
*/
void nodeAdded(Object fromNode) throws SearchException;
@@ -60,8 +58,7 @@ public interface ISearchCallback {
* @param node
* node to be filtered
* @return true if the node should be searched
- * @throws Exception
- * exception wrapper
+ * @throws SearchException if the callback cannot decide whether the node should be searched.
*/
boolean searchNode(Object node) throws SearchException;
}
diff --git a/src/main/java/org/dbunit/util/xml/XmlWriter.java b/src/main/java/org/dbunit/util/xml/XmlWriter.java
index efff184fd..1bbb31cb5 100644
--- a/src/main/java/org/dbunit/util/xml/XmlWriter.java
+++ b/src/main/java/org/dbunit/util/xml/XmlWriter.java
@@ -614,7 +614,7 @@ private void writeChunk(final String data) throws IOException
// ` elements to export specific tables.
[cols="1,3,1",options="header"]
-!===
-!Attribute !Description !Required
-!name !Name of the database table to export. !Yes
-!===
+|===
+|Attribute |Description |Required
+|name |Name of the database table to export. |Yes
+|===
*query*: Use nested `
` elements to compare specific tables.
[cols="1,3,1",options="header"]
-!===
-!Attribute !Description !Required
-!name !Name of the database table to compare. !Yes
-!===
+|===
+|Attribute |Description |Required
+|name |Name of the database table to compare. |Yes
+|===
*query*: Use nested `