Add @FunctionalInterface on candidate interfaces

Issue: SPR-14432
This commit is contained in:
Stephane Nicoll
2016-07-06 14:32:13 +02:00
parent 912b63ad44
commit e4b0486c5a
110 changed files with 199 additions and 84 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2016 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.
@@ -40,6 +40,7 @@ import org.springframework.dao.DataAccessException;
* @see JdbcTemplate#execute(String, CallableStatementCallback)
* @see JdbcTemplate#execute(CallableStatementCreator, CallableStatementCallback)
*/
@FunctionalInterface
public interface CallableStatementCallback<T> {
/**

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2016 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.
@@ -40,6 +40,7 @@ import java.sql.SQLException;
* @see JdbcTemplate#call
* @see SqlProvider
*/
@FunctionalInterface
public interface CallableStatementCreator {
/**

View File

@@ -37,6 +37,7 @@ import org.springframework.dao.DataAccessException;
* @see JdbcTemplate#query
* @see JdbcTemplate#update
*/
@FunctionalInterface
public interface ConnectionCallback<T> {
/**

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2016 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.
@@ -30,6 +30,7 @@ import java.util.Map;
* @see CallableStatementCreatorFactory#newCallableStatementCreator(ParameterMapper)
* @see org.springframework.jdbc.object.StoredProcedure#execute(ParameterMapper)
*/
@FunctionalInterface
public interface ParameterMapper {
/**

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 the original author or authors.
* Copyright 2002-2016 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.
@@ -37,6 +37,7 @@ import java.sql.SQLException;
* @since 3.1
* @see JdbcTemplate#batchUpdate(String, java.util.Collection, int, ParameterizedPreparedStatementSetter)
*/
@FunctionalInterface
public interface ParameterizedPreparedStatementSetter<T> {
/**

View File

@@ -40,6 +40,7 @@ import org.springframework.dao.DataAccessException;
* @see JdbcTemplate#execute(String, PreparedStatementCallback)
* @see JdbcTemplate#execute(PreparedStatementCreator, PreparedStatementCallback)
*/
@FunctionalInterface
public interface PreparedStatementCallback<T> {
/**

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2016 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.
@@ -40,6 +40,7 @@ import java.sql.SQLException;
* @see JdbcTemplate#update(PreparedStatementCreator)
* @see SqlProvider
*/
@FunctionalInterface
public interface PreparedStatementCreator {
/**

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2016 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.
@@ -40,6 +40,7 @@ import java.sql.SQLException;
* @see JdbcTemplate#update(String, PreparedStatementSetter)
* @see JdbcTemplate#query(String, PreparedStatementSetter, ResultSetExtractor)
*/
@FunctionalInterface
public interface PreparedStatementSetter {
/**

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2016 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.
@@ -46,6 +46,7 @@ import org.springframework.dao.DataAccessException;
* @see RowMapper
* @see org.springframework.jdbc.core.support.AbstractLobStreamingResultSetExtractor
*/
@FunctionalInterface
public interface ResultSetExtractor<T> {
/**

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2016 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.
@@ -42,6 +42,7 @@ import java.sql.SQLException;
* @see ResultSetExtractor
* @see RowCountCallbackHandler
*/
@FunctionalInterface
public interface RowCallbackHandler {
/**

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2016 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.
@@ -45,6 +45,7 @@ import java.sql.SQLException;
* @see ResultSetExtractor
* @see org.springframework.jdbc.object.MappingSqlQuery
*/
@FunctionalInterface
public interface RowMapper<T> {
/**

View File

@@ -33,6 +33,7 @@ import org.springframework.dao.DataAccessException;
* @since 16.03.2004
* @see JdbcTemplate#execute(StatementCallback)
*/
@FunctionalInterface
public interface StatementCallback<T> {
/**

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 the original author or authors.
* Copyright 2002-2016 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,6 +29,7 @@ import java.sql.SQLException;
* @see DatabasePopulatorUtils
* @see DataSourceInitializer
*/
@FunctionalInterface
public interface DatabasePopulator {
/**

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2016 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,6 +29,7 @@ import javax.sql.DataSource;
* @since 2.0
* @see org.springframework.orm.jpa.persistenceunit.DefaultPersistenceUnitManager#setDataSourceLookup
*/
@FunctionalInterface
public interface DataSourceLookup {
/**

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2016 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,7 @@ import java.sql.SQLException;
* @author Thomas Risberg
* @see JdbcUtils#extractDatabaseMetaData
*/
@FunctionalInterface
public interface DatabaseMetaDataCallback {
/**

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2016 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.
@@ -33,6 +33,7 @@ import org.springframework.dao.DataAccessException;
* @author Juergen Hoeller
* @see org.springframework.dao.DataAccessException
*/
@FunctionalInterface
public interface SQLExceptionTranslator {
/**