From 4d205456e52723cdab983bcc85b9f21826f233ef Mon Sep 17 00:00:00 2001 From: Jeff Jensen Date: Mon, 3 Aug 2026 11:18:00 -0500 Subject: [PATCH 1/2] fix: Remove doclint suppression, fix all build warnings and errors Run a full "mvnw clean install site" and fix everything it surfaced: * Remove the FIXME'd -Xdoclint:none suppression from maven-javadoc-plugin now that issue 886's Javadoc cleanup is done, and fix every doclint warning/error it had been hiding across the main source tree, including missing @param/@return/@throws tags on the core public API (IDatabaseConnection, IDatabaseTester, IDataSet, ITableMetaData, DataType, DatabaseOperation) and invalid HTML throughout Doug Lea's vendored util.concurrent classes. * Fix compiler warnings: a dead compilerVersion parameter, 21 non-varargs calls to varargs methods with an inexact array argument type (several silently mis-formatting SLF4J debug messages), and Surefire/Failsafe's deprecated systemProperties style. * Fix all 54 Checkstyle violations the pinned checkstyle 13.3.0 engine reported once its dependency resolved correctly: missing @author/@version tags on pre-convention classes and two wildcard imports. Refs: 902 Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01AvRxjuGT9d2redtnvdnYXV --- pom.xml | 123 ++++-------------- src/changes/changes.xml | 5 +- .../org/dbunit/AbstractDatabaseTester.java | 7 + .../org/dbunit/DatabaseUnitException.java | 2 + .../dbunit/DatabaseUnitRuntimeException.java | 2 + .../DefaultPrepAndExpectedTestCase.java | 20 +-- src/main/java/org/dbunit/IDatabaseTester.java | 24 ++++ .../PropertiesBasedJdbcDatabaseTester.java | 4 +- .../java/org/dbunit/ant/AbstractStep.java | 2 + src/main/java/org/dbunit/ant/DbConfig.java | 3 + src/main/java/org/dbunit/ant/QuerySet.java | 1 - .../org/dbunit/assertion/DbUnitAssert.java | 8 +- .../DiffCollectingFailureHandler.java | 6 +- .../org/dbunit/assertion/SimpleAssert.java | 3 + .../database/AbstractDatabaseConnection.java | 8 +- .../database/AbstractResultSetTable.java | 3 + .../dbunit/database/CachedResultSetTable.java | 2 + .../database/CachedResultSetTableFactory.java | 2 + .../CyclicTablesDependencyException.java | 3 + .../org/dbunit/database/DatabaseConfig.java | 2 + .../database/DatabaseTableIterator.java | 2 + .../database/ForwardOnlyResultSetTable.java | 2 + .../ForwardOnlyResultSetTableFactory.java | 2 + .../dbunit/database/IDatabaseConnection.java | 40 ++++-- .../org/dbunit/database/IResultSetTable.java | 2 + .../database/IResultSetTableFactory.java | 1 + .../database/ResultSetTableMetaData.java | 5 +- .../database/ScrollableResultSetTable.java | 2 + .../statement/AbstractBatchStatement.java | 6 + .../AbstractPreparedBatchStatement.java | 2 + .../statement/AbstractStatementFactory.java | 2 + .../AutomaticPreparedBatchStatement.java | 3 + .../database/statement/BatchStatement.java | 3 + .../statement/BatchStatementDecorator.java | 6 +- .../database/statement/CompoundStatement.java | 5 +- .../database/statement/IBatchStatement.java | 26 +++- .../statement/IPreparedBatchStatement.java | 3 + .../database/statement/IStatementFactory.java | 2 + .../statement/PreparedBatchStatement.java | 3 + .../statement/PreparedStatementFactory.java | 2 + .../statement/SimplePreparedStatement.java | 3 + .../database/statement/SimpleStatement.java | 2 + .../database/statement/StatementFactory.java | 2 + .../org/dbunit/dataset/AbstractDataSet.java | 7 +- .../org/dbunit/dataset/AbstractTable.java | 3 + .../dbunit/dataset/AbstractTableMetaData.java | 2 + .../java/org/dbunit/dataset/CachedTable.java | 3 + src/main/java/org/dbunit/dataset/Column.java | 1 - src/main/java/org/dbunit/dataset/Columns.java | 2 +- .../org/dbunit/dataset/CompositeTable.java | 3 + .../java/org/dbunit/dataset/DataSetUtils.java | 2 +- .../org/dbunit/dataset/DefaultDataSet.java | 1 - .../dbunit/dataset/DefaultTableIterator.java | 2 + .../dbunit/dataset/DefaultTableMetaData.java | 3 + .../dbunit/dataset/FilteredTableMetaData.java | 2 + .../org/dbunit/dataset/ForwardOnlyTable.java | 3 + .../java/org/dbunit/dataset/IDataSet.java | 15 +++ .../org/dbunit/dataset/ITableIterator.java | 2 + .../org/dbunit/dataset/ITableMetaData.java | 4 +- .../dataset/LowerCaseTableMetaData.java | 2 +- .../dbunit/dataset/NoPrimaryKeyException.java | 2 + .../dbunit/dataset/NoSuchTableException.java | 2 + .../dataset/RowOutOfBoundsException.java | 2 + .../handlers/AbstractPipelineComponent.java | 3 + .../dataset/common/handlers/AllHandler.java | 3 + .../common/handlers/EnforceHandler.java | 7 +- .../common/handlers/EscapeHandler.java | 2 + .../dataset/common/handlers/Handler.java | 3 + .../dataset/common/handlers/Helper.java | 2 + .../IllegalInputCharacterException.java | 3 + .../common/handlers/IsAlnumHandler.java | 2 + .../common/handlers/LineEndHandler.java | 2 + .../dataset/common/handlers/NoHandler.java | 3 + .../dataset/common/handlers/Pipeline.java | 3 + .../common/handlers/PipelineComponent.java | 3 + .../common/handlers/PipelineConfig.java | 3 + .../common/handlers/PipelineException.java | 2 + .../dataset/common/handlers/QuoteHandler.java | 2 + .../common/handlers/SeparatorHandler.java | 2 + .../common/handlers/TransparentHandler.java | 3 + .../handlers/UnquotedFieldAssembler.java | 3 + .../common/handlers/WhitespacesHandler.java | 2 + .../dbunit/dataset/csv/CsvDataSetWriter.java | 2 + .../org/dbunit/dataset/csv/CsvParser.java | 2 + .../dataset/csv/CsvParserException.java | 2 + .../org/dbunit/dataset/csv/CsvParserImpl.java | 3 + .../org/dbunit/dataset/csv/CsvProducer.java | 2 + .../dataset/csv/IllegalCharacterSeen.java | 2 + .../dataset/datatype/AbstractDataType.java | 2 +- .../datatype/BinaryStreamDataType.java | 2 + .../dbunit/dataset/datatype/BitDataType.java | 2 + .../dbunit/dataset/datatype/BlobDataType.java | 2 + .../dataset/datatype/BooleanDataType.java | 2 + .../dataset/datatype/BytesDataType.java | 2 + .../dbunit/dataset/datatype/ClobDataType.java | 3 + .../org/dbunit/dataset/datatype/DataType.java | 43 ++++++ .../dataset/datatype/DataTypeException.java | 2 + .../dbunit/dataset/datatype/DateDataType.java | 2 + .../dataset/datatype/DoubleDataType.java | 2 + .../dataset/datatype/FloatDataType.java | 2 + .../dataset/datatype/IntegerDataType.java | 2 + .../dbunit/dataset/datatype/LongDataType.java | 2 + .../dataset/datatype/NumberDataType.java | 2 + .../dataset/datatype/StringDataType.java | 2 + .../dataset/datatype/TimestampDataType.java | 2 + .../dataset/datatype/TypeCastException.java | 2 + .../dataset/datatype/UnknownDataType.java | 3 + .../dataset/filter/DefaultColumnFilter.java | 4 +- .../dataset/filter/SequenceTableIterator.java | 3 + .../sqlloader/SqlLoaderControlDataSet.java | 6 +- .../SqlLoaderControlParserException.java | 2 + .../dbunit/dataset/xml/FlatDtdDataSet.java | 3 + .../org/dbunit/dataset/xml/FlatDtdWriter.java | 10 ++ .../dbunit/dataset/xml/FlatXmlDataSet.java | 4 +- .../dbunit/dataset/xml/FlatXmlProducer.java | 3 + .../org/dbunit/dataset/xml/FlatXmlWriter.java | 2 + .../dbunit/dataset/xml/XmlDataSetWriter.java | 2 + .../org/dbunit/dataset/yaml/YamlProducer.java | 3 + .../dbunit/ext/db2/Db2MetadataHandler.java | 2 +- .../java/org/dbunit/ext/h2/H2Connection.java | 2 + .../dbunit/ext/hsqldb/HsqldbConnection.java | 3 + .../dbunit/ext/mssql/DateTimeOffsetType.java | 2 + .../org/dbunit/ext/mssql/MsSqlConnection.java | 5 +- .../org/dbunit/ext/mysql/MySqlConnection.java | 2 + .../dbunit/ext/oracle/OracleBlobDataType.java | 3 + .../dbunit/ext/oracle/OracleClobDataType.java | 3 + .../dbunit/ext/oracle/OracleConnection.java | 2 + .../ext/oracle/OracleSdoGeometryDataType.java | 1 - .../ext/oracle/OracleXMLTypeDataType.java | 1 + .../org/dbunit/ext/postgresql/CitextType.java | 4 +- .../ext/postgresql/GenericEnumType.java | 4 +- .../org/dbunit/ext/postgresql/InetType.java | 4 +- .../org/dbunit/ext/postgresql/UuidType.java | 4 +- .../operation/AbstractBatchOperation.java | 24 ++++ .../dbunit/operation/AbstractOperation.java | 3 + .../dbunit/operation/DatabaseOperation.java | 52 ++++++-- .../dbunit/operation/DeleteAllOperation.java | 2 +- .../ExclusiveTransactionException.java | 3 + .../org/dbunit/operation/OperationData.java | 2 + src/main/java/org/dbunit/util/Base64.java | 8 +- .../org/dbunit/util/QualifiedTableName.java | 4 +- .../dbunit/util/RelativeDateTimeParser.java | 4 +- .../dbunit/util/concurrent/BoundedBuffer.java | 4 +- .../util/concurrent/BoundedChannel.java | 4 +- .../util/concurrent/BoundedLinkedQueue.java | 8 +- .../concurrent/DefaultChannelCapacity.java | 4 +- .../org/dbunit/util/concurrent/Executor.java | 3 +- .../SemaphoreControlledChannel.java | 6 +- .../util/concurrent/SynchronizedVariable.java | 10 +- .../util/concurrent/SynchronousChannel.java | 2 +- .../util/fileloader/CsvDataFileLoader.java | 2 + .../fileloader/FlatXmlDataFileLoader.java | 14 +- .../fileloader/FullXmlDataFileLoader.java | 2 + .../util/fileloader/XlsDataFileLoader.java | 4 +- .../AbstractExcludeNodesSearchCallback.java | 4 +- .../AbstractIncludeNodesSearchCallback.java | 4 +- .../dbunit/util/search/ISearchAlgorithm.java | 2 +- .../dbunit/util/search/ISearchCallback.java | 9 +- .../java/org/dbunit/util/xml/XmlWriter.java | 2 +- 159 files changed, 611 insertions(+), 225 deletions(-) diff --git a/pom.xml b/pom.xml index de92a6272..1bc35aed0 100644 --- a/pom.xml +++ b/pom.xml @@ -680,9 +680,13 @@ ${compileSource} ${compileSource} 8 - ${compileSource} true true + + + -Xlint:-options + @@ -756,48 +760,18 @@ ${failsafePluginVersion} true - - - derby.stream.error.file - ${project.build.directory}/derby.log - - - dbunit.profile - ${dbunit.profile} - - - dbunit.profile.driverClass - ${dbunit.profile.driverClass} - - - dbunit.profile.url - ${dbunit.profile.url} - - - dbunit.profile.schema - ${dbunit.profile.schema} - - - dbunit.profile.user - ${dbunit.profile.user} - - - dbunit.profile.password - ${dbunit.profile.password} - - - dbunit.profile.unsupportedFeatures - ${dbunit.profile.unsupportedFeatures} - - - dbunit.profile.ddl - ${dbunit.profile.ddl} - - - dbunit.profile.multiLineSupport - ${dbunit.profile.multiLineSupport} - - + + ${project.build.directory}/derby.log + ${dbunit.profile} + ${dbunit.profile.driverClass} + ${dbunit.profile.url} + ${dbunit.profile.schema} + ${dbunit.profile.user} + ${dbunit.profile.password} + ${dbunit.profile.unsupportedFeatures} + ${dbunit.profile.ddl} + ${dbunit.profile.multiLineSupport} + @@ -861,14 +835,6 @@ org.apache.maven.plugins maven-javadoc-plugin ${javadocPluginVersion} - - - -Xdoclint:none - none - attach-javadocs @@ -1044,44 +1010,17 @@ **/*Test.java - - - dbunit.profile - ${dbunit.profile} - - - dbunit.profile.driverClass - ${dbunit.profile.driverClass} - - - dbunit.profile.url - ${dbunit.profile.url} - - - dbunit.profile.schema - ${dbunit.profile.schema} - - - dbunit.profile.user - ${dbunit.profile.user} - - - dbunit.profile.password - ${dbunit.profile.password} - - - dbunit.profile.unsupportedFeatures - ${dbunit.profile.unsupportedFeatures} - - - dbunit.profile.ddl - ${dbunit.profile.ddl} - - - dbunit.profile.multiLineSupport - ${dbunit.profile.multiLineSupport} - - + + ${dbunit.profile} + ${dbunit.profile.driverClass} + ${dbunit.profile.url} + ${dbunit.profile.schema} + ${dbunit.profile.user} + ${dbunit.profile.password} + ${dbunit.profile.unsupportedFeatures} + ${dbunit.profile.ddl} + ${dbunit.profile.multiLineSupport} + @@ -1709,12 +1648,6 @@ To do: - - -Xdoclint:none - none diff --git a/src/changes/changes.xml b/src/changes/changes.xml index fe6be7857..e6ceda82d 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -13,7 +13,7 @@ - + Add repo-root README.adoc, rendered natively by GitHub via Asciidoctor, so the repository landing page shows a pitch, build/reproducible-build badges, a pointer to the "dbUnit in 5 Minutes" tutorial, and links to the documentation site, Maven coordinates, GitHub Discussions, and CONTRIBUTING.md instead of nothing. @@ -207,6 +207,9 @@ Fix all Javadoc warnings and errors reported by "mvnw site" (maven-javadoc-plugin's javadoc and test-javadoc reports), across 17 main and 5 test source files: @param tags left mismatched by earlier signature or rename changes (DataFileLoader#load, the fileloader constructors, DefaultPrepAndExpectedTestCase#makeAdditionalColumnInfo, FlatXmlWriter/XmlDataSetWriter's Charset constructors), stale @see/@link references to renamed test methods and to classes not visible from the main sourcepath (test-only DefaultPrepAndExpectedTestCase siblings, an ant-testutils class, a decades-old dead reference in DbUnitTaskIT), an unresolvable cross-package @throws type in IDataSet, unescaped angle brackets and ampersands in Semaphore/Sync/FlatXmlDataSet code samples, mistyped @Author/@Since tags in UniqueIdentifierType, an invalid standalone @inheritDoc, and two placeholder "@since <dbunit-version>" tags backfilled from git history (2.4.8, 2.4.7). + + Run a full "mvnw clean install site" and fix everything it flagged. Removed the long-standing "FIXME remove -Xdoclint:none after JavaDoc cleanup" suppression from maven-javadoc-plugin's build and reporting configuration now that issue 886's cleanup is done, then fixed every doclint warning and error the removal surfaced across the main source tree: missing one-sentence class/interface/field summaries, including on the framework's core public API (IDatabaseConnection, IDatabaseTester, IDataSet, ITableMetaData, DataType, DatabaseOperation) whose methods were also missing @param/@return/@throws tags entirely; invalid HTML (unclosed and self-closing <p> tags, <code><pre> nesting, <xmp>/<tt> tags unsupported in HTML5, an unescaped "<null>" literal, a table missing <caption>) throughout Doug Lea's vendored util.concurrent classes and elsewhere; an unresolvable {@link ITable} reference from a missing import; a typo'd </cde> closing tag and out-of-sequence heading in RelativeDateTimeParser; @see tags illegally wrapping {@link}; and stale @throws Exception tags left over from ISearchCallback/ISearchAlgorithm's narrowing to SearchException. Also fixed the compiler warnings the same build surfaced: a dead compilerVersion parameter, 21 non-varargs calls to varargs methods with an inexact array argument type (several of which were silently mis-formatting SLF4J debug messages by spreading an array's elements across a single "{}" placeholder instead of logging the array itself), and Surefire/Failsafe's deprecated systemProperties style. Finally, fixed all 54 Checkstyle violations the pinned checkstyle 13.3.0 engine reported once its (previously flaky-cached) dependency resolved correctly: missing @author/@version Javadoc tags on 3.x-era classes that predate the project's tag convention, and two wildcard imports expanded to explicit ones. + diff --git a/src/main/java/org/dbunit/AbstractDatabaseTester.java b/src/main/java/org/dbunit/AbstractDatabaseTester.java index 307947319..74ee9a6b8 100644 --- a/src/main/java/org/dbunit/AbstractDatabaseTester.java +++ b/src/main/java/org/dbunit/AbstractDatabaseTester.java @@ -73,12 +73,17 @@ public String toString() private DatabaseOperation tearDownOperation = DatabaseOperation.NONE; private IOperationListener operationListener; + /** + * Creates a tester with no schema. + */ public AbstractDatabaseTester() { this(null); } /** + * Creates a tester for the given schema. + * * @param schema * The schema to be tested. Can be 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: - * + * <pre> * 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" ); - * + * * * @author Andres Almiray(aalmiray@users.sourceforge.net) * @author Felipe Leme (dbunit@felipeal.net) diff --git a/src/main/java/org/dbunit/ant/AbstractStep.java b/src/main/java/org/dbunit/ant/AbstractStep.java index dabb4f610..d8d19700b 100644 --- a/src/main/java/org/dbunit/ant/AbstractStep.java +++ b/src/main/java/org/dbunit/ant/AbstractStep.java @@ -52,6 +52,8 @@ import org.xml.sax.InputSource; /** + * Abstract base implementation of a {@link DbUnitTaskStep} executed by the DbUnit Ant task. + * * @author Manuel Laflamme * @author Last changed by: $Author$ * @version $Revision$ $Date$ diff --git a/src/main/java/org/dbunit/ant/DbConfig.java b/src/main/java/org/dbunit/ant/DbConfig.java index 6b3bd593e..5d4f3ddd7 100644 --- a/src/main/java/org/dbunit/ant/DbConfig.java +++ b/src/main/java/org/dbunit/ant/DbConfig.java @@ -109,6 +109,9 @@ public void copyTo(DatabaseConfig config) throws DatabaseUnitException } /** + * A named boolean feature flag, as configured in the Ant <dbconfig> + * task's <feature> element. + * * @author gommma (gommma AT users.sourceforge.net) * @author Last changed by: $Author$ * @version $Revision$ $Date$ diff --git a/src/main/java/org/dbunit/ant/QuerySet.java b/src/main/java/org/dbunit/ant/QuerySet.java index 9f665fdcd..bdfabb62a 100644 --- a/src/main/java/org/dbunit/ant/QuerySet.java +++ b/src/main/java/org/dbunit/ant/QuerySet.java @@ -54,7 +54,6 @@ * and NAME_INFO and my test tries to delete only the INDIVIDUALS, the * NAME_INFO.IND_ID constraint would be violated) *

- *

* Each queryset is internally converted to a 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:

+     * Example: 

      * ITable actualTable = ...;
      * ITable expectedTable = ...;
      * ITableMetaData metaData = actualTable.getTableMetaData();
      * Column[] additionalInfoCols = Columns.getColumns(new String[] {"MY_PK_COLUMN"}, metaData.getColumns());
      * assertEquals(expectedTable, actualTable, additionalInfoCols);
-     * 
+ *
* * @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:
+     * Example: 

      * ITable actualTable = ...;
      * ITable expectedTable = ...;
      * ITableMetaData metaData = actualTable.getTableMetaData();
      * FailureHandler failureHandler = new DefaultFailureHandler();
      * assertEquals(expectedTable, actualTable, failureHandler);
-     * 
+ *
* * @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. *

* You can use it as follows: - *

+ * 

  * 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);
  * ...
- * 
- * + *
+ * * @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 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) * - * - *

- * + * + * * @author gommma (gommma AT users.sourceforge.net) * @author Last changed by: $Author$ * @version $Revision$ $Date$ diff --git a/src/main/java/org/dbunit/database/ScrollableResultSetTable.java b/src/main/java/org/dbunit/database/ScrollableResultSetTable.java index d1c38ed90..ab6f6bb1e 100644 --- a/src/main/java/org/dbunit/database/ScrollableResultSetTable.java +++ b/src/main/java/org/dbunit/database/ScrollableResultSetTable.java @@ -32,6 +32,8 @@ import java.sql.SQLException; /** + * {@link IResultSetTable} implementation backed by a scrollable {@link ResultSet} cursor. + * * @author Manuel Laflamme * @version $Revision$ * @since Feb 17, 2002 diff --git a/src/main/java/org/dbunit/database/statement/AbstractBatchStatement.java b/src/main/java/org/dbunit/database/statement/AbstractBatchStatement.java index d7db6e7ab..6e2800300 100644 --- a/src/main/java/org/dbunit/database/statement/AbstractBatchStatement.java +++ b/src/main/java/org/dbunit/database/statement/AbstractBatchStatement.java @@ -29,6 +29,8 @@ import java.sql.Statement; /** + * Abstract base {@link IBatchStatement} implementation. + * * @author Manuel Laflamme * @version $Revision$ * @since Mar 15, 2002 @@ -41,6 +43,10 @@ public abstract class AbstractBatchStatement implements IBatchStatement */ private static final Logger logger = LoggerFactory.getLogger(AbstractBatchStatement.class); + /** + * The wrapped JDBC statement that batched SQL is accumulated on and + * executed through. + */ protected final Statement _statement; AbstractBatchStatement(Connection connection) throws SQLException diff --git a/src/main/java/org/dbunit/database/statement/AbstractPreparedBatchStatement.java b/src/main/java/org/dbunit/database/statement/AbstractPreparedBatchStatement.java index f3789f0a9..33d5a4343 100644 --- a/src/main/java/org/dbunit/database/statement/AbstractPreparedBatchStatement.java +++ b/src/main/java/org/dbunit/database/statement/AbstractPreparedBatchStatement.java @@ -29,6 +29,8 @@ import java.sql.SQLException; /** + * Abstract base {@link IPreparedBatchStatement} implementation. + * * @author Manuel Laflamme * @version $Revision$ * @since Mar 16, 2002 diff --git a/src/main/java/org/dbunit/database/statement/AbstractStatementFactory.java b/src/main/java/org/dbunit/database/statement/AbstractStatementFactory.java index a30c84cf5..916d03370 100644 --- a/src/main/java/org/dbunit/database/statement/AbstractStatementFactory.java +++ b/src/main/java/org/dbunit/database/statement/AbstractStatementFactory.java @@ -30,6 +30,8 @@ import java.sql.SQLException; /** + * Abstract base {@link IStatementFactory} implementation. + * * @author Manuel Laflamme * @version $Revision$ * @since Apr 10, 2002 diff --git a/src/main/java/org/dbunit/database/statement/AutomaticPreparedBatchStatement.java b/src/main/java/org/dbunit/database/statement/AutomaticPreparedBatchStatement.java index be5b92a98..c7fdeb49d 100644 --- a/src/main/java/org/dbunit/database/statement/AutomaticPreparedBatchStatement.java +++ b/src/main/java/org/dbunit/database/statement/AutomaticPreparedBatchStatement.java @@ -29,6 +29,9 @@ import java.sql.SQLException; /** + * Decorator around an {@link IPreparedBatchStatement} that automatically executes + * the accumulated batch once a configured row-count threshold is reached. + * * @author Manuel Laflamme * @since Jun 12, 2003 * @version $Revision$ diff --git a/src/main/java/org/dbunit/database/statement/BatchStatement.java b/src/main/java/org/dbunit/database/statement/BatchStatement.java index e31667c5d..70c83920c 100644 --- a/src/main/java/org/dbunit/database/statement/BatchStatement.java +++ b/src/main/java/org/dbunit/database/statement/BatchStatement.java @@ -28,6 +28,9 @@ import java.sql.SQLException; /** + * {@link IBatchStatement} that accumulates plain SQL statements using the JDBC + * {@code addBatch()}/{@code executeBatch()} mechanism. + * * @author Manuel Laflamme * @version $Revision$ * @since Feb 20, 2002 diff --git a/src/main/java/org/dbunit/database/statement/BatchStatementDecorator.java b/src/main/java/org/dbunit/database/statement/BatchStatementDecorator.java index 82d42a908..e2e00204c 100644 --- a/src/main/java/org/dbunit/database/statement/BatchStatementDecorator.java +++ b/src/main/java/org/dbunit/database/statement/BatchStatementDecorator.java @@ -34,9 +34,13 @@ import java.util.StringTokenizer; /** + * Decorator that adapts a plain {@link IBatchStatement} to the {@link IPreparedBatchStatement} + * interface by substituting bound values directly into the SQL text instead of using JDBC + * bind parameters. + * * @author Manuel Laflamme * @version $Revision$ - * @since Mar 16, 2002 + * @since Mar 16, 2002 */ public class BatchStatementDecorator implements IPreparedBatchStatement { diff --git a/src/main/java/org/dbunit/database/statement/CompoundStatement.java b/src/main/java/org/dbunit/database/statement/CompoundStatement.java index cbefd05b0..97df653c7 100644 --- a/src/main/java/org/dbunit/database/statement/CompoundStatement.java +++ b/src/main/java/org/dbunit/database/statement/CompoundStatement.java @@ -28,9 +28,12 @@ import java.sql.SQLException; /** + * {@link IBatchStatement} that accumulates multiple plain SQL statements and + * executes them together. + * * @author Manuel Laflamme * @version $Revision$ - * @since Feb 20, 2002 + * @since Feb 20, 2002 */ public class CompoundStatement extends AbstractBatchStatement { diff --git a/src/main/java/org/dbunit/database/statement/IBatchStatement.java b/src/main/java/org/dbunit/database/statement/IBatchStatement.java index 882fd03af..ff06007c7 100644 --- a/src/main/java/org/dbunit/database/statement/IBatchStatement.java +++ b/src/main/java/org/dbunit/database/statement/IBatchStatement.java @@ -24,18 +24,42 @@ import java.sql.SQLException; /** + * A JDBC statement wrapper that batches SQL statements for execution. + * * @author Manuel Laflamme * @version $Revision$ - * @since Mar 15, 2002 + * @since Mar 15, 2002 */ public interface IBatchStatement { + /** + * Adds a SQL statement to the current batch. + * + * @param sql the SQL statement to add. + * @throws SQLException if a database access error occurs. + */ void addBatch(String sql) throws SQLException; + /** + * Executes the accumulated batch of SQL statements. + * + * @return the number of rows affected, summed across the batch. + * @throws SQLException if a database access error occurs. + */ int executeBatch() throws SQLException; + /** + * Discards the accumulated batch of SQL statements without executing them. + * + * @throws SQLException if a database access error occurs. + */ void clearBatch() throws SQLException; + /** + * Closes the underlying JDBC statement. + * + * @throws SQLException if a database access error occurs. + */ void close() throws SQLException; } diff --git a/src/main/java/org/dbunit/database/statement/IPreparedBatchStatement.java b/src/main/java/org/dbunit/database/statement/IPreparedBatchStatement.java index 558366c5f..f2ef34281 100644 --- a/src/main/java/org/dbunit/database/statement/IPreparedBatchStatement.java +++ b/src/main/java/org/dbunit/database/statement/IPreparedBatchStatement.java @@ -27,6 +27,9 @@ import java.sql.SQLException; /** + * A batched, parameterized JDBC statement to which typed column values are bound + * before execution. + * * @author Manuel Laflamme * @version $Revision$ * @since Mar 15, 2002 diff --git a/src/main/java/org/dbunit/database/statement/IStatementFactory.java b/src/main/java/org/dbunit/database/statement/IStatementFactory.java index 2f52e03e2..a5a25672b 100644 --- a/src/main/java/org/dbunit/database/statement/IStatementFactory.java +++ b/src/main/java/org/dbunit/database/statement/IStatementFactory.java @@ -26,6 +26,8 @@ import java.sql.SQLException; /** + * Factory that creates the JDBC statement wrapper used to execute a database operation. + * * @author Manuel Laflamme * @version $Revision$ * @since Mar 16, 2002 diff --git a/src/main/java/org/dbunit/database/statement/PreparedBatchStatement.java b/src/main/java/org/dbunit/database/statement/PreparedBatchStatement.java index e6eac5d25..5b98033b0 100644 --- a/src/main/java/org/dbunit/database/statement/PreparedBatchStatement.java +++ b/src/main/java/org/dbunit/database/statement/PreparedBatchStatement.java @@ -32,6 +32,9 @@ import java.sql.SQLException; /** + * {@link IPreparedBatchStatement} that accumulates bound rows using the JDBC + * {@code addBatch()}/{@code executeBatch()} mechanism. + * * @author Manuel Laflamme * @version $Revision$ * @since Mar 16, 2002 diff --git a/src/main/java/org/dbunit/database/statement/PreparedStatementFactory.java b/src/main/java/org/dbunit/database/statement/PreparedStatementFactory.java index 71944b99b..51a43f4fd 100644 --- a/src/main/java/org/dbunit/database/statement/PreparedStatementFactory.java +++ b/src/main/java/org/dbunit/database/statement/PreparedStatementFactory.java @@ -30,6 +30,8 @@ import java.sql.SQLException; /** + * {@link IStatementFactory} that creates {@link SimplePreparedStatement} instances. + * * @author Manuel Laflamme * @version $Revision$ * @since Mar 20, 2002 diff --git a/src/main/java/org/dbunit/database/statement/SimplePreparedStatement.java b/src/main/java/org/dbunit/database/statement/SimplePreparedStatement.java index 5ceea1590..4cd0b5d1e 100644 --- a/src/main/java/org/dbunit/database/statement/SimplePreparedStatement.java +++ b/src/main/java/org/dbunit/database/statement/SimplePreparedStatement.java @@ -32,6 +32,9 @@ import java.sql.SQLException; /** + * {@link IPreparedBatchStatement} that binds values to a single, reusable + * {@link java.sql.PreparedStatement}. + * * @author Manuel Laflamme * @version $Revision$ * @since Mar 16, 2002 diff --git a/src/main/java/org/dbunit/database/statement/SimpleStatement.java b/src/main/java/org/dbunit/database/statement/SimpleStatement.java index c2c91c3a7..68e9328b1 100644 --- a/src/main/java/org/dbunit/database/statement/SimpleStatement.java +++ b/src/main/java/org/dbunit/database/statement/SimpleStatement.java @@ -30,6 +30,8 @@ import java.util.List; /** + * {@link IBatchStatement} that executes plain (non-prepared) SQL statements. + * * @author Manuel Laflamme * @version $Revision$ * @since Feb 20, 2002 diff --git a/src/main/java/org/dbunit/database/statement/StatementFactory.java b/src/main/java/org/dbunit/database/statement/StatementFactory.java index e29ae8735..24821219e 100644 --- a/src/main/java/org/dbunit/database/statement/StatementFactory.java +++ b/src/main/java/org/dbunit/database/statement/StatementFactory.java @@ -29,6 +29,8 @@ import java.sql.SQLException; /** + * {@link IStatementFactory} that creates non-prepared {@link SimpleStatement} instances. + * * @author Manuel Laflamme * @version $Revision$ * @since Mar 15, 2002 diff --git a/src/main/java/org/dbunit/dataset/AbstractDataSet.java b/src/main/java/org/dbunit/dataset/AbstractDataSet.java index c09843392..9ef3c4b05 100644 --- a/src/main/java/org/dbunit/dataset/AbstractDataSet.java +++ b/src/main/java/org/dbunit/dataset/AbstractDataSet.java @@ -38,6 +38,9 @@ public abstract class AbstractDataSet implements IDataSet { //TODO (matthias) Use a DataSetBuilder PLUS IDataSet to avoid this ugly lazy initialization with loads of protected internals a user must know... + /** + * Lazily-initialized map of this dataset's tables, keyed by table name. + */ protected OrderedTableNameMap _orderedTableNameMap; /** @@ -91,7 +94,7 @@ protected OrderedTableNameMap createTableNameMap() /** * Initializes the tables of this dataset - * @throws DataSetException + * @throws DataSetException if the tables cannot be gathered, for example due to a duplicate table name. * @since 2.4 */ protected void initialize() throws DataSetException @@ -132,7 +135,7 @@ protected void initialize() throws DataSetException * Creates an iterator which provides access to all tables of this dataset * @param reversed Whether the created iterator should be a reversed one or not * @return The created {@link ITableIterator} - * @throws DataSetException + * @throws DataSetException if the iterator cannot be created. */ protected abstract ITableIterator createIterator(boolean reversed) throws DataSetException; diff --git a/src/main/java/org/dbunit/dataset/AbstractTable.java b/src/main/java/org/dbunit/dataset/AbstractTable.java index add5ed69a..120c405ca 100644 --- a/src/main/java/org/dbunit/dataset/AbstractTable.java +++ b/src/main/java/org/dbunit/dataset/AbstractTable.java @@ -24,6 +24,9 @@ import org.slf4j.LoggerFactory; /** + * Abstract base implementation of {@link ITable}, providing common column-lookup + * and value-formatting behavior for concrete table implementations. + * * @author Manuel Laflamme * @version $Revision$ * @since Feb 17, 2002 diff --git a/src/main/java/org/dbunit/dataset/AbstractTableMetaData.java b/src/main/java/org/dbunit/dataset/AbstractTableMetaData.java index 5f58a83ac..a74c9a674 100644 --- a/src/main/java/org/dbunit/dataset/AbstractTableMetaData.java +++ b/src/main/java/org/dbunit/dataset/AbstractTableMetaData.java @@ -39,6 +39,8 @@ import org.slf4j.LoggerFactory; /** + * Abstract base implementation of {@link ITableMetaData}. + * * @author Manuel Laflamme * @author Last changed by: $Author$ * @version $Revision$ $Date$ diff --git a/src/main/java/org/dbunit/dataset/CachedTable.java b/src/main/java/org/dbunit/dataset/CachedTable.java index 7e37d8c51..c2c8bbd6c 100644 --- a/src/main/java/org/dbunit/dataset/CachedTable.java +++ b/src/main/java/org/dbunit/dataset/CachedTable.java @@ -24,6 +24,9 @@ /** + * {@link ITable} implementation that fully loads and caches another table's rows + * and metadata in memory. + * * @author Manuel Laflamme * @since Apr 10, 2003 * @version $Revision$ diff --git a/src/main/java/org/dbunit/dataset/Column.java b/src/main/java/org/dbunit/dataset/Column.java index caeebdb1d..4c03f2962 100644 --- a/src/main/java/org/dbunit/dataset/Column.java +++ b/src/main/java/org/dbunit/dataset/Column.java @@ -404,7 +404,6 @@ public String getKey() *
  • equalsIgnoreCase "YES" or equals "1" then {@link AutoIncrement#YES} is returned
  • *
  • * - *

    * @param isAutoIncrement The String from the JDBC driver. * @return The enumeration */ diff --git a/src/main/java/org/dbunit/dataset/Columns.java b/src/main/java/org/dbunit/dataset/Columns.java index 63be2bd63..7f0879b61 100644 --- a/src/main/java/org/dbunit/dataset/Columns.java +++ b/src/main/java/org/dbunit/dataset/Columns.java @@ -262,7 +262,7 @@ public static String[] getColumnNames(Column[] columns) */ public static String getColumnNamesAsString(Column[] columns) { - logger.debug("getColumnNamesAsString(columns={}) - start", columns); + logger.debug("getColumnNamesAsString(columns={}) - start", (Object) columns); String[] names = new String[columns.length]; for (int i = 0; i < columns.length; i++) diff --git a/src/main/java/org/dbunit/dataset/CompositeTable.java b/src/main/java/org/dbunit/dataset/CompositeTable.java index 19997e14f..aceabc7ef 100644 --- a/src/main/java/org/dbunit/dataset/CompositeTable.java +++ b/src/main/java/org/dbunit/dataset/CompositeTable.java @@ -27,6 +27,9 @@ import org.slf4j.LoggerFactory; /** + * {@link ITable} that pairs explicit {@link ITableMetaData} with row data drawn + * from one or more other tables. + * * @author Manuel Laflamme * @version $Revision$ * @since Feb 17, 2002 diff --git a/src/main/java/org/dbunit/dataset/DataSetUtils.java b/src/main/java/org/dbunit/dataset/DataSetUtils.java index a23c9d849..128a2eae8 100644 --- a/src/main/java/org/dbunit/dataset/DataSetUtils.java +++ b/src/main/java/org/dbunit/dataset/DataSetUtils.java @@ -277,7 +277,7 @@ public static String[] getReverseTableNames(IDataSet dataSet) */ public static String[] reverseStringArray(String[] array) { - logger.debug("reverseStringArray(array={}) - start", array); + logger.debug("reverseStringArray(array={}) - start", (Object) array); String[] newArray = new String[array.length]; for (int i = 0; i < array.length; i++) { diff --git a/src/main/java/org/dbunit/dataset/DefaultDataSet.java b/src/main/java/org/dbunit/dataset/DefaultDataSet.java index 22cd910d9..6663d6e03 100644 --- a/src/main/java/org/dbunit/dataset/DefaultDataSet.java +++ b/src/main/java/org/dbunit/dataset/DefaultDataSet.java @@ -103,7 +103,6 @@ public void addTable(ITable table) throws AmbiguousTableNameException /** * Initializes the {@link _orderedTableNameMap} of the parent class if it is not initialized yet. - * @throws DataSetException * @since 2.4.6 */ protected void initialize() diff --git a/src/main/java/org/dbunit/dataset/DefaultTableIterator.java b/src/main/java/org/dbunit/dataset/DefaultTableIterator.java index d0fcc8b24..61b89423f 100644 --- a/src/main/java/org/dbunit/dataset/DefaultTableIterator.java +++ b/src/main/java/org/dbunit/dataset/DefaultTableIterator.java @@ -24,6 +24,8 @@ import org.slf4j.LoggerFactory; /** + * {@link ITableIterator} over a fixed, in-memory array of {@link ITable}s. + * * @author Manuel Laflamme * @since Apr 5, 2003 * @version $Revision$ diff --git a/src/main/java/org/dbunit/dataset/DefaultTableMetaData.java b/src/main/java/org/dbunit/dataset/DefaultTableMetaData.java index aa4e093c3..86d332eeb 100644 --- a/src/main/java/org/dbunit/dataset/DefaultTableMetaData.java +++ b/src/main/java/org/dbunit/dataset/DefaultTableMetaData.java @@ -25,6 +25,9 @@ /** + * Straightforward {@link ITableMetaData} implementation holding an explicit table + * name, column list, and primary keys. + * * @author Manuel Laflamme * @version $Revision$ * @since Feb 17, 2002 diff --git a/src/main/java/org/dbunit/dataset/FilteredTableMetaData.java b/src/main/java/org/dbunit/dataset/FilteredTableMetaData.java index 57a2f4f80..a647cb58a 100644 --- a/src/main/java/org/dbunit/dataset/FilteredTableMetaData.java +++ b/src/main/java/org/dbunit/dataset/FilteredTableMetaData.java @@ -30,6 +30,8 @@ import java.util.ArrayList; /** + * {@link ITableMetaData} that exposes only the columns accepted by an {@link IColumnFilter}. + * * @author Manuel Laflamme * @version $Revision$ * @since May 11, 2004 diff --git a/src/main/java/org/dbunit/dataset/ForwardOnlyTable.java b/src/main/java/org/dbunit/dataset/ForwardOnlyTable.java index a28ab9032..a1ca58295 100644 --- a/src/main/java/org/dbunit/dataset/ForwardOnlyTable.java +++ b/src/main/java/org/dbunit/dataset/ForwardOnlyTable.java @@ -24,6 +24,9 @@ import org.slf4j.LoggerFactory; /** + * {@link ITable} decorator that wraps another table and enforces forward-only, + * non-counted row access. + * * @author Manuel Laflamme * @since Apr 9, 2003 * @version $Revision$ diff --git a/src/main/java/org/dbunit/dataset/IDataSet.java b/src/main/java/org/dbunit/dataset/IDataSet.java index 73093e58d..a97aa04e1 100644 --- a/src/main/java/org/dbunit/dataset/IDataSet.java +++ b/src/main/java/org/dbunit/dataset/IDataSet.java @@ -34,12 +34,17 @@ public interface IDataSet * Returns names of tables in this dataset in proper sequence. Multiple * occurrence of the same name may be returned if multiple tables having * the same name are present in the dataset. + * + * @return the table names, in proper sequence. + * @throws DataSetException if the table names cannot be determined. */ public String[] getTableNames() throws DataSetException; /** * Returns the specified table metadata. * + * @param tableName the name of the table to look up. + * @return the metadata of the specified table. * @throws org.dbunit.database.AmbiguousTableNameException if dataset contains multiple tables * having the specified name. Use {@link #iterator} to access * to all tables. @@ -52,6 +57,8 @@ public ITableMetaData getTableMetaData(String tableName) /** * Returns the specified table. * + * @param tableName the name of the table to look up. + * @return the specified table. * @throws org.dbunit.database.AmbiguousTableNameException if dataset contains multiple tables * having the specified name. Use {@link #iterator} to access * to all tables. @@ -64,17 +71,25 @@ public ITableMetaData getTableMetaData(String tableName) * Returns tables in this dataset in proper sequence. Multiple tables having * the same name but different data may be returned. * + * @return the tables in this dataset, in proper sequence. + * @throws DataSetException if the tables cannot be determined. * @deprecated Use {@link #iterator} or {@link #reverseIterator} instead. */ public ITable[] getTables() throws DataSetException; /** * Returns an iterator over the tables in this dataset in proper sequence. + * + * @return an iterator over the tables in this dataset. + * @throws DataSetException if the iterator cannot be created. */ public ITableIterator iterator() throws DataSetException; /** * Returns an iterator over the tables in this dataset in reverse sequence. + * + * @return an iterator over the tables in this dataset, in reverse sequence. + * @throws DataSetException if the iterator cannot be created. */ public ITableIterator reverseIterator() throws DataSetException; diff --git a/src/main/java/org/dbunit/dataset/ITableIterator.java b/src/main/java/org/dbunit/dataset/ITableIterator.java index 44f70432d..248d70252 100644 --- a/src/main/java/org/dbunit/dataset/ITableIterator.java +++ b/src/main/java/org/dbunit/dataset/ITableIterator.java @@ -21,6 +21,8 @@ package org.dbunit.dataset; /** + * Iterator over the {@link ITable}s of an {@link IDataSet}. + * * @author Manuel Laflamme * @since Apr 5, 2003 * @version $Revision$ diff --git a/src/main/java/org/dbunit/dataset/ITableMetaData.java b/src/main/java/org/dbunit/dataset/ITableMetaData.java index 1e11041cb..eee0d6662 100644 --- a/src/main/java/org/dbunit/dataset/ITableMetaData.java +++ b/src/main/java/org/dbunit/dataset/ITableMetaData.java @@ -45,14 +45,14 @@ public interface ITableMetaData * Note that it is not an exceptional case within dbunit when a {@link ITableMetaData} * does not have a column. * @return The columns for this table - * @throws DataSetException + * @throws DataSetException if the columns cannot be determined. */ public Column[] getColumns() throws DataSetException; /** * Returns this table primary key columns. * @return this table primary key columns. - * @throws DataSetException + * @throws DataSetException if the primary key columns cannot be determined. */ public Column[] getPrimaryKeys() throws DataSetException; diff --git a/src/main/java/org/dbunit/dataset/LowerCaseTableMetaData.java b/src/main/java/org/dbunit/dataset/LowerCaseTableMetaData.java index db01b64fe..fc2bd045a 100644 --- a/src/main/java/org/dbunit/dataset/LowerCaseTableMetaData.java +++ b/src/main/java/org/dbunit/dataset/LowerCaseTableMetaData.java @@ -76,7 +76,7 @@ public LowerCaseTableMetaData(String tableName, Column[] columns, private Column[] createLowerColumns(Column[] columns) { - logger.debug("createLowerColumns(columns={}) - start", columns); + logger.debug("createLowerColumns(columns={}) - start", (Object) columns); Column[] lowerColumns = new Column[columns.length]; for (int i = 0; i < columns.length; i++) diff --git a/src/main/java/org/dbunit/dataset/NoPrimaryKeyException.java b/src/main/java/org/dbunit/dataset/NoPrimaryKeyException.java index f8e353f00..a3cfa755f 100644 --- a/src/main/java/org/dbunit/dataset/NoPrimaryKeyException.java +++ b/src/main/java/org/dbunit/dataset/NoPrimaryKeyException.java @@ -23,6 +23,8 @@ /** + * Signals that a table has no primary key column where one is required. + * * @author Manuel Laflamme * @version $Revision$ * @since Feb 19, 2002 diff --git a/src/main/java/org/dbunit/dataset/NoSuchTableException.java b/src/main/java/org/dbunit/dataset/NoSuchTableException.java index 52779c9d5..55de11441 100644 --- a/src/main/java/org/dbunit/dataset/NoSuchTableException.java +++ b/src/main/java/org/dbunit/dataset/NoSuchTableException.java @@ -23,6 +23,8 @@ /** + * Signals that a dataset does not contain a table with the requested name. + * * @author Manuel Laflamme * @version $Revision$ * @since Feb 17, 2002 diff --git a/src/main/java/org/dbunit/dataset/RowOutOfBoundsException.java b/src/main/java/org/dbunit/dataset/RowOutOfBoundsException.java index 1bf42d11e..86eb81551 100644 --- a/src/main/java/org/dbunit/dataset/RowOutOfBoundsException.java +++ b/src/main/java/org/dbunit/dataset/RowOutOfBoundsException.java @@ -23,6 +23,8 @@ /** + * Signals that a requested row index is outside a table's valid range. + * * @author Manuel Laflamme * @version $Revision$ * @since Feb 17, 2002 diff --git a/src/main/java/org/dbunit/dataset/common/handlers/AbstractPipelineComponent.java b/src/main/java/org/dbunit/dataset/common/handlers/AbstractPipelineComponent.java index 9bcaff69b..a3037ee6e 100644 --- a/src/main/java/org/dbunit/dataset/common/handlers/AbstractPipelineComponent.java +++ b/src/main/java/org/dbunit/dataset/common/handlers/AbstractPipelineComponent.java @@ -24,6 +24,9 @@ import org.slf4j.LoggerFactory; /** + * Abstract base {@link PipelineComponent} implementation shared by the CSV + * field-parsing handlers. + * * @author fede * @author Last changed by: $Author$ * @version $Revision$ $Date$ diff --git a/src/main/java/org/dbunit/dataset/common/handlers/AllHandler.java b/src/main/java/org/dbunit/dataset/common/handlers/AllHandler.java index 1a21436bf..13bbff812 100644 --- a/src/main/java/org/dbunit/dataset/common/handlers/AllHandler.java +++ b/src/main/java/org/dbunit/dataset/common/handlers/AllHandler.java @@ -25,6 +25,9 @@ import org.slf4j.LoggerFactory; /** + * {@link PipelineComponent} that matches any character, used as the basis for + * catch-all accept/ignore handlers. + * * @author fede * @author Last changed by: $Author$ * @version $Revision$ $Date$ diff --git a/src/main/java/org/dbunit/dataset/common/handlers/EnforceHandler.java b/src/main/java/org/dbunit/dataset/common/handlers/EnforceHandler.java index 16e97dc80..6872fdfde 100644 --- a/src/main/java/org/dbunit/dataset/common/handlers/EnforceHandler.java +++ b/src/main/java/org/dbunit/dataset/common/handlers/EnforceHandler.java @@ -25,6 +25,9 @@ import org.slf4j.LoggerFactory; /** + * Pipeline component that delegates to the first wrapped {@link PipelineComponent} able to + * handle a character, throwing {@link IllegalInputCharacterException} if none of them can. + * * @author fede * @author Last changed by: $Author$ * @version $Revision$ $Date$ @@ -52,7 +55,7 @@ public static final PipelineComponent ENFORCE(PipelineComponent component) { } public static final PipelineComponent ENFORCE(PipelineComponent [] components) { - logger.debug("ENFORCE(components={}) - start", components); + logger.debug("ENFORCE(components={}) - start", (Object) components); return createPipelineComponent(new EnforceHandler(components), new ENFORCE()); } @@ -87,7 +90,7 @@ protected PipelineComponent[] getEnforcedComponents() { } protected void setEnforcedComponents(PipelineComponent[] enforcedComponents) { - logger.debug("setEnforcedComponents(enforcedComponents={}) - start", enforcedComponents); + logger.debug("setEnforcedComponents(enforcedComponents={}) - start", (Object) enforcedComponents); this.enforcedComponents = enforcedComponents; } diff --git a/src/main/java/org/dbunit/dataset/common/handlers/EscapeHandler.java b/src/main/java/org/dbunit/dataset/common/handlers/EscapeHandler.java index a9663ddae..42d281551 100644 --- a/src/main/java/org/dbunit/dataset/common/handlers/EscapeHandler.java +++ b/src/main/java/org/dbunit/dataset/common/handlers/EscapeHandler.java @@ -25,6 +25,8 @@ import org.slf4j.LoggerFactory; /** + * {@link PipelineComponent} that matches the CSV escape character. + * * @author fede * @author Last changed by: $Author$ * @version $Revision$ $Date$ diff --git a/src/main/java/org/dbunit/dataset/common/handlers/Handler.java b/src/main/java/org/dbunit/dataset/common/handlers/Handler.java index 6d16538fa..ac586c0d6 100644 --- a/src/main/java/org/dbunit/dataset/common/handlers/Handler.java +++ b/src/main/java/org/dbunit/dataset/common/handlers/Handler.java @@ -23,6 +23,9 @@ /** + * Base contract for an object that decides whether and how to handle a single + * character during CSV parsing. + * * @author fede * @author Last changed by: $Author$ * @version $Revision$ $Date$ diff --git a/src/main/java/org/dbunit/dataset/common/handlers/Helper.java b/src/main/java/org/dbunit/dataset/common/handlers/Helper.java index 54c4d8079..271e06a39 100644 --- a/src/main/java/org/dbunit/dataset/common/handlers/Helper.java +++ b/src/main/java/org/dbunit/dataset/common/handlers/Helper.java @@ -26,6 +26,8 @@ /** + * Abstract helper that assists a {@link PipelineComponent} in processing a character. + * * @author fede * @author Last changed by: $Author$ * @version $Revision$ $Date$ diff --git a/src/main/java/org/dbunit/dataset/common/handlers/IllegalInputCharacterException.java b/src/main/java/org/dbunit/dataset/common/handlers/IllegalInputCharacterException.java index a87de6c3d..2293fc311 100644 --- a/src/main/java/org/dbunit/dataset/common/handlers/IllegalInputCharacterException.java +++ b/src/main/java/org/dbunit/dataset/common/handlers/IllegalInputCharacterException.java @@ -24,6 +24,9 @@ import org.dbunit.DatabaseUnitRuntimeException; /** + * Signals that a character could not be handled by any component in the CSV + * parsing pipeline. + * * @author fede * @author Last changed by: $Author$ * @version $Revision$ $Date$ diff --git a/src/main/java/org/dbunit/dataset/common/handlers/IsAlnumHandler.java b/src/main/java/org/dbunit/dataset/common/handlers/IsAlnumHandler.java index c6e638eda..7e9d7c466 100644 --- a/src/main/java/org/dbunit/dataset/common/handlers/IsAlnumHandler.java +++ b/src/main/java/org/dbunit/dataset/common/handlers/IsAlnumHandler.java @@ -25,6 +25,8 @@ import org.slf4j.LoggerFactory; /** + * {@link PipelineComponent} that matches alphanumeric characters. + * * @author fede * @author Last changed by: $Author$ * @version $Revision$ $Date$ diff --git a/src/main/java/org/dbunit/dataset/common/handlers/LineEndHandler.java b/src/main/java/org/dbunit/dataset/common/handlers/LineEndHandler.java index 7847d556f..cec572563 100644 --- a/src/main/java/org/dbunit/dataset/common/handlers/LineEndHandler.java +++ b/src/main/java/org/dbunit/dataset/common/handlers/LineEndHandler.java @@ -22,6 +22,8 @@ package org.dbunit.dataset.common.handlers; /** + * Placeholder class reserved for CSV line-ending handling. + * * @author fede * @author Last changed by: $Author$ * @version $Revision$ $Date$ diff --git a/src/main/java/org/dbunit/dataset/common/handlers/NoHandler.java b/src/main/java/org/dbunit/dataset/common/handlers/NoHandler.java index ef279ff74..f062b19cd 100644 --- a/src/main/java/org/dbunit/dataset/common/handlers/NoHandler.java +++ b/src/main/java/org/dbunit/dataset/common/handlers/NoHandler.java @@ -24,6 +24,9 @@ /** + * Sentinel {@link PipelineComponent} placed at the end of a pipeline that rejects + * any character not handled by an earlier component. + * * @author fede * @author Last changed by: $Author$ * @version $Revision$ $Date$ diff --git a/src/main/java/org/dbunit/dataset/common/handlers/Pipeline.java b/src/main/java/org/dbunit/dataset/common/handlers/Pipeline.java index 132d3905f..b6e18ba98 100644 --- a/src/main/java/org/dbunit/dataset/common/handlers/Pipeline.java +++ b/src/main/java/org/dbunit/dataset/common/handlers/Pipeline.java @@ -29,6 +29,9 @@ import org.slf4j.LoggerFactory; /** + * Chain-of-responsibility pipeline of {@link PipelineComponent}s that parses + * CSV field text one character at a time. + * * @author fede * @author Last changed by: $Author$ * @version $Revision$ $Date$ diff --git a/src/main/java/org/dbunit/dataset/common/handlers/PipelineComponent.java b/src/main/java/org/dbunit/dataset/common/handlers/PipelineComponent.java index dcbeb635c..340a075d2 100644 --- a/src/main/java/org/dbunit/dataset/common/handlers/PipelineComponent.java +++ b/src/main/java/org/dbunit/dataset/common/handlers/PipelineComponent.java @@ -22,6 +22,9 @@ package org.dbunit.dataset.common.handlers; /** + * A {@link Handler} that can be chained into a {@link Pipeline} of successors + * for character-by-character CSV field parsing. + * * @author fede * @author Last changed by: $Author$ * @version $Revision$ $Date$ diff --git a/src/main/java/org/dbunit/dataset/common/handlers/PipelineConfig.java b/src/main/java/org/dbunit/dataset/common/handlers/PipelineConfig.java index 3024f65dc..c06bee245 100644 --- a/src/main/java/org/dbunit/dataset/common/handlers/PipelineConfig.java +++ b/src/main/java/org/dbunit/dataset/common/handlers/PipelineConfig.java @@ -21,6 +21,9 @@ package org.dbunit.dataset.common.handlers; /** + * Holds the configurable separator, quote, and escape characters used by a CSV + * parsing {@link Pipeline}. + * * @author gommma (gommma AT users.sourceforge.net) * @author Last changed by: $Author$ * @version $Revision$ $Date$ diff --git a/src/main/java/org/dbunit/dataset/common/handlers/PipelineException.java b/src/main/java/org/dbunit/dataset/common/handlers/PipelineException.java index e4d44a819..c3fb6c40c 100644 --- a/src/main/java/org/dbunit/dataset/common/handlers/PipelineException.java +++ b/src/main/java/org/dbunit/dataset/common/handlers/PipelineException.java @@ -24,6 +24,8 @@ import org.dbunit.DatabaseUnitRuntimeException; /** + * Signals an error while processing a character through the CSV parsing pipeline. + * * @author fede * @author Last changed by: $Author$ * @version $Revision$ $Date$ diff --git a/src/main/java/org/dbunit/dataset/common/handlers/QuoteHandler.java b/src/main/java/org/dbunit/dataset/common/handlers/QuoteHandler.java index 8368f6c46..0245c7da8 100644 --- a/src/main/java/org/dbunit/dataset/common/handlers/QuoteHandler.java +++ b/src/main/java/org/dbunit/dataset/common/handlers/QuoteHandler.java @@ -25,6 +25,8 @@ import org.slf4j.LoggerFactory; /** + * {@link PipelineComponent} that matches the CSV quote character. + * * @author fede * @author Last changed by: $Author$ * @version $Revision$ $Date$ diff --git a/src/main/java/org/dbunit/dataset/common/handlers/SeparatorHandler.java b/src/main/java/org/dbunit/dataset/common/handlers/SeparatorHandler.java index 071e408ee..ca2327afb 100644 --- a/src/main/java/org/dbunit/dataset/common/handlers/SeparatorHandler.java +++ b/src/main/java/org/dbunit/dataset/common/handlers/SeparatorHandler.java @@ -26,6 +26,8 @@ /** + * {@link PipelineComponent} that matches the CSV field separator character. + * * @author fede * @author Last changed by: $Author$ * @version $Revision$ $Date$ diff --git a/src/main/java/org/dbunit/dataset/common/handlers/TransparentHandler.java b/src/main/java/org/dbunit/dataset/common/handlers/TransparentHandler.java index 7b3bf2711..fdc14e254 100644 --- a/src/main/java/org/dbunit/dataset/common/handlers/TransparentHandler.java +++ b/src/main/java/org/dbunit/dataset/common/handlers/TransparentHandler.java @@ -25,6 +25,9 @@ import org.slf4j.LoggerFactory; /** + * {@link PipelineComponent} that accepts any character without altering the + * field being assembled. + * * @author fede * @author Last changed by: $Author$ * @version $Revision$ $Date$ diff --git a/src/main/java/org/dbunit/dataset/common/handlers/UnquotedFieldAssembler.java b/src/main/java/org/dbunit/dataset/common/handlers/UnquotedFieldAssembler.java index a51e2bb2a..8f2820108 100644 --- a/src/main/java/org/dbunit/dataset/common/handlers/UnquotedFieldAssembler.java +++ b/src/main/java/org/dbunit/dataset/common/handlers/UnquotedFieldAssembler.java @@ -28,6 +28,9 @@ /** + * {@link PipelineComponent} that assembles an unquoted CSV field value from its + * constituent characters. + * * @author fede * @author Last changed by: $Author$ * @version $Revision$ $Date$ diff --git a/src/main/java/org/dbunit/dataset/common/handlers/WhitespacesHandler.java b/src/main/java/org/dbunit/dataset/common/handlers/WhitespacesHandler.java index 634a06790..cb03878e8 100644 --- a/src/main/java/org/dbunit/dataset/common/handlers/WhitespacesHandler.java +++ b/src/main/java/org/dbunit/dataset/common/handlers/WhitespacesHandler.java @@ -25,6 +25,8 @@ import org.slf4j.LoggerFactory; /** + * {@link PipelineComponent} that matches whitespace characters during CSV field parsing. + * * @author fede * @author Last changed by: $Author$ * @version $Revision$ $Date$ diff --git a/src/main/java/org/dbunit/dataset/csv/CsvDataSetWriter.java b/src/main/java/org/dbunit/dataset/csv/CsvDataSetWriter.java index 77486dfd7..86687108b 100644 --- a/src/main/java/org/dbunit/dataset/csv/CsvDataSetWriter.java +++ b/src/main/java/org/dbunit/dataset/csv/CsvDataSetWriter.java @@ -44,6 +44,8 @@ import org.dbunit.dataset.stream.IDataSetConsumer; /** + * {@link IDataSetConsumer} that writes a dataset's tables and rows to CSV files. + * * @author fede * @since 24-set-2003 15.27.05 * @version $Revision$ diff --git a/src/main/java/org/dbunit/dataset/csv/CsvParser.java b/src/main/java/org/dbunit/dataset/csv/CsvParser.java index 71e80d6da..237c9bee0 100644 --- a/src/main/java/org/dbunit/dataset/csv/CsvParser.java +++ b/src/main/java/org/dbunit/dataset/csv/CsvParser.java @@ -29,6 +29,8 @@ import org.dbunit.dataset.common.handlers.PipelineException; /** + * Parses a line of CSV text into its individual field values. + * * @author fede * @author Last changed by: $Author$ * @version $Revision$ $Date$ diff --git a/src/main/java/org/dbunit/dataset/csv/CsvParserException.java b/src/main/java/org/dbunit/dataset/csv/CsvParserException.java index 742e1219c..01e99e516 100644 --- a/src/main/java/org/dbunit/dataset/csv/CsvParserException.java +++ b/src/main/java/org/dbunit/dataset/csv/CsvParserException.java @@ -24,6 +24,8 @@ import org.dbunit.DatabaseUnitRuntimeException; /** + * Signals an error while parsing CSV input. + * * @author fede * @author Last changed by: $Author$ * @version $Revision$ $Date$ diff --git a/src/main/java/org/dbunit/dataset/csv/CsvParserImpl.java b/src/main/java/org/dbunit/dataset/csv/CsvParserImpl.java index e7b0be4ae..902d52860 100644 --- a/src/main/java/org/dbunit/dataset/csv/CsvParserImpl.java +++ b/src/main/java/org/dbunit/dataset/csv/CsvParserImpl.java @@ -47,6 +47,9 @@ import org.slf4j.LoggerFactory; /** + * {@link CsvParser} implementation that tokenizes a line of CSV text using the + * {@link org.dbunit.dataset.common.handlers.Pipeline} character-handling framework. + * * @author fede * @author Last changed by: $Author$ * @version $Revision$ $Date$ diff --git a/src/main/java/org/dbunit/dataset/csv/CsvProducer.java b/src/main/java/org/dbunit/dataset/csv/CsvProducer.java index ad4d31f2f..4bad7f21d 100644 --- a/src/main/java/org/dbunit/dataset/csv/CsvProducer.java +++ b/src/main/java/org/dbunit/dataset/csv/CsvProducer.java @@ -45,6 +45,8 @@ import org.slf4j.LoggerFactory; /** + * {@link IDataSetProducer} that streams table and row events by parsing CSV files. + * * @author Federico Spinazzi * @author Last changed by: $Author$ * @version $Revision$ $Date$ diff --git a/src/main/java/org/dbunit/dataset/csv/IllegalCharacterSeen.java b/src/main/java/org/dbunit/dataset/csv/IllegalCharacterSeen.java index 406a7abed..6a386befe 100644 --- a/src/main/java/org/dbunit/dataset/csv/IllegalCharacterSeen.java +++ b/src/main/java/org/dbunit/dataset/csv/IllegalCharacterSeen.java @@ -23,6 +23,8 @@ /** + * Signals that an unexpected character was encountered while producing CSV output. + * * @author fede * @author Last changed by: $Author$ * @version $Revision$ $Date$ diff --git a/src/main/java/org/dbunit/dataset/datatype/AbstractDataType.java b/src/main/java/org/dbunit/dataset/datatype/AbstractDataType.java index 79a735901..767a10a24 100644 --- a/src/main/java/org/dbunit/dataset/datatype/AbstractDataType.java +++ b/src/main/java/org/dbunit/dataset/datatype/AbstractDataType.java @@ -126,7 +126,7 @@ public int compare(final Object o1, final Object o2) * method call * @return The result of the {@link Comparable#compareTo(Object)} * invocation. - * @throws TypeCastException + * @throws TypeCastException if either value cannot be cast to a {@link Comparable}. */ protected int compareNonNulls(final Object value1, final Object value2) throws TypeCastException diff --git a/src/main/java/org/dbunit/dataset/datatype/BinaryStreamDataType.java b/src/main/java/org/dbunit/dataset/datatype/BinaryStreamDataType.java index 654cfe09e..2b011cfa1 100644 --- a/src/main/java/org/dbunit/dataset/datatype/BinaryStreamDataType.java +++ b/src/main/java/org/dbunit/dataset/datatype/BinaryStreamDataType.java @@ -32,6 +32,8 @@ import org.slf4j.LoggerFactory; /** + * {@link BytesDataType} specialization that reads binary SQL column values as a stream. + * * @author fede * @author Last changed by: $Author$ * @version $Revision$ $Date$ diff --git a/src/main/java/org/dbunit/dataset/datatype/BitDataType.java b/src/main/java/org/dbunit/dataset/datatype/BitDataType.java index e285a145e..481f647ca 100644 --- a/src/main/java/org/dbunit/dataset/datatype/BitDataType.java +++ b/src/main/java/org/dbunit/dataset/datatype/BitDataType.java @@ -23,6 +23,8 @@ import java.sql.Types; /** + * {@link BooleanDataType} specialization mapping the SQL BIT type. + * * @author gommma * @author Last changed by: $Author$ * @version $Revision$ $Date$ diff --git a/src/main/java/org/dbunit/dataset/datatype/BlobDataType.java b/src/main/java/org/dbunit/dataset/datatype/BlobDataType.java index 646843f11..7f4493a22 100644 --- a/src/main/java/org/dbunit/dataset/datatype/BlobDataType.java +++ b/src/main/java/org/dbunit/dataset/datatype/BlobDataType.java @@ -31,6 +31,8 @@ import org.slf4j.LoggerFactory; /** + * {@link BytesDataType} specialization mapping the SQL BLOB type to a {@code byte[]}. + * * @author Manuel Laflamme * @version $Revision$ * @since Jan 12, 2004 diff --git a/src/main/java/org/dbunit/dataset/datatype/BooleanDataType.java b/src/main/java/org/dbunit/dataset/datatype/BooleanDataType.java index 2c90e3350..9c891716e 100644 --- a/src/main/java/org/dbunit/dataset/datatype/BooleanDataType.java +++ b/src/main/java/org/dbunit/dataset/datatype/BooleanDataType.java @@ -30,6 +30,8 @@ import org.slf4j.LoggerFactory; /** + * {@link DataType} mapping the SQL BOOLEAN type to {@link Boolean}. + * * @author Manuel Laflamme * @author Last changed by: $Author$ * @version $Revision$ $Date$ diff --git a/src/main/java/org/dbunit/dataset/datatype/BytesDataType.java b/src/main/java/org/dbunit/dataset/datatype/BytesDataType.java index dad6d6dfa..b420759f9 100644 --- a/src/main/java/org/dbunit/dataset/datatype/BytesDataType.java +++ b/src/main/java/org/dbunit/dataset/datatype/BytesDataType.java @@ -45,6 +45,8 @@ import org.slf4j.LoggerFactory; /** + * {@link DataType} mapping a binary SQL column type to a Java {@code byte[]}. + * * @author Manuel Laflamme * @author Last changed by: $Author$ * @version $Revision$ $Date$ diff --git a/src/main/java/org/dbunit/dataset/datatype/ClobDataType.java b/src/main/java/org/dbunit/dataset/datatype/ClobDataType.java index 253c76488..a8624a967 100644 --- a/src/main/java/org/dbunit/dataset/datatype/ClobDataType.java +++ b/src/main/java/org/dbunit/dataset/datatype/ClobDataType.java @@ -31,6 +31,9 @@ import org.slf4j.LoggerFactory; /** + * {@link StringDataType} that maps the SQL CLOB type, reading its character + * content as a {@link String}. + * * @author Manuel Laflamme * @author Last changed by: $Author$ * @version $Revision$ $Date$ diff --git a/src/main/java/org/dbunit/dataset/datatype/DataType.java b/src/main/java/org/dbunit/dataset/datatype/DataType.java index 4ea2a25a6..d3887d70e 100644 --- a/src/main/java/org/dbunit/dataset/datatype/DataType.java +++ b/src/main/java/org/dbunit/dataset/datatype/DataType.java @@ -123,6 +123,10 @@ public abstract class DataType /** * Returns the specified value typecasted to this 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: - *

    + * 
    
      * File ctlDir = new File("src/sqlloader");
      * File orderedTablesFile = new File("src/sqlloader/tables.lst");
      * IDataSet dataSet = new SqlLoaderControlDataSet(ctlDir, orderedTablesFile);
    - * 
    + *
    * The file 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: *
    * + * * *
    Example tables.lst content
    LANGUAGE
    COUNTRY
    * The 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=
    +     * catalog="BLA", catalogName=<null>
          * schema="BLA", schemaName="BLA"
          * 
    * 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. - *

    + *

    * 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'. *

    - *

    Unit

    + *

    Unit

    *
      *
    • y : years
    • *
    • M : months
    • diff --git a/src/main/java/org/dbunit/util/concurrent/BoundedBuffer.java b/src/main/java/org/dbunit/util/concurrent/BoundedBuffer.java index b03cfe360..27fe665b6 100644 --- a/src/main/java/org/dbunit/util/concurrent/BoundedBuffer.java +++ b/src/main/java/org/dbunit/util/concurrent/BoundedBuffer.java @@ -22,8 +22,8 @@ /** * Efficient array-based bounded buffer class. * Adapted from CPJ, chapter 8, which describes design. - *

      [ 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: *

      *
    • A 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. - *

      *

    • A 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 ... } * } * - *

      - *

    • A swap method that atomically swaps with another + *
    • A swap method that atomically swaps with another * object of the same class using a deadlock-avoidance strategy. - *

      *

    • Update-in-place methods appropriate to the type. All * numerical types support: *
        @@ -172,10 +168,6 @@ * many cases where it would not make sense. However, you can * easily make simple subclasses that add the appropriate declarations. * - *

        - * - * - * *

        [ 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 // 425343 static public void main(final String[] args) throws IOException { - logger.debug("main(args={}) - start", args); + logger.debug("main(args={}) - start", (Object) args); test1(); test2(); From 24e5c9c08d4b19251d65231e256eb0f582d0d472 Mon Sep 17 00:00:00 2001 From: Jeff Jensen Date: Mon, 3 Aug 2026 11:41:18 -0500 Subject: [PATCH 2/2] docs(site): Fix all Asciidoctor warnings and errors from mvnw site * anttask/canoo-webtest-example.adoc: promote 4 Step headings from level 2 to level 1, since they follow the document title directly with no enclosing level-1 section. * anttask.adoc: attach the source block to its list item with a `+` continuation so the numbered list doesn't split and restart at 3; convert 5 tables from `!` to `|` cell separators, the correct default that matches every other table in the file. * intro.adoc: backslash-escape 4 standalone "[...]" elision markers so they aren't misparsed as empty AsciiDoc block attribute lists. The remaining "Fallback behaviour for node: admonition/open" warnings are an architectural Doxia Sink limitation (confirmed via Asciidoctor's own docs, and empirically: every admonition/open-block-using page in the site triggers one, not just these), not fixable via content edits. Refs: 902 Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01AvRxjuGT9d2redtnvdnYXV --- src/changes/changes.xml | 3 ++ src/site/asciidoc/anttask.adoc | 48 +++++++++---------- .../anttask/canoo-webtest-example.adoc | 8 ++-- src/site/asciidoc/intro.adoc | 8 ++-- 4 files changed, 35 insertions(+), 32 deletions(-) diff --git a/src/changes/changes.xml b/src/changes/changes.xml index e6ceda82d..4fba2f93d 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -210,6 +210,9 @@ Run a full "mvnw clean install site" and fix everything it flagged. Removed the long-standing "FIXME remove -Xdoclint:none after JavaDoc cleanup" suppression from maven-javadoc-plugin's build and reporting configuration now that issue 886's cleanup is done, then fixed every doclint warning and error the removal surfaced across the main source tree: missing one-sentence class/interface/field summaries, including on the framework's core public API (IDatabaseConnection, IDatabaseTester, IDataSet, ITableMetaData, DataType, DatabaseOperation) whose methods were also missing @param/@return/@throws tags entirely; invalid HTML (unclosed and self-closing <p> tags, <code><pre> nesting, <xmp>/<tt> tags unsupported in HTML5, an unescaped "<null>" literal, a table missing <caption>) throughout Doug Lea's vendored util.concurrent classes and elsewhere; an unresolvable {@link ITable} reference from a missing import; a typo'd </cde> closing tag and out-of-sequence heading in RelativeDateTimeParser; @see tags illegally wrapping {@link}; and stale @throws Exception tags left over from ISearchCallback/ISearchAlgorithm's narrowing to SearchException. Also fixed the compiler warnings the same build surfaced: a dead compilerVersion parameter, 21 non-varargs calls to varargs methods with an inexact array argument type (several of which were silently mis-formatting SLF4J debug messages by spreading an array's elements across a single "{}" placeholder instead of logging the array itself), and Surefire/Failsafe's deprecated systemProperties style. Finally, fixed all 54 Checkstyle violations the pinned checkstyle 13.3.0 engine reported once its (previously flaky-cached) dependency resolved correctly: missing @author/@version Javadoc tags on 3.x-era classes that predate the project's tag convention, and two wildcard imports expanded to explicit ones. + + Fix all Asciidoctor warnings and errors reported by "mvnw site" rendering the doc site: two anttask.adoc/canoo-webtest-example.adoc heading levels jumping straight from the document title to level 2 instead of level 1; a numbered list in anttask.adoc splitting into a second, incorrectly-restarted list because its source-code block wasn't attached with a `+` list continuation; five anttask.adoc tables mistakenly using `!` as the cell separator instead of `|`, which Asciidoctor doesn't recognize without a matching `separator` attribute; and four literal "[...]" elision markers in intro.adoc being misparsed as (invalid, empty) AsciiDoc block attribute lists, now backslash-escaped. Confirmed the remaining "Fallback behaviour for node: admonition/open" notices (verified present for every NOTE:/TIP:/etc. admonition and every "--" open block sitewide, not specific to any one page) are an architectural limitation of the Doxia Sink interface itself per Asciidoctor's own Maven Tools docs, not fixable via content changes or a newer asciidoctor-parser-doxia-module version. + diff --git a/src/site/asciidoc/anttask.adoc b/src/site/asciidoc/anttask.adoc index 9f7209ce0..3a6ef1d8f 100644 --- a/src/site/asciidoc/anttask.adoc +++ b/src/site/asciidoc/anttask.adoc @@ -7,7 +7,7 @@ The steps required to add the DbUnit task to your system are: 1. Add the DbUnit jar to Ant's classpath. You may alternatively use the 'classpath' attribute of ``. 2. Add a `` element to your build script as follows: - ++ [source,xml] ---- @@ -106,30 +106,30 @@ You can specify individual tables or queries to export by nesting them under the *table*: Use nested `` 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 export data according to a sql statement. [cols="1,3,1",options="header"] -!=== -!Attribute !Description !Required -!name !Name to reference the sql statement. !Yes -!sql !The sql to execute. You can use either SELECT * from Mytable or SELECT col1, col4 from MyTable !Yes -!=== +|=== +|Attribute |Description |Required +|name |Name to reference the sql statement. |Yes +|sql |The sql to execute. You can use either SELECT * from Mytable or SELECT col1, col4 from MyTable |Yes +|=== *queryset*: Use a `` element to establish a group of `` elements which can be referenced throughout the Ant project. Also use nested ``s to include more than one `` element for a table. QuerySets are joined together using a link:datasets/decorators.html#compositedataset[CompositeDataSet]. [cols="1,3,1",options="header"] -!=== -!Attribute !Description !Required -!id !Unique identifier for this element instance which can be referred to using 'refid'. !No -!refid !The reference 'id' of the queryset to refer to. !No -!=== +|=== +|Attribute |Description |Required +|id |Unique identifier for this element instance which can be referred to using 'refid'. |No +|refid |The reference 'id' of the queryset to refer to. |No +|=== Nested elements of queryset: @@ -172,19 +172,19 @@ Use nested `` elements to validate the content of the database against *table*: 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 `` elements to compare data according to a sql statement. [cols="1,3,1",options="header"] -!=== -!Attribute !Description !Required -!name !Name of the database table to compare. !Yes -!sql !The sql to execute. You can use either SELECT * from Mytable or SELECT col1, col4 from MyTable !Yes -!=== +|=== +|Attribute |Description |Required +|name |Name of the database table to compare. |Yes +|sql |The sql to execute. You can use either SELECT * from Mytable or SELECT col1, col4 from MyTable |Yes +|=== == Examples diff --git a/src/site/asciidoc/anttask/canoo-webtest-example.adoc b/src/site/asciidoc/anttask/canoo-webtest-example.adoc index cfe060422..099538573 100644 --- a/src/site/asciidoc/anttask/canoo-webtest-example.adoc +++ b/src/site/asciidoc/anttask/canoo-webtest-example.adoc @@ -11,13 +11,13 @@ This document walks you through a suggested format for storing tests. See link:../anttask.html[Ant Task] for the `` task reference this walkthrough builds on. -=== Step 1: Create your dataset file +== Step 1: Create your dataset file Your first step is to create your dataset file that you want to load into your database before running your WebTest script. Use one of the link:../datasets.html[dataset formats]. Put the various datasets you need in a `/data` directory. -=== Step 2: Create your Ant build.xml file +== Step 2: Create your Ant build.xml file A suggested setup is to have a single build.xml file that is the entry point for all your tests. This would include a couple targets like: @@ -26,7 +26,7 @@ This would include a couple targets like: . `test:single`: Runs a single test in a specific testSuite . `test:suite`: Runs all the tests for a specific testSuite -=== Step 3: Create your various Test Suites +== Step 3: Create your various Test Suites Once you have your build.xml file set up, you can now call the various TestSuites. Create a separate TestSuiteXXX.xml for the various modules that you would like to test. @@ -49,7 +49,7 @@ In your TestSuiteXXX.xml, you should have your default target testSuite call all This way you can either run all the test's in your Test Suite, or just run a specific one, all from build.xml! -=== Step 4: Create your various Tests +== Step 4: Create your various Tests Now you need to write your various testcases. For more information on WebTest, please refer to the link:http://webtest.canoo.com[WebTest home page]. diff --git a/src/site/asciidoc/intro.adoc b/src/site/asciidoc/intro.adoc index 4634d068b..1cb8088e3 100644 --- a/src/site/asciidoc/intro.adoc +++ b/src/site/asciidoc/intro.adoc @@ -17,7 +17,7 @@ See link:resources.html#RichardDallaway[resources] for reference to it. - Manuel These are my notes on how I've gone about unit testing database functionality. -[...] +\[...] The problem is this: you have a SQL database, some stored procedures, and a layer of code sitting between your application and the database. How can you put tests in place to make sure your code really is reading and writing the right data from the database? @@ -37,7 +37,7 @@ Automated tests — painless tests that run often and test lots — reduce the c I find they make it easier for me to sleep at night. (Tests have other positive features: they're good examples of how to use code, they act as documentation, they make other people's code less scary when you need to change it, they reduce debugging time). -[...] +\[...] [B]ut how do we manage the testing data in the database so that it doesn't "mess up" live data? @@ -47,11 +47,11 @@ Some thoughts: A good test set is self-sufficient and creates all the data it ne Testing can be simplified if you can get the database in a known state before a test is run. One ways to do this is to have a separate unit test database, which is under the control of the test cases: the test cases clean out the database before starting any tests. -[...] +\[...] Deleting and inserting data for every test may seem like a big time over head, but as tests use relatively little data, I find this approach to be quick enough (especially if you're running against a local test database). -[...] +\[...] The downside is that you need more than one database - but remember, they can all run on one server if necessary. The way I'm testing now needs four databases (well, two at a pinch):