Consistent formatting of license headers, package javadocs, and import declarations

This commit is contained in:
Juergen Hoeller
2014-10-21 00:30:42 +02:00
parent b6fdcffc94
commit 8325b10080
2059 changed files with 3944 additions and 5473 deletions

View File

@@ -18,6 +18,8 @@ package org.springframework.jdbc.config;
import java.util.List;
import org.w3c.dom.Element;
import org.springframework.beans.BeanMetadataElement;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.config.TypedStringValue;
@@ -27,7 +29,6 @@ import org.springframework.jdbc.datasource.init.CompositeDatabasePopulator;
import org.springframework.jdbc.datasource.init.ResourceDatabasePopulator;
import org.springframework.util.StringUtils;
import org.springframework.util.xml.DomUtils;
import org.w3c.dom.Element;
/**
* @author Juergen Hoeller

View File

@@ -1,6 +1,4 @@
/**
* Defines the Spring JDBC configuration namespace.
*/
package org.springframework.jdbc.config;

View File

@@ -16,9 +16,9 @@
package org.springframework.jdbc.core;
import java.util.List;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.util.List;
/**
* Generic utility methods for working with JDBC batch statements. Mainly for internal use

View File

@@ -16,12 +16,12 @@
package org.springframework.jdbc.core;
import org.springframework.jdbc.support.JdbcUtils;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import org.springframework.jdbc.support.JdbcUtils;
/**
* Implementation of RowCallbackHandler. Convenient superclass for callback handlers.
* An instance can only be used once.

View File

@@ -20,7 +20,6 @@ import java.sql.DatabaseMetaData;
import java.sql.SQLException;
import java.util.Arrays;
import java.util.List;
import javax.sql.DataSource;
import org.apache.commons.logging.Log;

View File

@@ -16,14 +16,14 @@
package org.springframework.jdbc.core.metadata;
import org.springframework.jdbc.core.SqlParameter;
import org.springframework.jdbc.core.SqlOutParameter;
import org.springframework.jdbc.core.ColumnMapRowMapper;
import java.sql.DatabaseMetaData;
import java.sql.SQLException;
import java.sql.Types;
import org.springframework.jdbc.core.ColumnMapRowMapper;
import org.springframework.jdbc.core.SqlOutParameter;
import org.springframework.jdbc.core.SqlParameter;
/**
* Oracle specific implementation for the {@link org.springframework.jdbc.core.metadata.CallMetaDataProvider} interface.
* This class is intended for internal use by the Simple JDBC classes.

View File

@@ -1,8 +1,4 @@
/**
*
* Context metadata abstraction for the configuration and execution of a stored procedure call.
*
*/
package org.springframework.jdbc.core.metadata;

View File

@@ -19,9 +19,9 @@ package org.springframework.jdbc.core.namedparam;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import org.springframework.jdbc.core.BatchPreparedStatementSetter;
import org.springframework.jdbc.core.BatchUpdateUtils;
import org.springframework.jdbc.core.JdbcOperations;
import org.springframework.jdbc.core.BatchPreparedStatementSetter;
/**
* Generic utility methods for working with JDBC batch statements using named parameters. Mainly for internal use

View File

@@ -18,6 +18,7 @@ package org.springframework.jdbc.core.namedparam;
import java.util.HashMap;
import java.util.Map;
import org.springframework.jdbc.core.SqlParameterValue;
/**

View File

@@ -1,5 +1,4 @@
/**
*
* JdbcTemplate variant with named parameter support.
*
* <p>NamedParameterJdbcTemplate is a wrapper around JdbcTemplate that adds
@@ -10,7 +9,5 @@
* <P>If you need the full power of Spring JDBC for less common operations, use
* the {@code getJdbcOperations()} method of NamedParameterJdbcTemplate and
* work with the returned classic template, or use a JdbcTemplate instance directly.
*
*/
package org.springframework.jdbc.core.namedparam;

View File

@@ -1,9 +1,5 @@
/**
*
* Provides the core JDBC framework, based on JdbcTemplate
* and its associated callback interfaces and helper objects.
*
*/
package org.springframework.jdbc.core;

View File

@@ -18,7 +18,6 @@ package org.springframework.jdbc.core.simple;
import java.util.Arrays;
import java.util.Map;
import javax.sql.DataSource;
import org.springframework.jdbc.core.JdbcTemplate;

View File

