Skip to content

Commit c8eafe7

Browse files
committed
Move Lock to relational module.
This allows both Spring Data R2DBC and Spring Data JDBC to use the same annotation. See /issues/1041, spring-projects/spring-data-r2dbc/pull/720, /pull/1158
1 parent 98d2b22 commit c8eafe7

File tree

7 files changed

+7
-3
lines changed

7 files changed

+7
-3
lines changed

spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/query/JdbcCountQueryCreator.java

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import org.springframework.data.relational.core.sql.Select;
2626
import org.springframework.data.relational.core.sql.SelectBuilder;
2727
import org.springframework.data.relational.core.sql.Table;
28+
import org.springframework.data.relational.repository.Lock;
2829
import org.springframework.data.relational.repository.query.RelationalEntityMetadata;
2930
import org.springframework.data.relational.repository.query.RelationalParameterAccessor;
3031
import org.springframework.data.repository.query.ReturnedType;

spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/query/JdbcQueryCreator.java

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
import org.springframework.data.relational.core.sql.StatementBuilder;
4242
import org.springframework.data.relational.core.sql.Table;
4343
import org.springframework.data.relational.core.sql.render.SqlRenderer;
44+
import org.springframework.data.relational.repository.Lock;
4445
import org.springframework.data.relational.repository.query.RelationalEntityMetadata;
4546
import org.springframework.data.relational.repository.query.RelationalParameterAccessor;
4647
import org.springframework.data.relational.repository.query.RelationalQueryCreator;

spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/query/JdbcQueryMethod.java

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import org.springframework.data.projection.ProjectionFactory;
2727
import org.springframework.data.relational.core.mapping.RelationalPersistentEntity;
2828
import org.springframework.data.relational.core.mapping.RelationalPersistentProperty;
29+
import org.springframework.data.relational.repository.Lock;
2930
import org.springframework.data.relational.repository.query.RelationalEntityMetadata;
3031
import org.springframework.data.relational.repository.query.RelationalParameters;
3132
import org.springframework.data.relational.repository.query.SimpleRelationalEntityMetadata;

spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/JdbcRepositoryIntegrationTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
import org.springframework.data.domain.Pageable;
5151
import org.springframework.data.domain.Slice;
5252
import org.springframework.data.jdbc.core.mapping.AggregateReference;
53-
import org.springframework.data.jdbc.repository.query.Lock;
53+
import org.springframework.data.relational.repository.Lock;
5454
import org.springframework.data.jdbc.repository.query.Modifying;
5555
import org.springframework.data.jdbc.repository.query.Query;
5656
import org.springframework.data.jdbc.repository.support.JdbcRepositoryFactory;

spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/query/JdbcQueryMethodUnitTests.java

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import org.springframework.data.jdbc.core.mapping.JdbcMappingContext;
2929
import org.springframework.data.projection.ProjectionFactory;
3030
import org.springframework.data.relational.core.sql.LockMode;
31+
import org.springframework.data.relational.repository.Lock;
3132
import org.springframework.data.repository.core.NamedQueries;
3233
import org.springframework.data.repository.core.RepositoryMetadata;
3334
import org.springframework.data.repository.core.support.PropertiesBasedNamedQueries;

spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/query/PartTreeJdbcQueryUnitTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@
4242
import org.springframework.data.relational.core.mapping.Embedded;
4343
import org.springframework.data.relational.core.mapping.MappedCollection;
4444
import org.springframework.data.relational.core.mapping.Table;
45-
import org.springframework.data.relational.core.sql.In;
4645
import org.springframework.data.relational.core.sql.LockMode;
46+
import org.springframework.data.relational.repository.Lock;
4747
import org.springframework.data.relational.repository.query.RelationalParametersParameterAccessor;
4848
import org.springframework.data.repository.NoRepositoryBean;
4949
import org.springframework.data.repository.Repository;

spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/query/Lock.java renamed to spring-data-relational/src/main/java/org/springframework/data/relational/repository/Lock.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package org.springframework.data.jdbc.repository.query;
16+
package org.springframework.data.relational.repository;
1717

1818
import org.springframework.data.annotation.QueryAnnotation;
1919
import org.springframework.data.relational.core.sql.LockMode;

0 commit comments

Comments
 (0)