Add missing author tags and sync SQL script support for JDBC & R2DBC

This commit is contained in:
Sam Brannen
2021-05-16 17:18:56 +02:00
parent 8da049b613
commit c80c4e001a
23 changed files with 176 additions and 171 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2020 the original author or authors.
* Copyright 2002-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,6 +21,8 @@ import org.springframework.core.io.support.EncodedResource;
/**
* Thrown by {@link ScriptUtils} if an SQL script cannot be read.
*
* @author Keith Donald
* @author Sam Brannen
* @author Mark Paluch
* @since 5.3
*/
@@ -29,8 +31,8 @@ public class CannotReadScriptException extends ScriptException {
/**
* Create a new {@code CannotReadScriptException}.
* @param resource the resource that cannot be read from.
* @param cause the underlying cause of the resource access failure.
* @param resource the resource that cannot be read from
* @param cause the underlying cause of the resource access failure
*/
public CannotReadScriptException(EncodedResource resource, Throwable cause) {
super("Cannot read SQL script from " + resource, cause);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2020 the original author or authors.
* Copyright 2002-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -29,8 +29,12 @@ import org.springframework.util.Assert;
/**
* Composite {@link DatabasePopulator} that delegates to a list of given
* {@link DatabasePopulator} implementations, executing all scripts.
* {@code DatabasePopulator} implementations, executing all scripts.
*
* @author Dave Syer
* @author Juergen Hoeller
* @author Sam Brannen
* @author Kazuki Shimizu
* @author Mark Paluch
* @since 5.3
*/
@@ -44,14 +48,15 @@ public class CompositeDatabasePopulator implements DatabasePopulator {
* @see #setPopulators
* @see #addPopulators
*/
public CompositeDatabasePopulator() {}
public CompositeDatabasePopulator() {
}
/**
* Create a {@code CompositeDatabasePopulator}. with the given populators.
* @param populators one or more populators to delegate to.
*/
public CompositeDatabasePopulator(Collection<DatabasePopulator> populators) {
Assert.notNull(populators, "Collection of DatabasePopulator must not be null");
Assert.notNull(populators, "DatabasePopulators must not be null");
this.populators.addAll(populators);
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2020 the original author or authors.
* Copyright 2002-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -28,6 +28,8 @@ import org.springframework.util.Assert;
* initialization and {@link #setDatabaseCleaner clean up} a database during
* destruction.
*
* @author Dave Syer
* @author Sam Brannen
* @author Mark Paluch
* @since 5.3
* @see DatabasePopulator
@@ -50,7 +52,7 @@ public class ConnectionFactoryInitializer implements InitializingBean, Disposabl
* The {@link ConnectionFactory} for the database to populate when this
* component is initialized and to clean up when this component is shut down.
* <p>This property is mandatory with no default provided.
* @param connectionFactory the R2DBC {@link ConnectionFactory}.
* @param connectionFactory the R2DBC {@link ConnectionFactory}
*/
public void setConnectionFactory(ConnectionFactory connectionFactory) {
this.connectionFactory = connectionFactory;
@@ -66,10 +68,9 @@ public class ConnectionFactoryInitializer implements InitializingBean, Disposabl
}
/**
* Set the {@link DatabasePopulator} to execute during the bean destruction phase, cleaning up the database and
* leaving it in a known state for others.
*
* @param databaseCleaner the {@link DatabasePopulator} to use during destruction
* Set the {@link DatabasePopulator} to execute during the bean destruction
* phase, cleaning up the database and leaving it in a known state for others.
* @param databaseCleaner the {@code DatabasePopulator} to use during destruction
* @see #setDatabasePopulator
*/
public void setDatabaseCleaner(DatabasePopulator databaseCleaner) {
@@ -77,8 +78,8 @@ public class ConnectionFactoryInitializer implements InitializingBean, Disposabl
}
/**
* Flag to explicitly enable or disable the {@link #setDatabasePopulator database populator}
* and {@link #setDatabaseCleaner database cleaner}.
* Flag to explicitly enable or disable the {@linkplain #setDatabasePopulator
* database populator} and {@linkplain #setDatabaseCleaner database cleaner}.
* @param enabled {@code true} if the database populator and database cleaner
* should be called on startup and shutdown, respectively
*/
@@ -88,7 +89,8 @@ public class ConnectionFactoryInitializer implements InitializingBean, Disposabl
/**
* Use the {@link #setDatabasePopulator database populator} to set up the database.
* Use the {@linkplain #setDatabasePopulator database populator} to set up
* the database.
*/
@Override
public void afterPropertiesSet() {
@@ -96,7 +98,8 @@ public class ConnectionFactoryInitializer implements InitializingBean, Disposabl
}
/**
* Use the {@link #setDatabaseCleaner database cleaner} to clean up the database.
* Use the {@linkplain #setDatabaseCleaner database cleaner} to clean up the
* database.
*/
@Override
public void destroy() {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2020 the original author or authors.
* Copyright 2002-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -28,6 +28,8 @@ import org.springframework.util.Assert;
* Strategy used to populate, initialize, or clean up a database.
*
* @author Mark Paluch
* @author Keith Donald
* @author Sam Brannen
* @since 5.3
* @see ResourceDatabasePopulator
* @see ConnectionFactoryInitializer

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2020 the original author or authors.
* Copyright 2002-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,8 +20,10 @@ import org.springframework.dao.DataAccessException;
import org.springframework.lang.Nullable;
/**
* Root of the hierarchy of data access exceptions that are related to processing of SQL scripts.
* Root of the hierarchy of data access exceptions that are related to processing
* of SQL scripts.
*
* @author Sam Brannen
* @author Mark Paluch
* @since 5.3
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2020 the original author or authors.
* Copyright 2002-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,6 +22,7 @@ import org.springframework.lang.Nullable;
/**
* Thrown by {@link ScriptUtils} if an SQL script cannot be properly parsed.
*
* @author Sam Brannen
* @author Mark Paluch
* @since 5.3
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,6 +22,8 @@ import org.springframework.core.io.support.EncodedResource;
* Thrown by {@link ScriptUtils} if a statement in an SQL script failed when
* executing it against the target database.
*
* @author Juergen Hoeller
* @author Sam Brannen
* @author Mark Paluch
* @since 5.3
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2020 the original author or authors.
* Copyright 2002-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,10 +17,11 @@
package org.springframework.r2dbc.connection.init;
/**
* Thrown when we cannot determine anything more specific than "something went wrong while
* processing an SQL script": for example, a {@link io.r2dbc.spi.R2dbcException} from
* R2DBC that we cannot pinpoint more precisely.
* Thrown when we cannot determine anything more specific than "something went wrong
* while processing an SQL script": for example, an {@link io.r2dbc.spi.R2dbcException}
* from R2DBC that we cannot pinpoint more precisely.
*
* @author Sam Brannen
* @author Mark Paluch
* @since 5.3
*/