@@ -1,16 +1,8 @@
/**
*
* Simplification layer over JdbcTemplate for Java 5 and above.
*
* <p>{@code SimpleJdbcInsert} and {@code SimpleJdbcCall} are classes that takes advantage
* of database metadata provided by the JDBC driver to simplify the application code. Much of the
* parameter specification becomes unnecessary since it can be looked up in the metadata.
*
* Note: The {@code SimpleJdbcOperations} and {@code SimpleJdbcTemplate}, which provides a wrapper
* around JdbcTemplate to take advantage of Java 5 features like generics, varargs and autoboxing, is now deprecated
* since Spring 3.1. All functionality is now available in the {@code JdbcOperations} and
* {@code NamedParametersOperations} respectively.
*
*/
package org.springframework.jdbc.core.simple;

View File

@@ -19,7 +19,6 @@ package org.springframework.jdbc.core.support;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Properties;
import javax.sql.DataSource;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;

View File

@@ -17,7 +17,6 @@
package org.springframework.jdbc.core.support;
import java.sql.Connection;
import javax.sql.DataSource;
import org.springframework.dao.support.DaoSupport;

View File

@@ -1,8 +1,5 @@
/**
*
* Classes supporting the {@code org.springframework.jdbc.core} package.
* Contains a DAO base class for JdbcTemplate usage.
*
*/
package org.springframework.jdbc.core.support;

View File

@@ -17,7 +17,6 @@
package org.springframework.jdbc.datasource;
import java.sql.Connection;
import javax.sql.DataSource;
/**

View File

@@ -17,7 +17,6 @@
package org.springframework.jdbc.datasource.embedded;
import java.sql.Driver;
import javax.sql.DataSource;
import org.springframework.jdbc.datasource.SimpleDriverDataSource;

View File

@@ -1,8 +1,4 @@
/**
*
* Provides extensible support for creating embedded database instances.
*
*/
package org.springframework.jdbc.datasource.embedded;

View File

@@ -18,7 +18,6 @@ package org.springframework.jdbc.datasource.init;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

View File

@@ -17,7 +17,6 @@
package org.springframework.jdbc.datasource.init;
import java.sql.Connection;
import javax.sql.DataSource;
import org.springframework.dao.DataAccessException;

View File

@@ -20,7 +20,6 @@ import java.sql.Connection;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import javax.sql.DataSource;
import org.springframework.core.io.Resource;

View File

@@ -5,7 +5,7 @@
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,

View File

@@ -5,7 +5,7 @@
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -26,6 +26,7 @@ import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.core.io.Resource;
import org.springframework.core.io.support.EncodedResource;
import org.springframework.util.Assert;

View File

@@ -1,6 +1,4 @@
/**
* Provides extensible support for initializing databases through scripts.
*/
package org.springframework.jdbc.datasource.init;

View File

@@ -1,8 +1,4 @@
/**
*
* Provides a strategy for looking up JDBC DataSources by name.
*
*/
package org.springframework.jdbc.datasource.lookup;

View File

@@ -1,10 +1,6 @@
/**
*
* Provides a utility class for easy DataSource access,
* a PlatformTransactionManager for a single DataSource,
* and various simple DataSource implementations.
*
*/
package org.springframework.jdbc.datasource;

View File

