Skip to content

Commit f64dcd3

Browse files
author
Keith Donald
committed
polish
1 parent 567dd1e commit f64dcd3

8 files changed

+32
-12
lines changed

org.springframework.jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/ConnectionProperties.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
package org.springframework.jdbc.datasource.embedded;
1717

1818
/**
19-
* Allows DataSource connection properties to be configured in a DataSource implementation independent manner.
19+
* DataSourceFactory helper that allows essential JDBC connection properties to be configured consistently,
20+
* independent of the actual DataSource implementation.
2021
* @author Keith Donald
2122
* @see DataSourceFactory
2223
*/

org.springframework.jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/DataSourceFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import org.springframework.jdbc.datasource.SimpleDriverDataSource;
2121

2222
/**
23-
* A factory for DataSource implementation, such as a {@link SimpleDriverDataSource} or connection pool such as Apache DBCP or c3p0.
23+
* Encapsulates the creation of a particular DataSource implementation, such as a {@link SimpleDriverDataSource} or connection pool such as Apache DBCP or c3p0.
2424
* Call {@link #getConnectionProperties()} to configure normalized DataSource properties before calling {@link #getDataSource()} to actually get the configured DataSource instance.
2525
* @author Keith Donald
2626
*/

org.springframework.jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/DatabasePopulator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import java.sql.SQLException;
2020

2121
/**
22-
* Strategy for populating a database with data.
22+
* Strategy used to populate an embedded database during initialization.
2323
* @author Keith Donald
2424
* @see ResourceDatabasePopulator
2525
*/

org.springframework.jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseConfigurerFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import org.springframework.util.Assert;
1919

2020
/**
21-
* Package private factory for mapping well-known {@link EmbeddedDatabaseType embedded database types} to
21+
* Maps well-known {@link EmbeddedDatabaseType embedded database types} to
2222
* {@link EmbeddedDatabaseConfigurer} strategies.
2323
* @author Keith Donald
2424
*/

org.springframework.jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseFactory.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@
2626
import org.springframework.util.Assert;
2727

2828
/**
29-
* Returns a {@link EmbeddedDatabase} instance pre-populated with test data. When the database is returned, callers are
30-
* guaranteed that the database schema and test data will have already been loaded.
29+
* Creates a {@link EmbeddedDatabase} instance.
30+
* Callers are guaranteed that the returned database has been fully initialized and populated.
3131
* <p>
3232
* Can be configured:<br>
3333
* Call {@link #setDatabaseName(String)} to change the name of the database.<br>
3434
* Call {@link #setDatabaseType(EmbeddedDatabaseType)} to set the database type if you wish to use one of the supported types.<br>
35-
* Call {@link #setDatabaseConfigurer(EmbeddedDatabaseConfigurer)} to set a configuration strategy for your own embedded database type.<br>
35+
* Call {@link #setDatabaseConfigurer(EmbeddedDatabaseConfigurer)} to configure support for your own embedded database type.<br>
3636
* Call {@link #setDatabasePopulator(DatabasePopulator)} to change the algorithm used to populate the database.<br>
3737
* Call {@link #setDataSourceFactory(DataSourceFactory)} to change the type of DataSource used to connect to the database.<br>
3838
* Call {@link #getDatabase()} to get the {@link EmbeddedDatabase} instance.<br>

org.springframework.jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseType.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
/**
1919
* A supported embedded database type.
2020
* @author Keith Donald
21-
* @see HsqlEmbeddedDatabaseConfigurer
2221
*/
2322
public enum EmbeddedDatabaseType {
2423
HSQL;

org.springframework.jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/ResourceDatabasePopulator.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,11 @@
3333
/**
3434
* Populates a database from schema and test-data SQL defined in external resources. By default, looks for a schema.sql
3535
* file and test-data.sql resource in the root of the classpath.
36-
*
37-
* May be configured. Call {@link #setSchemaLocation(Resource)} to configure the location of the database schema file.
38-
* Call {@link #setTestDataLocation(Resource)} to configure the location of the test data file. Call
39-
* {@link #setSqlScriptEncoding(String)} to set the encoding for the schema and test data SQL.
36+
* <p>
37+
* May be configured:<br>
38+
* Call {@link #setSchemaLocation(Resource)} to configure the location of the database schema file.<br>
39+
* Call {@link #setTestDataLocation(Resource)} to configure the location of the test data file.<br>
40+
* Call {@link #setSqlScriptEncoding(String)} to set the encoding for the schema and test data SQL.<br>
4041
*/
4142
public class ResourceDatabasePopulator implements DatabasePopulator {
4243

org.springframework.jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/SimpleDriverDataSourceFactory.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,28 @@
1+
/*
2+
* Copyright 2002-2009 the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
package org.springframework.jdbc.datasource.embedded;
217

318
import javax.sql.DataSource;
419

520
import org.springframework.jdbc.datasource.SimpleDriverDataSource;
621

22+
/**
23+
* Creates a {@link SimpleDriverDataSource}.
24+
* @author Keith Donald
25+
*/
726
final class SimpleDriverDataSourceFactory implements DataSourceFactory {
827

928
private SimpleDriverDataSource dataSource = new SimpleDriverDataSource();

0 commit comments

Comments
 (0)