@@ -18,9 +18,9 @@ package org.springframework.jdbc.object;
import java.util.Map;
import org.springframework.dao.InvalidDataAccessResourceUsageException;
import org.springframework.jdbc.core.RowMapper;
import org.springframework.util.Assert;
import org.springframework.dao.InvalidDataAccessResourceUsageException;
public class GenericSqlQuery<T> extends SqlQuery<T> {

View File

@@ -18,7 +18,6 @@ package org.springframework.jdbc.object;
import java.util.List;
import java.util.Map;
import javax.sql.DataSource;
import org.springframework.dao.DataAccessException;

View File

@@ -19,7 +19,6 @@ package org.springframework.jdbc.object;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Map;
import javax.sql.DataSource;
import org.springframework.jdbc.core.RowMapper;

View File

@@ -1,5 +1,4 @@
/**
*
* The classes in this package represent RDBMS queries, updates,
* and stored procedures as threadsafe, reusable objects. This approach
* is modelled by JDO, although of course objects returned by queries
@@ -14,7 +13,5 @@
* <p>This package and related packages are discussed in Chapter 9 of
* <a href="http://www.amazon.com/exec/obidos/tg/detail/-/0764543857/">Expert One-On-One J2EE Design and Development</a>
* by Rod Johnson (Wrox, 2002).
*
*/
package org.springframework.jdbc.object;

View File

@@ -1,6 +1,4 @@
/**
*
* The classes in this package make JDBC easier to use and
* reduce the likelihood of common errors. In particular, they:
* <ul>
@@ -18,7 +16,5 @@
* <p>This package and related packages are discussed in Chapter 9 of
* <a href="http://www.amazon.com/exec/obidos/tg/detail/-/0764543857/">Expert One-On-One J2EE Design and Development</a>
* by Rod Johnson (Wrox, 2002).
*
*/
package org.springframework.jdbc;

View File

@@ -19,7 +19,6 @@ package org.springframework.jdbc.support;
import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;
import javax.sql.DataSource;
import org.apache.commons.logging.Log;

View File

@@ -20,7 +20,6 @@ import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import javax.sql.DataSource;
import org.springframework.dao.DataAccessException;

View File

@@ -20,7 +20,6 @@ import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import javax.sql.DataSource;
import org.springframework.dao.DataAccessException;

View File

@@ -1,11 +1,7 @@
/**
*
* Provides a support framework for incrementing database table values
* via sequences, with implementations for various databases.
*
* <p>Can be used independently, for example in custom JDBC access code.
*
*/
package org.springframework.jdbc.support.incrementer;

View File

@@ -1,12 +1,8 @@
/**
*
* Provides a stategy interface for Large OBject handling,
* with implementations for various databases.
*
* <p>Can be used independently from jdbc.core and jdbc.object,
* for example in custom JDBC access code.
*
*/
package org.springframework.jdbc.support.lob;

View File

@@ -1,11 +1,7 @@
/**
*
* Provides a mechanism for extracting native implementations of JDBC
* interfaces from wrapper objects that got returned from connection pools.
*
* <p>Can be used independently, for example in custom JDBC access code.
*
*/
package org.springframework.jdbc.support.nativejdbc;

View File

@@ -1,13 +1,9 @@
/**
*
* Support classes for the JDBC framework, used by the classes in the
* jdbc.core and jdbc.object packages. Provides a translator from
* SQLExceptions Spring's generic DataAccessExceptions.
*
* <p>Can be used independently, for example in custom JDBC access code,
* or in JDBC-based O/R mapping layers.
*
*/
package org.springframework.jdbc.support;

View File

@@ -1,9 +1,5 @@
/**
*
* Provides a convenient holder for disconnected result sets.
* Supported by JdbcTemplate, but can be used independently too.
*
*/
package org.springframework.jdbc.support.rowset;

View File

@@ -20,7 +20,6 @@ import java.io.InputStream;
import java.io.Reader;
import java.sql.ResultSet;
import java.sql.SQLException;
import javax.xml.transform.Result;
import javax.xml.transform.Source;

View File

@@ -16,8 +16,8 @@
package org.springframework.jdbc.support.xml;
import java.io.OutputStream;
import java.io.IOException;
import java.io.OutputStream;
/**
* Interface defining handling involved with providing {@code OutputStream}

View File

@@ -16,8 +16,8 @@
package org.springframework.jdbc.support.xml;
import java.io.Writer;
import java.io.IOException;
import java.io.Writer;
/**
* Interface defining handling involved with providing {@code Writer}

View File

@@ -1,8 +1,4 @@
/**
*
* Abstraction for handling fields of SQLXML data type.
*
*/
package org.springframework.jdbc.support.xml;

View File

@@ -21,6 +21,7 @@ import javax.sql.DataSource;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.springframework.beans.PropertyValue;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;

View File

@@ -16,13 +16,12 @@
package org.springframework.jdbc.core;
import static org.junit.Assert.assertEquals;
import java.util.List;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.springframework.beans.TypeMismatchException;
import org.springframework.dao.InvalidDataAccessApiUsageException;
import org.springframework.jdbc.core.test.ConcretePerson;
@@ -30,6 +29,8 @@ import org.springframework.jdbc.core.test.ExtendedPerson;
import org.springframework.jdbc.core.test.Person;
import org.springframework.jdbc.core.test.SpacePerson;
import static org.junit.Assert.*;
/**
* @author Thomas Risberg
* @author Juergen Hoeller

View File

@@ -26,7 +26,6 @@ import java.sql.SQLException;
import java.sql.Statement;
import java.util.List;
import java.util.Map;
import javax.sql.DataSource;
import org.junit.Before;

View File

@@ -31,13 +31,13 @@ import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import javax.sql.DataSource;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.springframework.dao.DataAccessException;
import org.springframework.dao.InvalidDataAccessApiUsageException;
import org.springframework.jdbc.BadSqlGrammarException;

View File

@@ -25,10 +25,10 @@ import java.sql.Types;
import java.util.List;
import junit.framework.TestCase;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.springframework.jdbc.datasource.SingleConnectionDataSource;
import org.springframework.jdbc.support.SQLStateSQLExceptionTranslator;
import org.springframework.tests.sample.beans.TestBean;

View File

@@ -19,11 +19,12 @@ package org.springframework.jdbc.core.namedparam;
import java.sql.Types;
import java.util.Arrays;
import static org.junit.Assert.*;
import org.junit.Test;
import org.springframework.tests.sample.beans.TestBean;
import static org.junit.Assert.*;
/**
* @author Rick Evans
* @author Juergen Hoeller

View File

@@ -16,11 +16,12 @@
package org.springframework.jdbc.core.namedparam;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
import org.springframework.jdbc.core.SqlParameterValue;
import static org.junit.Assert.*;
/**
* @author Rick Evans
* @author Arjen Poutsma

View File

@@ -27,13 +27,13 @@ import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import javax.sql.DataSource;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.springframework.dao.DataAccessException;
import org.springframework.jdbc.Customer;
import org.springframework.jdbc.core.JdbcOperations;

View File

@@ -27,12 +27,12 @@ import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.sql.DataSource;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.springframework.jdbc.core.RowMapper;
import static org.junit.Assert.*;

View File

@@ -6,12 +6,12 @@ import java.sql.Types;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import javax.sql.DataSource;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.springframework.jdbc.core.SqlInOutParameter;
import org.springframework.jdbc.core.SqlOutParameter;
import org.springframework.jdbc.core.SqlParameter;

View File

@@ -16,18 +16,19 @@
package org.springframework.jdbc.core.simple;
import static org.junit.Assert.assertEquals;
import java.util.List;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.springframework.dao.InvalidDataAccessApiUsageException;
import org.springframework.jdbc.core.AbstractRowMapperTests;
import org.springframework.jdbc.core.test.ConcretePerson;
import org.springframework.jdbc.core.test.Person;
import static org.junit.Assert.*;
/**
* @author Thomas Risberg
*/

View File

@@ -22,13 +22,13 @@ import java.sql.DatabaseMetaData;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Types;
import javax.sql.DataSource;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.springframework.dao.InvalidDataAccessApiUsageException;
import org.springframework.jdbc.BadSqlGrammarException;
import org.springframework.jdbc.core.SqlOutParameter;

View File

@@ -20,7 +20,6 @@ import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.ResultSet;
import java.util.HashMap;
import javax.sql.DataSource;
import org.junit.After;
@@ -28,6 +27,7 @@ import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.springframework.dao.InvalidDataAccessApiUsageException;
import static org.mockito.BDDMockito.*;

View File

@@ -28,11 +28,11 @@ import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import javax.sql.DataSource;
import org.junit.Before;
import org.junit.Test;
import org.springframework.jdbc.core.JdbcOperations;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.namedparam.MapSqlParameterSource;

View File

@@ -23,11 +23,11 @@ import java.sql.Types;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import javax.sql.DataSource;
import org.junit.Before;
import org.junit.Test;
import org.springframework.jdbc.core.SqlParameterValue;
import org.springframework.jdbc.core.metadata.TableMetaDataContext;
import org.springframework.jdbc.core.namedparam.MapSqlParameterSource;

View File

@@ -19,10 +19,10 @@ package org.springframework.jdbc.core.support;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;
import javax.sql.DataSource;
import org.junit.Test;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.tests.sample.beans.TestBean;

View File

@@ -18,10 +18,10 @@ package org.springframework.jdbc.core.support;
import java.util.ArrayList;
import java.util.List;
import javax.sql.DataSource;
import org.junit.Test;
import org.springframework.jdbc.core.JdbcTemplate;
import static org.junit.Assert.*;

View File

@@ -24,6 +24,7 @@ import java.sql.SQLException;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.springframework.dao.DataAccessException;
import org.springframework.dao.IncorrectResultSizeDataAccessException;
import org.springframework.jdbc.LobRetrievalFailureException;

View File

@@ -29,6 +29,7 @@ import org.junit.rules.ExpectedException;
import org.mockito.ArgumentCaptor;
import org.mockito.Captor;
import org.mockito.MockitoAnnotations;
import org.springframework.jdbc.support.lob.LobCreator;
import org.springframework.jdbc.support.lob.LobHandler;

View File

@@ -21,7 +21,6 @@ import java.sql.SQLException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.sql.DataSource;
import javax.transaction.RollbackException;
import javax.transaction.Status;
@@ -33,6 +32,7 @@ import javax.transaction.UserTransaction;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.springframework.beans.factory.support.StaticListableBeanFactory;
import org.springframework.jdbc.datasource.lookup.BeanFactoryDataSourceLookup;
import org.springframework.jdbc.datasource.lookup.IsolationLevelDataSourceRouter;

View File

@@ -19,7 +19,6 @@ package org.springframework.jdbc.datasource;
import java.io.ByteArrayOutputStream;
import java.io.PrintWriter;
import java.sql.Connection;
import javax.sql.DataSource;
import org.junit.Test;

View File

@@ -18,7 +18,6 @@ package org.springframework.jdbc.datasource;
import java.sql.Connection;
import java.sql.SQLException;
import javax.sql.DataSource;
import org.junit.Test;

View File

@@ -17,6 +17,7 @@
package org.springframework.jdbc.datasource.embedded;
import org.junit.Test;
import org.springframework.core.io.ClassRelativeResourceLoader;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.datasource.init.CannotReadScriptException;

View File

@@ -19,6 +19,7 @@ package org.springframework.jdbc.datasource.embedded;
import javax.sql.DataSource;
import org.junit.Test;
import org.springframework.core.io.ClassRelativeResourceLoader;
import org.springframework.core.io.Resource;
import org.springframework.jdbc.core.JdbcTemplate;

View File

@@ -18,6 +18,7 @@ package org.springframework.jdbc.datasource.init;
import org.junit.After;
import org.junit.Before;
import org.springframework.core.io.ClassRelativeResourceLoader;
import org.springframework.core.io.Resource;
import org.springframework.jdbc.core.JdbcTemplate;

View File

@@ -20,6 +20,7 @@ import java.sql.Connection;
import java.sql.SQLException;
import org.junit.Test;
import org.springframework.jdbc.datasource.DataSourceUtils;
import org.springframework.transaction.support.TransactionSynchronizationManager;

View File

@@ -5,7 +5,7 @@
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -18,6 +18,7 @@ package org.springframework.jdbc.datasource.init;
import org.junit.Test;
import org.mockito.Mockito;
import org.springframework.core.io.Resource;
import static org.junit.Assert.*;

View File

@@ -5,7 +5,7 @@
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -19,6 +19,7 @@ package org.springframework.jdbc.datasource.init;
import java.sql.SQLException;
import org.junit.Test;
import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType;
import static org.springframework.jdbc.datasource.init.ScriptUtils.*;

View File

@@ -5,7 +5,7 @@
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -20,6 +20,7 @@ import java.util.ArrayList;
import java.util.List;
import org.junit.Test;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.support.EncodedResource;

View File

@@ -19,6 +19,7 @@ package org.springframework.jdbc.datasource.lookup;
import javax.sql.DataSource;
import org.junit.Test;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.BeanNotOfRequiredTypeException;

View File

@@ -16,13 +16,13 @@
package org.springframework.jdbc.datasource.lookup;
import static org.junit.Assert.*;
import javax.naming.NamingException;
import javax.sql.DataSource;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* @author Rick Evans
* @author Chris Beams

View File

@@ -16,15 +16,14 @@
package org.springframework.jdbc.datasource.lookup;
import static org.junit.Assert.*;
import java.util.HashMap;
import java.util.Map;
import javax.sql.DataSource;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* @author Rick Evans
* @author Chris Beams

View File

@@ -20,10 +20,10 @@ import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.PreparedStatement;
import java.sql.Types;
import javax.sql.DataSource;
import org.junit.Test;
import org.springframework.jdbc.core.SqlParameter;
import static org.junit.Assert.*;

View File

@@ -1,11 +1,11 @@
package org.springframework.jdbc.object;
import org.springframework.jdbc.core.RowMapper;
import org.springframework.jdbc.Customer;
import java.sql.ResultSet;
import java.sql.SQLException;
import org.springframework.jdbc.Customer;
import org.springframework.jdbc.core.RowMapper;
public class CustomerMapper implements RowMapper<Customer> {
private static final String[] COLUMN_NAMES = new String[] {"id", "forename"};

View File

@@ -25,11 +25,11 @@ import java.sql.Types;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.sql.DataSource;
import org.junit.Before;
import org.junit.Test;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;

View File

@@ -21,7 +21,6 @@ import java.sql.Connection;
import java.sql.Types;
import java.util.HashMap;
import java.util.Map;
import javax.sql.DataSource;
import org.junit.Test;

View File

@@ -19,7 +19,6 @@ package org.springframework.jdbc.object;
import java.sql.Types;
import java.util.HashMap;
import java.util.Map;
import javax.sql.DataSource;
import junit.framework.TestCase;

View File

@@ -27,13 +27,13 @@ import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.sql.DataSource;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.springframework.dao.IncorrectResultSizeDataAccessException;
import org.springframework.dao.InvalidDataAccessApiUsageException;
import org.springframework.jdbc.Customer;

View File

@@ -24,7 +24,6 @@ import java.sql.SQLException;
import java.sql.Types;
import java.util.HashMap;
import java.util.Map;
import javax.sql.DataSource;
import org.junit.After;
@@ -32,6 +31,7 @@ import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.springframework.jdbc.JdbcUpdateAffectedIncorrectNumberOfRowsException;
import org.springframework.jdbc.core.SqlParameter;
import org.springframework.jdbc.support.GeneratedKeyHolder;

View File

@@ -26,7 +26,6 @@ import java.sql.Types;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.sql.DataSource;
import org.junit.After;
@@ -34,6 +33,7 @@ import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.springframework.dao.DataAccessException;
import org.springframework.dao.InvalidDataAccessApiUsageException;
import org.springframework.jdbc.BadSqlGrammarException;

View File

@@ -17,6 +17,7 @@
package org.springframework.jdbc.support;
import java.sql.SQLException;
import org.junit.Before;
import org.junit.Test;

View File

@@ -16,11 +16,11 @@
package org.springframework.jdbc.support;
import java.sql.SQLException;
import org.springframework.dao.DataAccessException;
import org.springframework.dao.TransientDataAccessResourceException;
import java.sql.SQLException;
/**
* Custom SQLException translation for testing.
*

View File

@@ -25,6 +25,7 @@ import java.sql.SQLException;
import java.sql.Statement;
import org.junit.Test;
import org.springframework.jdbc.support.nativejdbc.CommonsDbcpNativeJdbcExtractor;
import org.springframework.jdbc.support.nativejdbc.SimpleNativeJdbcExtractor;

View File

@@ -20,10 +20,10 @@ import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.SQLException;
import java.util.Arrays;
import javax.sql.DataSource;
import org.junit.Test;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;

View File

@@ -16,16 +16,16 @@
package org.springframework.jdbc.support;
import org.springframework.dao.DataAccessException;
import org.springframework.dao.TransientDataAccessResourceException;
import org.springframework.jdbc.BadSqlGrammarException;
import java.sql.SQLException;
import junit.framework.TestCase;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import org.junit.Test;
import org.springframework.dao.DataAccessException;
import org.springframework.dao.TransientDataAccessResourceException;
import org.springframework.jdbc.BadSqlGrammarException;
/**
* Class to test custom SQLException translation.

View File

@@ -16,11 +16,10 @@
package org.springframework.jdbc.support;
import static org.junit.Assert.*;
import java.sql.SQLException;
import org.junit.Test;
import org.springframework.dao.ConcurrencyFailureException;
import org.springframework.dao.DataAccessException;
import org.springframework.dao.DataAccessResourceFailureException;
@@ -29,6 +28,8 @@ import org.springframework.dao.TransientDataAccessResourceException;
import org.springframework.jdbc.BadSqlGrammarException;
import org.springframework.jdbc.UncategorizedSQLException;
import static org.junit.Assert.*;
/**
* @author Rick Evans
* @author Juergen Hoeller

View File

@@ -27,6 +27,7 @@ import java.sql.Timestamp;
import org.junit.Before;
import org.junit.Test;
import org.springframework.jdbc.InvalidResultSetAccessException;
import static org.junit.Assert.*;