From 06076db51f161c2333cb6d0ee2afff7c82b7790c Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 15 Nov 2024 14:13:25 +0100 Subject: [PATCH 01/87] Prepare next development iteration. See #3646 --- pom.xml | 2 +- spring-data-envers/pom.xml | 4 ++-- spring-data-jpa-distribution/pom.xml | 2 +- spring-data-jpa/pom.xml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index c8e8a9ae06..bef85132e6 100755 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.springframework.data spring-data-jpa-parent - 3.4.0 + 3.4.1-SNAPSHOT pom Spring Data JPA Parent diff --git a/spring-data-envers/pom.xml b/spring-data-envers/pom.xml index d83c8dd464..e47a1201e6 100755 --- a/spring-data-envers/pom.xml +++ b/spring-data-envers/pom.xml @@ -5,12 +5,12 @@ org.springframework.data spring-data-envers - 3.4.0 + 3.4.1-SNAPSHOT org.springframework.data spring-data-jpa-parent - 3.4.0 + 3.4.1-SNAPSHOT ../pom.xml diff --git a/spring-data-jpa-distribution/pom.xml b/spring-data-jpa-distribution/pom.xml index 9b0bc40b31..9b133f1b1b 100644 --- a/spring-data-jpa-distribution/pom.xml +++ b/spring-data-jpa-distribution/pom.xml @@ -14,7 +14,7 @@ org.springframework.data spring-data-jpa-parent - 3.4.0 + 3.4.1-SNAPSHOT ../pom.xml diff --git a/spring-data-jpa/pom.xml b/spring-data-jpa/pom.xml index 3711d26d84..22bf65d587 100644 --- a/spring-data-jpa/pom.xml +++ b/spring-data-jpa/pom.xml @@ -6,7 +6,7 @@ org.springframework.data spring-data-jpa - 3.4.0 + 3.4.1-SNAPSHOT Spring Data JPA Spring Data module for JPA repositories. @@ -15,7 +15,7 @@ org.springframework.data spring-data-jpa-parent - 3.4.0 + 3.4.1-SNAPSHOT ../pom.xml From 7d2bdf589cb88a09d64c3c594fd773077f05024b Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 15 Nov 2024 14:13:26 +0100 Subject: [PATCH 02/87] After release cleanups. See #3646 --- Jenkinsfile | 2 +- pom.xml | 20 ++++++++++++++++---- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 915e46ddb7..119aa608fd 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,7 +9,7 @@ pipeline { triggers { pollSCM 'H/10 * * * *' - upstream(upstreamProjects: "spring-data-commons/main", threshold: hudson.model.Result.SUCCESS) + upstream(upstreamProjects: "spring-data-commons/3.4.x", threshold: hudson.model.Result.SUCCESS) } options { diff --git a/pom.xml b/pom.xml index bef85132e6..92fc11728b 100755 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.springframework.data.build spring-data-parent - 3.4.0 + 3.4.1-SNAPSHOT @@ -41,7 +41,7 @@ 5.0 9.1.0 42.7.4 - 3.4.0 + 3.4.1-SNAPSHOT 0.10.3 org.hibernate @@ -289,8 +289,20 @@ - - + + spring-snapshot + https://repo.spring.io/snapshot + + true + + + false + + + + spring-milestone + https://repo.spring.io/milestone + From f5adc049e5af8bd2121e6280e1c4defbdfec6bda Mon Sep 17 00:00:00 2001 From: Christoph Strobl Date: Tue, 19 Nov 2024 13:46:41 +0100 Subject: [PATCH 03/87] Lift restriction on empty `JpaEntityGraph` attributes. This commit removes a check preventing EntityGraphs from being created for JpaEntityGraphs without attributes. Original pull request: #3684 Closes #3682 --- .../data/jpa/repository/query/Jpa21Utils.java | 1 - .../data/jpa/repository/query/Jpa21UtilsTests.java | 10 ++++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/Jpa21Utils.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/Jpa21Utils.java index e436624215..e3133719f3 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/Jpa21Utils.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/Jpa21Utils.java @@ -129,7 +129,6 @@ private static EntityGraph createDynamicEntityGraph(EntityManager em, JpaEnti Assert.notNull(em, "EntityManager must not be null"); Assert.notNull(jpaEntityGraph, "JpaEntityGraph must not be null"); Assert.notNull(entityType, "Entity type must not be null"); - Assert.isTrue(jpaEntityGraph.isAdHocEntityGraph(), "The given " + jpaEntityGraph + " is not dynamic"); EntityGraph entityGraph = em.createEntityGraph(entityType); configureFetchGraphFrom(jpaEntityGraph, entityGraph); diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/Jpa21UtilsTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/Jpa21UtilsTests.java index f09d50be0e..64c015ca49 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/Jpa21UtilsTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/Jpa21UtilsTests.java @@ -50,6 +50,7 @@ * @author Mark Paluch * @author Jens Schauder * @author Krzysztof Krason + * @author Christoph Strobl */ @ExtendWith(SpringExtension.class) @ContextConfiguration("classpath:application-context.xml") @@ -166,6 +167,15 @@ void errorsOnUnknownProperties() { em.createEntityGraph(User.class))); } + @Test // GH-3682 + void allowsEmptyGraph() { + + EntityGraph graph = em.createEntityGraph(User.class); + Jpa21Utils.configureFetchGraphFrom(new JpaEntityGraph("User.NoNamedEntityGraphAvailable", EntityGraphType.FETCH, new String[0]), graph); + + Assertions.assertThat(graph.getAttributeNodes()).isEmpty(); + } + /** * Lookup the {@link AttributeNode} with given {@literal nodeName} in the root of the given {@literal graph}. */ From ce062072bfe3a99da5197019face7ff771dcc16d Mon Sep 17 00:00:00 2001 From: Christoph Strobl Date: Tue, 19 Nov 2024 15:52:10 +0100 Subject: [PATCH 04/87] Deprecate `JpaEntityGraph.isAdHocEntityGraph()` method. An EntityGraph without attributes is valid. Therefore it is not possible to determine if a given JpaEntityGraph is a dynamic one just by looking at the attributes alone. Original pull request: #3684 See #3682 --- .../data/jpa/repository/query/JpaEntityGraph.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaEntityGraph.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaEntityGraph.java index d1a6b45935..32d86e503d 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaEntityGraph.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaEntityGraph.java @@ -15,7 +15,6 @@ */ package org.springframework.data.jpa.repository.query; -import java.util.Arrays; import java.util.List; import org.springframework.data.jpa.repository.EntityGraph; @@ -29,12 +28,11 @@ * * @author Thomas Darimont * @author Mark Paluch + * @author Christoph Strobl * @since 1.6 */ public class JpaEntityGraph { - private static String[] EMPTY_ATTRIBUTE_PATHS = {}; - private final String name; private final EntityGraphType type; private final List attributePaths; @@ -46,8 +44,8 @@ public class JpaEntityGraph { * @param nameFallback must not be {@literal null} or empty. */ public JpaEntityGraph(EntityGraph entityGraph, String nameFallback) { - this(StringUtils.hasText(entityGraph.value()) ? entityGraph.value() : nameFallback, entityGraph.type(), entityGraph - .attributePaths()); + this(StringUtils.hasText(entityGraph.value()) ? entityGraph.value() : nameFallback, entityGraph.type(), + entityGraph.attributePaths()); } /** @@ -65,7 +63,7 @@ public JpaEntityGraph(String name, EntityGraphType type, @Nullable String[] attr this.name = name; this.type = type; - this.attributePaths = Arrays.asList(attributePaths == null ? EMPTY_ATTRIBUTE_PATHS : attributePaths); + this.attributePaths = attributePaths != null ? List.of(attributePaths) : List.of(); } /** @@ -99,9 +97,12 @@ public List getAttributePaths() { /** * Return {@literal true} if this {@link JpaEntityGraph} needs to be generated on-the-fly. * - * @return + * @return {@literal true} if {@link #attributePaths} is not empty. * @since 1.9 + * @deprecated since 3.4.1 as the used evaluation does not represent whether a {@link JpaEntityGraph} is dynamic or + * not. */ + @Deprecated(since = "3.4.1", forRemoval = true) public boolean isAdHocEntityGraph() { return !attributePaths.isEmpty(); } From 665109501e03c77d668e7ae02d9892fec2a11ccf Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Thu, 21 Nov 2024 09:58:43 +0100 Subject: [PATCH 05/87] Polishing. Remove JPA 2.1 guards as we require JPA 3.x. Refine API to reduce nullability. Original pull request: #3684 See #3682 --- .../repository/query/AbstractJpaQuery.java | 2 +- .../data/jpa/repository/query/Jpa21Utils.java | 52 +++++-------------- .../repository/support/DefaultQueryHints.java | 6 +-- .../modules/ROOT/pages/jpa/query-methods.adoc | 2 +- 4 files changed, 17 insertions(+), 45 deletions(-) diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/AbstractJpaQuery.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/AbstractJpaQuery.java index 5742a1ea4e..bbde6d9414 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/AbstractJpaQuery.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/AbstractJpaQuery.java @@ -256,7 +256,7 @@ private Query applyEntityGraphConfiguration(Query query, JpaQueryMethod method) JpaEntityGraph entityGraph = method.getEntityGraph(); if (entityGraph != null) { - QueryHints hints = Jpa21Utils.getFetchGraphHint(em, method.getEntityGraph(), + QueryHints hints = Jpa21Utils.getFetchGraphHint(em, entityGraph, getQueryMethod().getEntityInformation().getJavaType()); hints.forEach(query::setHint); diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/Jpa21Utils.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/Jpa21Utils.java index e3133719f3..8605786fc3 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/Jpa21Utils.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/Jpa21Utils.java @@ -15,24 +15,21 @@ */ package org.springframework.data.jpa.repository.query; -import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - import jakarta.persistence.AttributeNode; import jakarta.persistence.EntityGraph; import jakarta.persistence.EntityManager; import jakarta.persistence.Query; import jakarta.persistence.Subgraph; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + import org.springframework.data.jpa.repository.support.MutableQueryHints; import org.springframework.data.jpa.repository.support.QueryHints; import org.springframework.lang.Nullable; import org.springframework.util.Assert; -import org.springframework.util.ClassUtils; import org.springframework.util.ObjectUtils; -import org.springframework.util.ReflectionUtils; import org.springframework.util.StringUtils; /** @@ -48,38 +45,16 @@ */ public class Jpa21Utils { - private static final @Nullable Method GET_ENTITY_GRAPH_METHOD; - private static final boolean JPA21_AVAILABLE = ClassUtils.isPresent("jakarta.persistence.NamedEntityGraph", - Jpa21Utils.class.getClassLoader()); - - static { - - if (JPA21_AVAILABLE) { - GET_ENTITY_GRAPH_METHOD = ReflectionUtils.findMethod(EntityManager.class, "getEntityGraph", String.class); - } else { - GET_ENTITY_GRAPH_METHOD = null; - } - } - private Jpa21Utils() { // prevent instantiation } - public static QueryHints getFetchGraphHint(EntityManager em, @Nullable JpaEntityGraph entityGraph, - Class entityType) { + public static QueryHints getFetchGraphHint(EntityManager em, JpaEntityGraph entityGraph, Class entityType) { MutableQueryHints result = new MutableQueryHints(); - if (entityGraph == null) { - return result; - } - EntityGraph graph = tryGetFetchGraph(em, entityGraph, entityType); - if (graph == null) { - return result; - } - result.add(entityGraph.getType().getKey(), graph); return result; } @@ -94,24 +69,21 @@ public static QueryHints getFetchGraphHint(EntityManager em, @Nullable JpaEntity * @param entityType must not be {@literal null}. * @return the {@link EntityGraph} described by the given {@code entityGraph}. */ - @Nullable private static EntityGraph tryGetFetchGraph(EntityManager em, JpaEntityGraph jpaEntityGraph, Class entityType) { Assert.notNull(em, "EntityManager must not be null"); Assert.notNull(jpaEntityGraph, "EntityGraph must not be null"); Assert.notNull(entityType, "EntityType must not be null"); - Assert.isTrue(JPA21_AVAILABLE, "The EntityGraph-Feature requires at least a JPA 2.1 persistence provider"); - Assert.isTrue(GET_ENTITY_GRAPH_METHOD != null, - "It seems that you have the JPA 2.1 API but a JPA 2.0 implementation on the classpath"); + if (StringUtils.hasText(jpaEntityGraph.getName())) { - try { - // first check whether an entityGraph with that name is already registered. - return em.getEntityGraph(jpaEntityGraph.getName()); - } catch (Exception ex) { - // try to create and dynamically register the entityGraph - return createDynamicEntityGraph(em, jpaEntityGraph, entityType); + try { + // check whether an entityGraph with that name is already registered. + return em.getEntityGraph(jpaEntityGraph.getName()); + } catch (Exception ignore) {} } + + return createDynamicEntityGraph(em, jpaEntityGraph, entityType); } /** diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/DefaultQueryHints.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/DefaultQueryHints.java index bbf5b12a9a..f5ff87be63 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/DefaultQueryHints.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/DefaultQueryHints.java @@ -15,11 +15,11 @@ */ package org.springframework.data.jpa.repository.support; +import jakarta.persistence.EntityManager; + import java.util.Optional; import java.util.function.BiConsumer; -import jakarta.persistence.EntityManager; - import org.springframework.data.jpa.repository.EntityGraph; import org.springframework.data.jpa.repository.query.Jpa21Utils; import org.springframework.data.jpa.repository.query.JpaEntityGraph; @@ -99,7 +99,7 @@ private QueryHints getFetchGraphs() { return Optionals .mapIfAllPresent(entityManager, metadata.getEntityGraph(), (em, graph) -> Jpa21Utils.getFetchGraphHint(em, getEntityGraph(graph), information.getJavaType())) - .orElse(new MutableQueryHints()); + .orElseGet(MutableQueryHints::new); } private JpaEntityGraph getEntityGraph(EntityGraph entityGraph) { diff --git a/src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc b/src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc index 8657d42ae4..2eb3da8bdd 100644 --- a/src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc +++ b/src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc @@ -824,7 +824,7 @@ public interface GroupRepository extends CrudRepository { It is also possible to define ad hoc entity graphs by using `@EntityGraph`. The provided `attributePaths` are translated into the according `EntityGraph` without needing to explicitly add `@NamedEntityGraph` to your domain types, as shown in the following example: -.Using AD-HOC entity graph definition on an repository query method. +.Using ad-hoc entity graph definitions on a repository query method ==== [source, java] ---- From d203031dfb3ed471c903af09051abc9c747b3750 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Tue, 26 Nov 2024 16:07:14 +0100 Subject: [PATCH 06/87] Consider CONFLICT clause on INSERT in HQL. Closes: #3689 Original Pull Request: #3691 --- .../data/jpa/repository/query/Hql.g4 | 24 ++++++- .../repository/query/HqlQueryRenderer.java | 65 +++++++++++++++++++ .../query/HqlSpecificationTests.java | 33 +++++++--- 3 files changed, 112 insertions(+), 10 deletions(-) diff --git a/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Hql.g4 b/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Hql.g4 index 54a93e9ebf..42c1598768 100644 --- a/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Hql.g4 +++ b/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Hql.g4 @@ -147,7 +147,7 @@ deleteStatement // https://docs.jboss.org/hibernate/orm/6.1/userguide/html_single/Hibernate_User_Guide.html#hql-insert insertStatement - : INSERT INTO? targetEntity targetFields (queryExpression | valuesList) + : INSERT INTO? targetEntity targetFields (queryExpression | valuesList) conflictClause? ; // Already defined underneath updateStatement @@ -167,6 +167,23 @@ values : '(' expression (',' expression)* ')' ; +/** + * a 'conflict' clause in an 'insert' statement + */ +conflictClause + : ON CONFLICT conflictTarget? DO conflictAction + ; + +conflictTarget + : ON CONSTRAINT identifier + | '(' simplePath (',' simplePath)* ')' + ; + +conflictAction + : NOTHING + | UPDATE setClause whereClause? + ; + instantiation : NEW instantiationTarget '(' instantiationArguments ')' ; @@ -921,7 +938,11 @@ CURRENT_DATE : C U R R E N T '_' D A T E; CURRENT_INSTANT : C U R R E N T '_' I N S T A N T; CURRENT_TIME : C U R R E N T '_' T I M E; CURRENT_TIMESTAMP : C U R R E N T '_' T I M E S T A M P; +CONFLICT : C O N F L I C T; +CONSTRAINT : C O N S T R A I N T; +COLUMN : C O L U M N; CYCLE : C Y C L E; +DO : D O; DATE : D A T E; DATETIME : D A T E T I M E ; DAY : D A Y; @@ -1009,6 +1030,7 @@ NEW : N E W; NEXT : N E X T; NO : N O; NOT : N O T; +NOTHING : N O T H I N G; NULL : N U L L; NULLS : N U L L S; OBJECT : O B J E C T; diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryRenderer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryRenderer.java index 9976347f1d..127068f4a4 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryRenderer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryRenderer.java @@ -24,6 +24,7 @@ import org.antlr.v4.runtime.tree.ParseTree; import org.springframework.data.jpa.repository.query.QueryRenderer.QueryRendererBuilder; +import org.springframework.util.ObjectUtils; /** * An ANTLR {@link org.antlr.v4.runtime.tree.ParseTreeVisitor} that renders an HQL query without making any changes. @@ -545,6 +546,10 @@ public QueryTokenStream visitInsertStatement(HqlParser.InsertStatementContext ct builder.appendExpression(visit(ctx.valuesList())); } + if (ctx.conflictClause() != null) { + builder.appendExpression(visit(ctx.conflictClause())); + } + return builder; } @@ -583,6 +588,66 @@ public QueryTokenStream visitValues(HqlParser.ValuesContext ctx) { return builder; } + @Override + public QueryTokenStream visitConflictClause(HqlParser.ConflictClauseContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + + builder.append(QueryTokens.expression(ctx.ON())); + builder.append(QueryTokens.expression(ctx.CONFLICT())); + + if (ctx.conflictTarget() != null) { + builder.appendExpression(visit(ctx.conflictTarget())); + } + + builder.append(QueryTokens.expression(ctx.DO())); + builder.appendExpression(visit(ctx.conflictAction())); + + return builder; + } + + @Override + public QueryTokenStream visitConflictTarget(HqlParser.ConflictTargetContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + + if (ctx.identifier() != null) { + + builder.append(QueryTokens.expression(ctx.ON())); + builder.append(QueryTokens.expression(ctx.CONSTRAINT())); + builder.appendExpression(visit(ctx.identifier())); + } + + if (!ObjectUtils.isEmpty(ctx.simplePath())) { + + builder.append(TOKEN_OPEN_PAREN); + builder.append(QueryTokenStream.concat(ctx.simplePath(), this::visit, TOKEN_COMMA)); + + builder.append(TOKEN_CLOSE_PAREN); + } + + return builder; + } + + @Override + public QueryTokenStream visitConflictAction(HqlParser.ConflictActionContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + + if (ctx.NOTHING() != null) { + builder.append(QueryTokens.expression(ctx.NOTHING())); + } else { + builder.append(QueryTokens.expression(ctx.UPDATE())); + builder.appendExpression(visit(ctx.setClause())); + + if (ctx.whereClause() != null) { + builder.appendExpression(visit(ctx.whereClause())); + } + } + + return builder; + } + @Override public QueryTokenStream visitInstantiation(HqlParser.InstantiationContext ctx) { diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlSpecificationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlSpecificationTests.java index 62efc2fdc2..3e459fa26e 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlSpecificationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlSpecificationTests.java @@ -983,6 +983,29 @@ void theRest38() { """); } + @Test // GH-3689 + void insertQueries() { + + assertQuery("insert Person (id, name) values (100L, 'Jane Doe')"); + + assertQuery("insert Person (id, name) values " + // + "(101L, 'J A Doe III'), " + // + "(102L, 'J X Doe'), " + // + "(103L, 'John Doe, Jr')"); + + assertQuery("insert into Partner (id, name) " + // + "select p.id, p.name from Person p "); + + assertQuery("INSERT INTO AggregationPrice (range, price, type) " + "VALUES (:range, :price, :priceType) " + + "ON CONFLICT (range) DO UPDATE SET price = :price, type = :priceType"); + + assertQuery("INSERT INTO AggregationPrice (range, price, type) " + "VALUES (:range, :price, :priceType) " + + "ON CONFLICT ON CONSTRAINT foo DO UPDATE SET price = :price, type = :priceType"); + + assertQuery("INSERT INTO AggregationPrice (range, price, type) " + "VALUES (:range, :price, :priceType) " + + "ON CONFLICT ON CONSTRAINT foo DO NOTHING"); + } + @Test void hqlQueries() { @@ -1000,15 +1023,7 @@ void hqlQueries() { assertQuery("update versioned Person " + // "set name = :newName " + // "where name = :oldName"); - assertQuery("insert Person (id, name) " + // - "values (100L, 'Jane Doe')"); - assertQuery("insert Person (id, name) " + // - "values (101L, 'J A Doe III'), " + // - "(102L, 'J X Doe'), " + // - "(103L, 'John Doe, Jr')"); - assertQuery("insert into Partner (id, name) " + // - "select p.id, p.name " + // - "from Person p "); + assertQuery("select p " + // "from Person p " + // "where p.name like 'Joe'"); From 1658b9bde05f800d40d19111a1e14b45c610ca70 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Tue, 26 Nov 2024 16:49:10 +0100 Subject: [PATCH 07/87] Add support for missing clauses and functions. Original Pull Request: #3691 --- .../data/jpa/repository/query/Hql.g4 | 584 ++++++- .../repository/query/HqlQueryRenderer.java | 1485 +++++++++++++---- .../query/HqlQueryRendererTests.java | 9 +- .../query/HqlSpecificationTests.java | 255 ++- 4 files changed, 1919 insertions(+), 414 deletions(-) diff --git a/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Hql.g4 b/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Hql.g4 index 42c1598768..728d3fe7b2 100644 --- a/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Hql.g4 +++ b/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Hql.g4 @@ -188,10 +188,6 @@ instantiation : NEW instantiationTarget '(' instantiationArguments ')' ; -alias - : AS? identifier // spec says IDENTIFIER but clearly does NOT mean a reserved word - ; - groupedItem : identifier | INTEGER_LITERAL @@ -354,6 +350,17 @@ dateTimeLiteral | INSTANT ; +/** + * A field that may be extracted from a date, time, or datetime + */ +extractField + : datetimeField + | dayField + | weekField + | timeZoneField + | dateOrTimeField + ; + // https://docs.jboss.org/hibernate/orm/6.1/userguide/html_single/Hibernate_User_Guide.html#hql-duration-literals datetimeField : YEAR @@ -368,6 +375,27 @@ datetimeField | EPOCH ; +dayField + : DAY OF MONTH + | DAY OF WEEK + | DAY OF YEAR + ; + +weekField + : WEEK OF MONTH + | WEEK OF YEAR + ; + +timeZoneField + : OFFSET (HOUR | MINUTE)? + | TIMEZONE_HOUR | TIMEZONE_MINUTE + ; + +dateOrTimeField + : DATE + | TIME + ; + // https://docs.jboss.org/hibernate/orm/6.1/userguide/html_single/Hibernate_User_Guide.html#hql-binary-literals binaryLiteral : BINARY_LITERAL @@ -416,11 +444,6 @@ primaryExpression // TBD // https://docs.jboss.org/hibernate/orm/6.1/userguide/html_single/Hibernate_User_Guide.html#hql-path-expressions -identificationVariable - : identifier - | simplePath - ; - path : treatedPath pathContinutation? | generalPathFragment @@ -467,112 +490,498 @@ caseWhenPredicateClause ; // Functions -// https://docs.jboss.org/hibernate/orm/6.1/userguide/html_single/Hibernate_User_Guide.html#hql-exp-functions +/** + * A function invocation that may occur in an arbitrary expression + */ function - : functionName '(' (functionArguments | ASTERISK)? ')' pathContinutation? filterClause? withinGroup? overClause? # GenericFunction - | functionName '(' subquery ')' # FunctionWithSubquery - | castFunction # CastFunctionInvocation - | extractFunction # ExtractFunctionInvocation - | trimFunction # TrimFunctionInvocation - | everyFunction # EveryFunctionInvocation - | anyFunction # AnyFunctionInvocation - | treatedPath # TreatedPathInvocation + : standardFunction # StandardFunctionInvocation + | aggregateFunction # AggregateFunctionInvocation + | collectionSizeFunction # CollectionSizeFunctionInvocation + | collectionAggregateFunction # CollectionAggregateFunctionInvocation + | collectionFunctionMisuse # CollectionFunctionMisuseInvocation + | jpaNonstandardFunction # JpaNonstandardFunctionInvocation + | columnFunction # ColumnFunctionInvocation + | genericFunction # GenericFunctionInvocation ; -functionArguments - : DISTINCT? expressionOrPredicate (',' expressionOrPredicate)* +/** + * Any function with an irregular syntax for the argument list + * + * These are all inspired by the syntax of ANSI SQL + */ +standardFunction + : castFunction + | treatedPath + | extractFunction + | truncFunction + | formatFunction + | collateFunction + | substringFunction + | overlayFunction + | trimFunction + | padFunction + | positionFunction + | currentDateFunction + | currentTimeFunction + | currentTimestampFunction + | instantFunction + | localDateFunction + | localTimeFunction + | localDateTimeFunction + | offsetDateTimeFunction + | cube + | rollup ; -// https://docs.jboss.org/hibernate/orm/6.1/userguide/html_single/Hibernate_User_Guide.html#hql-aggregate-functions-filter -filterClause - : FILTER '(' whereClause ')' +/** + * The 'cast()' function for typecasting + */ +castFunction + : CAST '(' expression AS castTarget ')' ; -// https://docs.jboss.org/hibernate/orm/6.1/userguide/html_single/Hibernate_User_Guide.html#hql-aggregate-functions-orderedset -withinGroup - : WITHIN GROUP '(' orderByClause ')' +/** + * The target type for a typecast: a typename, together with length or precision/scale + */ +castTarget + : castTargetType ('(' INTEGER_LITERAL (',' INTEGER_LITERAL)? ')')? ; -overClause - : OVER '(' partitionClause? orderByClause? frameClause? ')' +/** + * The name of the target type in a typecast + * + * Like the 'entityName' rule, we have a specialized dotIdentifierSequence rule + */ +castTargetType + returns [String fullTargetName] + : (i=identifier { $fullTargetName = _localctx.i.getText(); }) ('.' c=identifier { $fullTargetName += ("." + _localctx.c.getText() ); })* ; -partitionClause - : PARTITION BY expression (',' expression)* +/** + * The two formats for the 'substring() function: one defined by JPQL, the other by ANSI SQL + */ +substringFunction + : SUBSTRING '(' expression ',' substringFunctionStartArgument (',' substringFunctionLengthArgument)? ')' + | SUBSTRING '(' expression FROM substringFunctionStartArgument (FOR substringFunctionLengthArgument)? ')' ; -frameClause - : (RANGE|ROWS|GROUPS) frameStart frameExclusion? - | (RANGE|ROWS|GROUPS) BETWEEN frameStart AND frameEnd frameExclusion? +substringFunctionStartArgument + : expression ; -frameStart - : UNBOUNDED PRECEDING # UnboundedPrecedingFrameStart - | expression PRECEDING # ExpressionPrecedingFrameStart - | CURRENT ROW # CurrentRowFrameStart - | expression FOLLOWING # ExpressionFollowingFrameStart +substringFunctionLengthArgument + : expression ; -frameExclusion - : EXCLUDE CURRENT ROW # CurrentRowFrameExclusion - | EXCLUDE GROUP # GroupFrameExclusion - | EXCLUDE TIES # TiesFrameExclusion - | EXCLUDE NO OTHERS # NoOthersFrameExclusion +/** + * The ANSI SQL-style 'trim()' function + */ +trimFunction + : TRIM '(' trimSpecification? trimCharacter? FROM? expression ')' ; -frameEnd - : expression PRECEDING # ExpressionPrecedingFrameEnd - | CURRENT ROW # CurrentRowFrameEnd - | expression FOLLOWING # ExpressionFollowingFrameEnd - | UNBOUNDED FOLLOWING # UnboundedFollowingFrameEnd +trimSpecification + : LEADING + | TRAILING + | BOTH ; -// https://docs.jboss.org/hibernate/orm/6.1/userguide/html_single/Hibernate_User_Guide.html#hql-functions -castFunction - : CAST '(' expression AS castTarget ')' +trimCharacter + : stringLiteral + | parameter ; -castTarget - : castTargetType ('(' INTEGER_LITERAL (',' INTEGER_LITERAL)? ')')? +/** + * A 'pad()' function inspired by 'trim()' + */ +padFunction + : PAD '(' expression WITH padLength padSpecification padCharacter? ')' ; -castTargetType - returns [String fullTargetName] - : (i=identifier { $fullTargetName = _localctx.i.getText(); }) ('.' c=identifier { $fullTargetName += ("." + _localctx.c.getText() ); })* +padSpecification + : LEADING + | TRAILING + ; + +padCharacter + : stringLiteral + ; + +padLength + : expression + ; + +/** + * The ANSI SQL-style 'position()' function + */ +positionFunction + : POSITION '(' positionFunctionPatternArgument IN positionFunctionStringArgument ')' + ; + +positionFunctionPatternArgument + : expression + ; + +positionFunctionStringArgument + : expression + ; + +/** + * The ANSI SQL-style 'overlay()' function + */ +overlayFunction + : OVERLAY '(' overlayFunctionStringArgument PLACING overlayFunctionReplacementArgument FROM overlayFunctionStartArgument (FOR overlayFunctionLengthArgument)? ')' + ; + +overlayFunctionStringArgument + : expression + ; + +overlayFunctionReplacementArgument + : expression + ; + +overlayFunctionStartArgument + : expression + ; + +overlayFunctionLengthArgument + : expression + ; + +/** + * The deprecated current_date function required by JPQL + */ +currentDateFunction + : CURRENT_DATE ('(' ')')? + | CURRENT DATE + ; + +/** + * The deprecated current_time function required by JPQL + */ +currentTimeFunction + : CURRENT_TIME ('(' ')')? + | CURRENT TIME + ; + +/** + * The deprecated current_timestamp function required by JPQL + */ +currentTimestampFunction + : CURRENT_TIMESTAMP ('(' ')')? + | CURRENT TIMESTAMP + ; + +/** + * The instant function, and deprecated current_instant function + */ +instantFunction + : CURRENT_INSTANT ('(' ')')? //deprecated legacy syntax + | INSTANT + ; + +/** + * The 'local datetime' function (or literal if you prefer) + */ +localDateTimeFunction + : LOCAL_DATETIME ('(' ')')? + | LOCAL DATETIME + ; + +/** + * The 'offset datetime' function (or literal if you prefer) + */ +offsetDateTimeFunction + : OFFSET_DATETIME ('(' ')')? + | OFFSET DATETIME + ; + +/** + * The 'local date' function (or literal if you prefer) + */ +localDateFunction + : LOCAL_DATE ('(' ')')? + | LOCAL DATE + ; + +/** + * The 'local time' function (or literal if you prefer) + */ +localTimeFunction + : LOCAL_TIME ('(' ')')? + | LOCAL TIME + ; + +/** + * The 'format()' function for formatting dates and times according to a pattern + */ +formatFunction + : FORMAT '(' expression AS format ')' + ; + +/** + * The name of a database-defined collation + * + * Certain databases allow a period in a collation name + */ +collation + : simplePath + ; + +/** + * The special 'collate()' functions + */ +collateFunction + : COLLATE '(' expression AS collation ')' + ; + +/** + * The 'cube()' function specific to the 'group by' clause + */ +cube + : CUBE '(' expressionOrPredicate (',' expressionOrPredicate)* ')' ; +/** + * The 'rollup()' function specific to the 'group by' clause + */ +rollup + : ROLLUP '(' expressionOrPredicate (',' expressionOrPredicate)* ')' + ; + +/** + * A format pattern, with a syntax inspired by by java.time.format.DateTimeFormatter + * + * see 'Dialect.appendDatetimeFormat()' + */ +format + : stringLiteral + ; + +/** + * The 'extract()' function for extracting fields of dates, times, and datetimes + */ extractFunction - : EXTRACT '(' expression FROM expression ')' - | dateTimeFunction '(' expression ')' + : EXTRACT '(' extractField FROM expression ')' + | datetimeField '(' expression ')' ; -trimFunction - : TRIM '(' (LEADING | TRAILING | BOTH)? stringLiteral? FROM? expression ')' +/** + * The 'trunc()' function for truncating both numeric and datetime values + */ +truncFunction + : (TRUNC | TRUNCATE) '(' expression (',' (datetimeField | expression))? ')' ; -dateTimeFunction - : d=(YEAR - | MONTH - | DAY - | WEEK - | QUARTER - | HOUR - | MINUTE - | SECOND - | NANOSECOND - | EPOCH) +/** + * A syntax for calling user-defined or native database functions, required by JPQL + */ +jpaNonstandardFunction + : FUNCTION '(' jpaNonstandardFunctionName (AS castTarget)? (',' genericFunctionArguments)? ')' + ; + +/** + * The name of a user-defined or native database function, given as a quoted string + */ +jpaNonstandardFunctionName + : stringLiteral + | identifier + ; + +columnFunction + : COLUMN '(' path '.' jpaNonstandardFunctionName (AS castTarget)? ')' + ; + +/** + * Any function invocation that follows the regular syntax + * + * The function name, followed by a parenthesized list of ','-separated expressions + */ +genericFunction + : genericFunctionName '(' (genericFunctionArguments | ASTERISK)? ')' pathContinutation? + nthSideClause? nullsClause? withinGroupClause? filterClause? overClause? + ; + +/** + * The name of a generic function, which may contain periods and quoted identifiers + * + * Names of generic functions are resolved against the SqmFunctionRegistry + */ +genericFunctionName + : simplePath ; +/** + * The arguments of a generic function + */ +genericFunctionArguments + : (DISTINCT | datetimeField ',')? expressionOrPredicate (',' expressionOrPredicate)* + ; + +/** + * The special 'size()' function defined by JPQL + */ +collectionSizeFunction + : SIZE '(' path ')' + ; + +/** + * Special rule for 'max(elements())`, 'avg(keys())', 'sum(indices())`, etc., as defined by HQL + * Also the deprecated 'maxindex()', 'maxelement()', 'minindex()', 'minelement()' functions from old HQL + */ +collectionAggregateFunction + : (MAX|MIN|SUM|AVG) '(' elementsValuesQuantifier '(' path ')' ')' # ElementAggregateFunction + | (MAX|MIN|SUM|AVG) '(' indicesKeysQuantifier '(' path ')' ')' # IndexAggregateFunction + | (MAXELEMENT|MINELEMENT) '(' path ')' # ElementAggregateFunction + | (MAXINDEX|MININDEX) '(' path ')' # IndexAggregateFunction + ; + +/** + * To accommodate the misuse of elements() and indices() in the select clause + * + * (At some stage in the history of HQL, someone mixed them up with value() and index(), + * and so we have tests that insist they're interchangeable. Ugh.) + */ +collectionFunctionMisuse + : elementsValuesQuantifier '(' path ')' + | indicesKeysQuantifier '(' path ')' + ; + +/** + * The special 'every()', 'all()', 'any()' and 'some()' functions defined by HQL + * + * May be applied to a subquery or collection reference, or may occur as an aggregate function in the 'select' clause + */ +aggregateFunction + : everyFunction + | anyFunction + | listaggFunction + ; + +/** + * The functions 'every()' and 'all()' are synonyms + */ everyFunction - : every=(EVERY | ALL) '(' predicate ')' - | every=(EVERY | ALL) '(' subquery ')' - | every=(EVERY | ALL) (ELEMENTS | INDICES) '(' simplePath ')' + : everyAllQuantifier '(' predicate ')' filterClause? overClause? + | everyAllQuantifier '(' subquery ')' + | everyAllQuantifier collectionQuantifier '(' simplePath ')' ; +/** + * The functions 'any()' and 'some()' are synonyms + */ anyFunction - : any=(ANY | SOME) '(' predicate ')' - | any=(ANY | SOME) '(' subquery ')' - | any=(ANY | SOME) (ELEMENTS | INDICES) '(' simplePath ')' + : anySomeQuantifier '(' predicate ')' filterClause? overClause? + | anySomeQuantifier '(' subquery ')' + | anySomeQuantifier collectionQuantifier '(' simplePath ')' + ; + +everyAllQuantifier + : EVERY + | ALL + ; + +anySomeQuantifier + : ANY + | SOME + ; + +/** + * The 'listagg()' ordered set-aggregate function + */ +listaggFunction + : LISTAGG '(' DISTINCT? expressionOrPredicate ',' expressionOrPredicate onOverflowClause? ')' + withinGroupClause? filterClause? overClause? + ; + +/** + * A 'on overflow' clause: what to do when the text data type used for 'listagg' overflows + */ +onOverflowClause + : ON OVERFLOW (ERROR | TRUNCATE expression? (WITH|WITHOUT) COUNT) + ; + +/** + * A 'within group' clause: defines the order in which the ordered set-aggregate function should work + */ +withinGroupClause + : WITHIN GROUP '(' orderByClause ')' + ; + +/** + * A 'filter' clause: a restriction applied to an aggregate function + */ +filterClause + : FILTER '(' whereClause ')' + ; + +/** + * A `nulls` clause: what should a value access window function do when encountering a `null` + */ +nullsClause + : RESPECT NULLS + | IGNORE NULLS + ; + +/** + * A `nulls` clause: what should a value access window function do when encountering a `null` + */ +nthSideClause + : FROM FIRST + | FROM LAST + ; + +/** + * A 'over' clause: the specification of a window within which the function should act + */ +overClause + : OVER '(' partitionClause? orderByClause? frameClause? ')' + ; + +/** + * A 'partition' clause: the specification the group within which a function should act in a window + */ +partitionClause + : PARTITION BY expression (',' expression)* + ; + +/** + * A 'frame' clause: the specification the content of the window + */ +frameClause + : (RANGE|ROWS|GROUPS) frameStart frameExclusion? + | (RANGE|ROWS|GROUPS) BETWEEN frameStart AND frameEnd frameExclusion? + ; + +/** + * The start of the window content + */ +frameStart + : CURRENT ROW + | UNBOUNDED PRECEDING + | expression PRECEDING + | expression FOLLOWING + ; + +/** + * The end of the window content + */ +frameEnd + : CURRENT ROW + | UNBOUNDED FOLLOWING + | expression PRECEDING + | expression FOLLOWING + ; + +/** + * A 'exclusion' clause: the specification what to exclude from the window content + */ +frameExclusion + : EXCLUDE CURRENT ROW + | EXCLUDE GROUP + | EXCLUDE TIES + | EXCLUDE NO OTHERS ; // https://docs.jboss.org/hibernate/orm/6.1/userguide/html_single/Hibernate_User_Guide.html#hql-treat-type @@ -608,6 +1017,21 @@ expressionOrPredicate | predicate ; +collectionQuantifier + : elementsValuesQuantifier + | indicesKeysQuantifier + ; + +elementsValuesQuantifier + : ELEMENTS + | VALUES + ; + +indicesKeysQuantifier + : INDICES + | KEYS + ; + // https://docs.jboss.org/hibernate/orm/6.1/userguide/html_single/Hibernate_User_Guide.html#hql-relational-comparisons // NOTE: The TIP shows that "!=" is also supported. Hibernate's source code shows that "^=" is another NOT_EQUALS option as well. relationalExpression @@ -691,10 +1115,6 @@ identifier : reservedWord ; -character - : CHARACTER - ; - functionName : reservedWord ('.' reservedWord)* ; @@ -998,6 +1418,7 @@ INTO : I N T O; IS : I S; JOIN : J O I N; KEY : K E Y; +KEYS : K E Y S; LAST : L A S T; LATERAL : L A T E R A L; LEADING : L E A D I N G; @@ -1114,4 +1535,3 @@ BINARY_LITERAL : [xX] '\'' HEX_DIGIT+ '\'' ; IDENTIFICATION_VARIABLE : ('a' .. 'z' | 'A' .. 'Z' | '\u0080' .. '\ufffe' | '$' | '_') ('a' .. 'z' | 'A' .. 'Z' | '\u0080' .. '\ufffe' | '0' .. '9' | '$' | '_')* ; - diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryRenderer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryRenderer.java index 127068f4a4..2ef49b95ff 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryRenderer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryRenderer.java @@ -662,20 +662,6 @@ public QueryTokenStream visitInstantiation(HqlParser.InstantiationContext ctx) { return builder; } - @Override - public QueryTokenStream visitAlias(HqlParser.AliasContext ctx) { - - QueryRendererBuilder builder = QueryRenderer.builder(); - - if (ctx.AS() != null) { - builder.append(QueryTokens.expression(ctx.AS())); - } - - builder.append(visit(ctx.identifier())); - - return builder; - } - @Override public QueryTokenStream visitGroupedItem(HqlParser.GroupedItemContext ctx) { @@ -1146,30 +1132,105 @@ public QueryTokenStream visitDateTimeLiteral(HqlParser.DateTimeLiteralContext ct public QueryTokenStream visitDatetimeField(HqlParser.DatetimeFieldContext ctx) { if (ctx.YEAR() != null) { - return QueryRendererBuilder.from(QueryTokens.expression(ctx.YEAR())); + return QueryRendererBuilder.from(QueryTokens.token(ctx.YEAR())); } else if (ctx.MONTH() != null) { - return QueryRendererBuilder.from(QueryTokens.expression(ctx.MONTH())); + return QueryRendererBuilder.from(QueryTokens.token(ctx.MONTH())); } else if (ctx.DAY() != null) { - return QueryRendererBuilder.from(QueryTokens.expression(ctx.DAY())); + return QueryRendererBuilder.from(QueryTokens.token(ctx.DAY())); } else if (ctx.WEEK() != null) { - return QueryRendererBuilder.from(QueryTokens.expression(ctx.WEEK())); + return QueryRendererBuilder.from(QueryTokens.token(ctx.WEEK())); } else if (ctx.QUARTER() != null) { - return QueryRendererBuilder.from(QueryTokens.expression(ctx.QUARTER())); + return QueryRendererBuilder.from(QueryTokens.token(ctx.QUARTER())); } else if (ctx.HOUR() != null) { - return QueryRendererBuilder.from(QueryTokens.expression(ctx.HOUR())); + return QueryRendererBuilder.from(QueryTokens.token(ctx.HOUR())); } else if (ctx.MINUTE() != null) { - return QueryRendererBuilder.from(QueryTokens.expression(ctx.MINUTE())); + return QueryRendererBuilder.from(QueryTokens.token(ctx.MINUTE())); } else if (ctx.SECOND() != null) { - return QueryRendererBuilder.from(QueryTokens.expression(ctx.SECOND())); + return QueryRendererBuilder.from(QueryTokens.token(ctx.SECOND())); } else if (ctx.NANOSECOND() != null) { - return QueryRendererBuilder.from(QueryTokens.expression(ctx.NANOSECOND())); + return QueryRendererBuilder.from(QueryTokens.token(ctx.NANOSECOND())); } else if (ctx.EPOCH() != null) { - return QueryRendererBuilder.from(QueryTokens.expression(ctx.EPOCH())); + return QueryRendererBuilder.from(QueryTokens.token(ctx.EPOCH())); } else { return QueryTokenStream.empty(); } } + @Override + public QueryTokenStream visitDayField(HqlParser.DayFieldContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + + builder.append(QueryTokens.expression(ctx.DAY())); + builder.append(QueryTokens.expression(ctx.OF())); + + if (ctx.MONTH() != null) { + builder.append(QueryTokens.expression(ctx.MONTH())); + } + + if (ctx.WEEK() != null) { + builder.append(QueryTokens.expression(ctx.WEEK())); + } + + if (ctx.YEAR() != null) { + builder.append(QueryTokens.expression(ctx.YEAR())); + } + + return builder; + } + + @Override + public QueryTokenStream visitWeekField(HqlParser.WeekFieldContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + + builder.append(QueryTokens.expression(ctx.WEEK())); + builder.append(QueryTokens.expression(ctx.OF())); + + if (ctx.MONTH() != null) { + builder.append(QueryTokens.expression(ctx.MONTH())); + } + + if (ctx.YEAR() != null) { + builder.append(QueryTokens.expression(ctx.YEAR())); + } + + return builder; + } + + @Override + public QueryTokenStream visitTimeZoneField(HqlParser.TimeZoneFieldContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + + if (ctx.OFFSET() != null) { + builder.append(QueryTokens.expression(ctx.OFFSET())); + + if (ctx.HOUR() != null) { + builder.append(QueryTokens.expression(ctx.HOUR())); + } + + if (ctx.MINUTE() != null) { + builder.append(QueryTokens.expression(ctx.MINUTE())); + } + } + + if (ctx.TIMEZONE_HOUR() != null) { + builder.append(QueryTokens.expression(ctx.TIMEZONE_HOUR())); + } + + if (ctx.TIMEZONE_HOUR() != null) { + builder.append(QueryTokens.expression(ctx.TIMEZONE_MINUTE())); + } + + return builder; + } + + @Override + public QueryTokenStream visitDateOrTimeField(HqlParser.DateOrTimeFieldContext ctx) { + return QueryRendererBuilder.from(QueryTokens.expression(ctx.DATE() != null ? ctx.DATE() : ctx.TIME())); + } + @Override public QueryTokenStream visitBinaryLiteral(HqlParser.BinaryLiteralContext ctx) { @@ -1332,7 +1393,7 @@ public QueryTokenStream visitToDurationExpression(HqlParser.ToDurationExpression QueryRendererBuilder builder = QueryRenderer.builder(); builder.append(visit(ctx.expression())); - builder.append(visit(ctx.datetimeField())); + builder.appendExpression(visit(ctx.datetimeField())); return builder; } @@ -1344,7 +1405,7 @@ public QueryTokenStream visitFromDurationExpression(HqlParser.FromDurationExpres builder.append(visit(ctx.expression())); builder.append(QueryTokens.expression(ctx.BY())); - builder.append(visit(ctx.datetimeField())); + builder.appendExpression(visit(ctx.datetimeField())); return builder; } @@ -1370,263 +1431,579 @@ public QueryTokenStream visitFunctionExpression(HqlParser.FunctionExpressionCont } @Override - public QueryTokenStream visitGeneralPathExpression(HqlParser.GeneralPathExpressionContext ctx) { - return visit(ctx.generalPathFragment()); + public QueryTokenStream visitStandardFunctionInvocation(HqlParser.StandardFunctionInvocationContext ctx) { + return visit(ctx.standardFunction()); } @Override - public QueryTokenStream visitIdentificationVariable(HqlParser.IdentificationVariableContext ctx) { - - if (ctx.identifier() != null) { - return visit(ctx.identifier()); - } else if (ctx.simplePath() != null) { - return visit(ctx.simplePath()); - } else { - return QueryTokenStream.empty(); - } + public QueryTokenStream visitAggregateFunctionInvocation(HqlParser.AggregateFunctionInvocationContext ctx) { + return visit(ctx.aggregateFunction()); } @Override - public QueryTokenStream visitPath(HqlParser.PathContext ctx) { - - QueryRendererBuilder builder = QueryRenderer.builder(); + public QueryTokenStream visitCollectionSizeFunctionInvocation(HqlParser.CollectionSizeFunctionInvocationContext ctx) { + return visit(ctx.collectionSizeFunction()); + } - if (ctx.treatedPath() != null) { + @Override + public QueryTokenStream visitCollectionAggregateFunctionInvocation( + HqlParser.CollectionAggregateFunctionInvocationContext ctx) { + return visit(ctx.collectionAggregateFunction()); + } - builder.append(visit(ctx.treatedPath())); + @Override + public QueryTokenStream visitCollectionFunctionMisuseInvocation( + HqlParser.CollectionFunctionMisuseInvocationContext ctx) { + return visit(ctx.collectionFunctionMisuse()); + } - if (ctx.pathContinutation() != null) { - builder.append(visit(ctx.pathContinutation())); - } - } else if (ctx.generalPathFragment() != null) { - builder.append(visit(ctx.generalPathFragment())); - } + @Override + public QueryTokenStream visitJpaNonstandardFunctionInvocation(HqlParser.JpaNonstandardFunctionInvocationContext ctx) { + return visit(ctx.jpaNonstandardFunction()); + } - return builder; + @Override + public QueryTokenStream visitColumnFunctionInvocation(HqlParser.ColumnFunctionInvocationContext ctx) { + return visit(ctx.columnFunction()); } @Override - public QueryTokenStream visitGeneralPathFragment(HqlParser.GeneralPathFragmentContext ctx) { + public QueryTokenStream visitGenericFunctionInvocation(HqlParser.GenericFunctionInvocationContext ctx) { + return visit(ctx.genericFunction()); + } - QueryRendererBuilder builder = QueryRenderer.builder(); + @Override + public QueryTokenStream visitStandardFunction(HqlParser.StandardFunctionContext ctx) { - builder.append(visit(ctx.simplePath())); + if (ctx.castFunction() != null) { + return visit(ctx.castFunction()); + } - if (ctx.indexedPathAccessFragment() != null) { - builder.append(visit(ctx.indexedPathAccessFragment())); + if (ctx.treatedPath() != null) { + return visit(ctx.treatedPath()); } - return builder; - } + if (ctx.extractFunction() != null) { + return visit(ctx.extractFunction()); + } - @Override - public QueryTokenStream visitIndexedPathAccessFragment(HqlParser.IndexedPathAccessFragmentContext ctx) { + if (ctx.truncFunction() != null) { + return visit(ctx.truncFunction()); + } - QueryRendererBuilder builder = QueryRenderer.builder(); + if (ctx.formatFunction() != null) { + return visit(ctx.formatFunction()); + } - builder.append(TOKEN_OPEN_SQUARE_BRACKET); - builder.appendInline(visit(ctx.expression())); - builder.append(TOKEN_CLOSE_SQUARE_BRACKET); + if (ctx.collateFunction() != null) { + return visit(ctx.collateFunction()); + } - if (ctx.generalPathFragment() != null) { + if (ctx.substringFunction() != null) { + return visit(ctx.substringFunction()); + } - builder.append(TOKEN_DOT); - builder.append(visit(ctx.generalPathFragment())); + if (ctx.overlayFunction() != null) { + return visit(ctx.overlayFunction()); } - return builder; - } + if (ctx.trimFunction() != null) { + return visit(ctx.trimFunction()); + } - @Override - public QueryTokenStream visitSimplePath(HqlParser.SimplePathContext ctx) { + if (ctx.padFunction() != null) { + return visit(ctx.padFunction()); + } - QueryRendererBuilder builder = QueryRenderer.builder(); + if (ctx.positionFunction() != null) { + return visit(ctx.positionFunction()); + } - builder.append(visit(ctx.identifier())); + if (ctx.currentDateFunction() != null) { + return visit(ctx.currentDateFunction()); + } - if (!ctx.simplePathElement().isEmpty()) { - builder.append(TOKEN_DOT); + if (ctx.currentTimeFunction() != null) { + return visit(ctx.currentTimeFunction()); } - builder.append(QueryTokenStream.concat(ctx.simplePathElement(), this::visit, TOKEN_DOT)); + if (ctx.currentTimestampFunction() != null) { + return visit(ctx.currentTimestampFunction()); + } - return builder; - } + if (ctx.instantFunction() != null) { + return visit(ctx.instantFunction()); + } - @Override - public QueryTokenStream visitSimplePathElement(HqlParser.SimplePathElementContext ctx) { + if (ctx.localDateFunction() != null) { + return visit(ctx.localDateFunction()); + } - QueryRendererBuilder builder = QueryRenderer.builder(); + if (ctx.localTimeFunction() != null) { + return visit(ctx.localTimeFunction()); + } - builder.append(visit(ctx.identifier())); + if (ctx.localDateTimeFunction() != null) { + return visit(ctx.localDateTimeFunction()); + } - return builder; - } + if (ctx.offsetDateTimeFunction() != null) { + return visit(ctx.offsetDateTimeFunction()); + } - @Override - public QueryTokenStream visitCaseList(HqlParser.CaseListContext ctx) { + if (ctx.cube() != null) { + return visit(ctx.cube()); + } - if (ctx.simpleCaseExpression() != null) { - return visit(ctx.simpleCaseExpression()); - } else if (ctx.searchedCaseExpression() != null) { - return visit(ctx.searchedCaseExpression()); - } else { - return QueryTokenStream.empty(); + if (ctx.rollup() != null) { + return visit(ctx.rollup()); } + + return QueryTokenStream.empty(); } @Override - public QueryTokenStream visitSimpleCaseExpression(HqlParser.SimpleCaseExpressionContext ctx) { + public QueryTokenStream visitSubstringFunction(HqlParser.SubstringFunctionContext ctx) { QueryRendererBuilder builder = QueryRenderer.builder(); - builder.append(QueryTokens.expression(ctx.CASE())); - builder.append(visit(ctx.expressionOrPredicate(0))); + builder.append(QueryTokens.token(ctx.SUBSTRING())); + builder.append(TOKEN_OPEN_PAREN); + builder.append(visit(ctx.expression())); - ctx.caseWhenExpressionClause().forEach(caseWhenExpressionClauseContext -> { - builder.append(visit(caseWhenExpressionClauseContext)); - }); + if (ctx.FROM() == null) { + builder.append(TOKEN_COMMA); + } else { + builder.append(QueryTokens.expression(ctx.FROM())); + } - if (ctx.ELSE() != null) { + builder.append(visit(ctx.substringFunctionStartArgument())); - builder.append(QueryTokens.expression(ctx.ELSE())); - builder.append(visit(ctx.expressionOrPredicate(1))); + if (ctx.substringFunctionLengthArgument() != null) { + if (ctx.FOR() == null) { + builder.append(TOKEN_COMMA); + } else { + builder.append(QueryTokens.expression(ctx.FOR())); + } + + builder.append(visit(ctx.substringFunctionLengthArgument())); } - builder.append(QueryTokens.expression(ctx.END())); + builder.append(TOKEN_CLOSE_PAREN); return builder; } @Override - public QueryTokenStream visitSearchedCaseExpression(HqlParser.SearchedCaseExpressionContext ctx) { + public QueryTokenStream visitSubstringFunctionStartArgument(HqlParser.SubstringFunctionStartArgumentContext ctx) { + return visit(ctx.expression()); + } - QueryRendererBuilder builder = QueryRenderer.builder(); + @Override + public QueryTokenStream visitSubstringFunctionLengthArgument(HqlParser.SubstringFunctionLengthArgumentContext ctx) { + return visit(ctx.expression()); + } - builder.append(QueryTokens.expression(ctx.CASE())); + @Override + public QueryTokenStream visitPadFunction(HqlParser.PadFunctionContext ctx) { - builder.append(QueryTokenStream.concat(ctx.caseWhenPredicateClause(), this::visit, TOKEN_SPACE)); + QueryRendererBuilder builder = QueryRenderer.builder(); - if (ctx.ELSE() != null) { + builder.append(QueryTokens.token(ctx.PAD())); + builder.append(TOKEN_OPEN_PAREN); + builder.append(visit(ctx.expression())); + builder.append(QueryTokens.expression(ctx.WITH())); + builder.appendExpression(visit(ctx.padLength())); - builder.append(QueryTokens.expression(ctx.ELSE())); - builder.appendExpression(visit(ctx.expressionOrPredicate())); + if (ctx.padCharacter() != null) { + builder.appendExpression(visit(ctx.padSpecification())); + builder.appendInline(visit(ctx.padCharacter())); + } else { + builder.append(visit(ctx.padSpecification())); } - builder.append(QueryTokens.expression(ctx.END())); + builder.append(TOKEN_CLOSE_PAREN); return builder; } @Override - public QueryTokenStream visitCaseWhenExpressionClause(HqlParser.CaseWhenExpressionClauseContext ctx) { - - QueryRendererBuilder builder = QueryRenderer.builder(); + public QueryTokenStream visitPadSpecification(HqlParser.PadSpecificationContext ctx) { + return QueryRendererBuilder.from(QueryTokens.token(ctx.LEADING() != null ? ctx.LEADING() : ctx.TRAILING())); + } - builder.append(QueryTokens.expression(ctx.WHEN())); - builder.appendExpression(visit(ctx.expression())); - builder.append(QueryTokens.expression(ctx.THEN())); - builder.appendExpression(visit(ctx.expressionOrPredicate())); + @Override + public QueryTokenStream visitPadCharacter(HqlParser.PadCharacterContext ctx) { + return visit(ctx.stringLiteral()); + } - return builder; + @Override + public QueryTokenStream visitPadLength(HqlParser.PadLengthContext ctx) { + return visit(ctx.expression()); } @Override - public QueryTokenStream visitCaseWhenPredicateClause(HqlParser.CaseWhenPredicateClauseContext ctx) { + public QueryTokenStream visitPositionFunction(HqlParser.PositionFunctionContext ctx) { QueryRendererBuilder builder = QueryRenderer.builder(); - builder.append(QueryTokens.expression(ctx.WHEN())); - builder.appendExpression(visit(ctx.predicate())); - builder.append(QueryTokens.expression(ctx.THEN())); - builder.appendExpression(visit(ctx.expressionOrPredicate())); + builder.append(QueryTokens.token(ctx.POSITION())); + builder.append(TOKEN_OPEN_PAREN); + builder.append(visit(ctx.positionFunctionPatternArgument())); + builder.append(QueryTokens.expression(ctx.IN())); + builder.appendInline(visit(ctx.positionFunctionStringArgument())); + builder.append(TOKEN_CLOSE_PAREN); return builder; } @Override - public QueryTokenStream visitGenericFunction(HqlParser.GenericFunctionContext ctx) { - - QueryRendererBuilder builder = QueryRenderer.builder(); - QueryRendererBuilder nested = QueryRenderer.builder(); - - nested.append(visit(ctx.functionName())); - nested.append(TOKEN_OPEN_PAREN); - - if (ctx.functionArguments() != null) { - nested.appendInline(visit(ctx.functionArguments())); - } else if (ctx.ASTERISK() != null) { - nested.append(QueryTokens.token(ctx.ASTERISK())); - } - - nested.append(TOKEN_CLOSE_PAREN); - - builder.append(nested); - - if (ctx.pathContinutation() != null) { - builder.appendInline(visit(ctx.pathContinutation())); - } - - if (ctx.filterClause() != null) { - builder.appendExpression(visit(ctx.filterClause())); - } - - if (ctx.withinGroup() != null) { - builder.appendExpression(visit(ctx.withinGroup())); - } - - if (ctx.overClause() != null) { - builder.appendExpression(visit(ctx.overClause())); - } + public QueryTokenStream visitPositionFunctionPatternArgument(HqlParser.PositionFunctionPatternArgumentContext ctx) { + return visit(ctx.expression()); + } - return builder; + @Override + public QueryTokenStream visitPositionFunctionStringArgument(HqlParser.PositionFunctionStringArgumentContext ctx) { + return visit(ctx.expression()); } @Override - public QueryTokenStream visitFunctionWithSubquery(HqlParser.FunctionWithSubqueryContext ctx) { + public QueryTokenStream visitOverlayFunction(HqlParser.OverlayFunctionContext ctx) { QueryRendererBuilder builder = QueryRenderer.builder(); - builder.appendExpression(visit(ctx.functionName())); + builder.append(QueryTokens.token(ctx.OVERLAY())); builder.append(TOKEN_OPEN_PAREN); - builder.appendInline(visit(ctx.subquery())); + builder.append(visit(ctx.overlayFunctionStringArgument())); + builder.append(QueryTokens.expression(ctx.PLACING())); + builder.append(visit(ctx.overlayFunctionReplacementArgument())); + builder.append(QueryTokens.expression(ctx.FROM())); + builder.append(visit(ctx.overlayFunctionStartArgument())); + + if (ctx.overlayFunctionLengthArgument() != null) { + builder.append(QueryTokens.expression(ctx.FOR())); + builder.append(visit(ctx.overlayFunctionLengthArgument())); + } builder.append(TOKEN_CLOSE_PAREN); return builder; } @Override - public QueryTokenStream visitCastFunctionInvocation(HqlParser.CastFunctionInvocationContext ctx) { - return visit(ctx.castFunction()); + public QueryTokenStream visitOverlayFunctionStringArgument(HqlParser.OverlayFunctionStringArgumentContext ctx) { + return visit(ctx.expression()); } @Override - public QueryTokenStream visitExtractFunctionInvocation(HqlParser.ExtractFunctionInvocationContext ctx) { - return visit(ctx.extractFunction()); + public QueryTokenStream visitOverlayFunctionReplacementArgument( + HqlParser.OverlayFunctionReplacementArgumentContext ctx) { + return visit(ctx.expression()); } @Override - public QueryTokenStream visitTrimFunctionInvocation(HqlParser.TrimFunctionInvocationContext ctx) { - return visit(ctx.trimFunction()); + public QueryTokenStream visitOverlayFunctionStartArgument(HqlParser.OverlayFunctionStartArgumentContext ctx) { + return visit(ctx.expression()); } @Override - public QueryTokenStream visitEveryFunctionInvocation(HqlParser.EveryFunctionInvocationContext ctx) { - return visit(ctx.everyFunction()); + public QueryTokenStream visitOverlayFunctionLengthArgument(HqlParser.OverlayFunctionLengthArgumentContext ctx) { + return visit(ctx.expression()); } @Override - public QueryTokenStream visitAnyFunctionInvocation(HqlParser.AnyFunctionInvocationContext ctx) { - return visit(ctx.anyFunction()); - } + public QueryTokenStream visitCurrentDateFunction(HqlParser.CurrentDateFunctionContext ctx) { - @Override - public QueryTokenStream visitTreatedPathInvocation(HqlParser.TreatedPathInvocationContext ctx) { - return visit(ctx.treatedPath()); + QueryRendererBuilder builder = QueryRenderer.builder(); + + if (ctx.CURRENT_DATE() != null) { + builder.append(QueryTokens.token(ctx.CURRENT_DATE())); + builder.append(TOKEN_OPEN_PAREN); + builder.append(TOKEN_CLOSE_PAREN); + } else { + builder.append(QueryTokens.expression(ctx.CURRENT())); + builder.append(QueryTokens.expression(ctx.DATE())); + } + + return builder; + } + + @Override + public QueryTokenStream visitCurrentTimeFunction(HqlParser.CurrentTimeFunctionContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + + if (ctx.CURRENT_TIME() != null) { + builder.append(QueryTokens.token(ctx.CURRENT_TIME())); + builder.append(TOKEN_OPEN_PAREN); + builder.append(TOKEN_CLOSE_PAREN); + } else { + builder.append(QueryTokens.expression(ctx.CURRENT())); + builder.append(QueryTokens.expression(ctx.TIME())); + } + + return builder; + } + + @Override + public QueryTokenStream visitCurrentTimestampFunction(HqlParser.CurrentTimestampFunctionContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + + if (ctx.CURRENT_TIMESTAMP() != null) { + builder.append(QueryTokens.token(ctx.CURRENT_TIMESTAMP())); + builder.append(TOKEN_OPEN_PAREN); + builder.append(TOKEN_CLOSE_PAREN); + } else { + builder.append(QueryTokens.expression(ctx.CURRENT())); + builder.append(QueryTokens.expression(ctx.TIMESTAMP())); + } + + return builder; + } + + @Override + public QueryTokenStream visitInstantFunction(HqlParser.InstantFunctionContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + + if (ctx.CURRENT_INSTANT() != null) { + builder.append(QueryTokens.token(ctx.CURRENT_INSTANT())); + builder.append(TOKEN_OPEN_PAREN); + builder.append(TOKEN_CLOSE_PAREN); + } else { + builder.append(QueryTokens.expression(ctx.INSTANT())); + } + + return builder; + } + + @Override + public QueryTokenStream visitLocalDateTimeFunction(HqlParser.LocalDateTimeFunctionContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + + if (ctx.LOCAL_DATETIME() != null) { + builder.append(QueryTokens.token(ctx.LOCAL_DATETIME())); + builder.append(TOKEN_OPEN_PAREN); + builder.append(TOKEN_CLOSE_PAREN); + } else { + builder.append(QueryTokens.expression(ctx.LOCAL())); + builder.append(QueryTokens.expression(ctx.DATETIME())); + } + + return builder; + } + + @Override + public QueryTokenStream visitOffsetDateTimeFunction(HqlParser.OffsetDateTimeFunctionContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + + if (ctx.OFFSET_DATETIME() != null) { + builder.append(QueryTokens.token(ctx.OFFSET_DATETIME())); + builder.append(TOKEN_OPEN_PAREN); + builder.append(TOKEN_CLOSE_PAREN); + } else { + builder.append(QueryTokens.expression(ctx.OFFSET())); + builder.append(QueryTokens.expression(ctx.DATETIME())); + } + + return builder; + } + + @Override + public QueryTokenStream visitLocalDateFunction(HqlParser.LocalDateFunctionContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + + if (ctx.LOCAL_DATE() != null) { + builder.append(QueryTokens.token(ctx.LOCAL_DATE())); + builder.append(TOKEN_OPEN_PAREN); + builder.append(TOKEN_CLOSE_PAREN); + } else { + builder.append(QueryTokens.expression(ctx.LOCAL())); + builder.append(QueryTokens.expression(ctx.DATE())); + } + + return builder; + } + + @Override + public QueryTokenStream visitLocalTimeFunction(HqlParser.LocalTimeFunctionContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + + if (ctx.LOCAL_TIME() != null) { + builder.append(QueryTokens.token(ctx.LOCAL_TIME())); + builder.append(TOKEN_OPEN_PAREN); + builder.append(TOKEN_CLOSE_PAREN); + } else { + builder.append(QueryTokens.expression(ctx.LOCAL())); + builder.append(QueryTokens.expression(ctx.TIME())); + } + + return builder; + } + + @Override + public QueryTokenStream visitFormatFunction(HqlParser.FormatFunctionContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + + builder.append(QueryTokens.token(ctx.FORMAT())); + builder.append(TOKEN_OPEN_PAREN); + builder.append(visit(ctx.expression())); + builder.append(QueryTokens.expression(ctx.AS())); + builder.appendInline(visit(ctx.format())); + builder.append(TOKEN_CLOSE_PAREN); + + return builder; + } + + @Override + public QueryTokenStream visitCollation(HqlParser.CollationContext ctx) { + return visit(ctx.simplePath()); + } + + @Override + public QueryTokenStream visitCollateFunction(HqlParser.CollateFunctionContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + + builder.append(QueryTokens.token(ctx.COLLATE())); + builder.append(TOKEN_OPEN_PAREN); + builder.append(visit(ctx.expression())); + builder.append(QueryTokens.expression(ctx.AS())); + builder.appendInline(visit(ctx.collation())); + builder.append(TOKEN_CLOSE_PAREN); + + return builder; + } + + @Override + public QueryTokenStream visitCube(HqlParser.CubeContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + + builder.append(QueryTokens.token(ctx.CUBE())); + builder.append(TOKEN_OPEN_PAREN); + builder.appendInline(QueryTokenStream.concat(ctx.expressionOrPredicate(), this::visit, TOKEN_COMMA)); + builder.append(TOKEN_CLOSE_PAREN); + + return builder; + } + + @Override + public QueryTokenStream visitRollup(HqlParser.RollupContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + + builder.append(QueryTokens.token(ctx.ROLLUP())); + builder.append(TOKEN_OPEN_PAREN); + builder.appendInline(QueryTokenStream.concat(ctx.expressionOrPredicate(), this::visit, TOKEN_COMMA)); + builder.append(TOKEN_CLOSE_PAREN); + + return builder; + } + + @Override + public QueryTokenStream visitFormat(HqlParser.FormatContext ctx) { + return visit(ctx.stringLiteral()); + } + + @Override + public QueryTokenStream visitTruncFunction(HqlParser.TruncFunctionContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + + if (ctx.TRUNC() != null) { + builder.append(QueryTokens.token(ctx.TRUNC())); + } else { + builder.append(QueryTokens.token(ctx.TRUNCATE())); + } + + builder.append(TOKEN_OPEN_PAREN); + + if (ctx.datetimeField() != null) { + builder.append(visit(ctx.expression(0))); + builder.append(TOKEN_COMMA); + builder.append(visit(ctx.datetimeField())); + } else { + builder.append(QueryTokenStream.concat(ctx.expression(), this::visit, TOKEN_COMMA)); + } + builder.append(TOKEN_CLOSE_PAREN); + + return builder; } @Override - public QueryTokenStream visitFunctionArguments(HqlParser.FunctionArgumentsContext ctx) { + public QueryTokenStream visitJpaNonstandardFunction(HqlParser.JpaNonstandardFunctionContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + + builder.append(QueryTokens.token(ctx.FUNCTION())); + builder.append(TOKEN_OPEN_PAREN); + + QueryRendererBuilder nested = QueryRenderer.builder(); + nested.appendInline(visit(ctx.jpaNonstandardFunctionName())); + + if (ctx.castTarget() != null) { + nested.append(QueryTokens.expression(ctx.AS())); + nested.append(visit(ctx.castTarget())); + } + + if (ctx.genericFunctionArguments() != null) { + nested.append(TOKEN_COMMA); + nested.appendInline(visit(ctx.genericFunctionArguments())); + } + + builder.appendInline(nested); + builder.append(TOKEN_CLOSE_PAREN); + + return builder; + } + + @Override + public QueryTokenStream visitJpaNonstandardFunctionName(HqlParser.JpaNonstandardFunctionNameContext ctx) { + + if (ctx.identifier() != null) { + return visit(ctx.identifier()); + } + + return visit(ctx.stringLiteral()); + } + + @Override + public QueryTokenStream visitColumnFunction(HqlParser.ColumnFunctionContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + + builder.append(QueryTokens.token(ctx.COLUMN())); + builder.append(TOKEN_OPEN_PAREN); + + QueryRendererBuilder nested = QueryRenderer.builder(); + nested.appendInline(visit(ctx.path())); + nested.append(TOKEN_DOT); + nested.appendExpression(visit(ctx.jpaNonstandardFunctionName())); + + if (ctx.castTarget() != null) { + nested.append(QueryTokens.expression(ctx.AS())); + nested.appendExpression(visit(ctx.jpaNonstandardFunctionName())); + } + + builder.appendInline(nested); + builder.append(TOKEN_CLOSE_PAREN); + + return builder; + } + + @Override + public QueryTokenStream visitGenericFunctionName(HqlParser.GenericFunctionNameContext ctx) { + return visit(ctx.simplePath()); + } + + @Override + public QueryTokenStream visitGenericFunctionArguments(HqlParser.GenericFunctionArgumentsContext ctx) { QueryRendererBuilder builder = QueryRenderer.builder(); @@ -1634,31 +2011,239 @@ public QueryTokenStream visitFunctionArguments(HqlParser.FunctionArgumentsContex builder.append(QueryTokens.expression(ctx.DISTINCT())); } + if (ctx.datetimeField() != null) { + builder.append(visit(ctx.datetimeField())); + builder.append(TOKEN_COMMA); + } + builder.append(QueryTokenStream.concat(ctx.expressionOrPredicate(), this::visit, TOKEN_COMMA)); return builder; } @Override - public QueryTokenStream visitFilterClause(HqlParser.FilterClauseContext ctx) { + public QueryTokenStream visitCollectionSizeFunction(HqlParser.CollectionSizeFunctionContext ctx) { QueryRendererBuilder builder = QueryRenderer.builder(); - builder.append(QueryTokens.expression(ctx.FILTER())); + builder.append(QueryTokens.token(ctx.SIZE())); builder.append(TOKEN_OPEN_PAREN); - builder.appendInline(visit(ctx.whereClause())); + builder.appendInline(visit(ctx.path())); builder.append(TOKEN_CLOSE_PAREN); return builder; } @Override - public QueryTokenStream visitWithinGroup(HqlParser.WithinGroupContext ctx) { + public QueryTokenStream visitElementAggregateFunction(HqlParser.ElementAggregateFunctionContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + + if (ctx.MAXELEMENT() != null || ctx.MINELEMENT() != null) { + builder.append(QueryTokens.token(ctx.MAXELEMENT() != null ? ctx.MAXELEMENT() : ctx.MINELEMENT())); + builder.append(TOKEN_OPEN_PAREN); + builder.append(visit(ctx.path())); + builder.append(TOKEN_CLOSE_PAREN); + } else { + + if (ctx.MAX() != null) { + builder.append(QueryTokens.token(ctx.MAX())); + } + if (ctx.MIN() != null) { + builder.append(QueryTokens.token(ctx.MIN())); + } + if (ctx.SUM() != null) { + builder.append(QueryTokens.token(ctx.SUM())); + } + if (ctx.AVG() != null) { + builder.append(QueryTokens.token(ctx.AVG())); + } + + builder.append(TOKEN_OPEN_PAREN); + builder.append(visit(ctx.elementsValuesQuantifier())); + builder.append(TOKEN_OPEN_PAREN); + + if (ctx.path() != null) { + builder.append(visit(ctx.path())); + } + + builder.append(TOKEN_CLOSE_PAREN); + builder.append(TOKEN_CLOSE_PAREN); + } + + return builder; + } + + @Override + public QueryTokenStream visitIndexAggregateFunction(HqlParser.IndexAggregateFunctionContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + + if (ctx.MAXINDEX() != null || ctx.MININDEX() != null) { + builder.append(QueryTokens.token(ctx.MAXINDEX() != null ? ctx.MAXINDEX() : ctx.MININDEX())); + builder.append(TOKEN_OPEN_PAREN); + builder.append(visit(ctx.path())); + builder.append(TOKEN_CLOSE_PAREN); + } else { + + if (ctx.MAX() != null) { + builder.append(QueryTokens.token(ctx.MAX())); + } + if (ctx.MIN() != null) { + builder.append(QueryTokens.token(ctx.MIN())); + } + if (ctx.SUM() != null) { + builder.append(QueryTokens.token(ctx.SUM())); + } + if (ctx.AVG() != null) { + builder.append(QueryTokens.token(ctx.AVG())); + } + + builder.append(TOKEN_OPEN_PAREN); + builder.append(visit(ctx.indicesKeysQuantifier())); + builder.append(TOKEN_OPEN_PAREN); + + if (ctx.path() != null) { + builder.append(visit(ctx.path())); + } + + builder.append(TOKEN_CLOSE_PAREN); + builder.append(TOKEN_CLOSE_PAREN); + } + + return builder; + } + + @Override + public QueryTokenStream visitCollectionFunctionMisuse(HqlParser.CollectionFunctionMisuseContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + + builder.append( + visit(ctx.elementsValuesQuantifier() != null ? ctx.elementsValuesQuantifier() : ctx.indicesKeysQuantifier())); + builder.append(TOKEN_OPEN_PAREN); + builder.append(visit(ctx.path())); + builder.append(TOKEN_CLOSE_PAREN); + + return builder; + } + + @Override + public QueryTokenStream visitAggregateFunction(HqlParser.AggregateFunctionContext ctx) { + + if (ctx.everyFunction() != null) { + return visit(ctx.everyFunction()); + } + + if (ctx.anyFunction() != null) { + return visit(ctx.anyFunction()); + } + + return visit(ctx.listaggFunction()); + } + + @Override + public QueryTokenStream visitEveryAllQuantifier(HqlParser.EveryAllQuantifierContext ctx) { + + if (ctx.EVERY() != null) { + return QueryRenderer.from(QueryTokens.token(ctx.EVERY())); + } + + return QueryRenderer.from(QueryTokens.token(ctx.ALL())); + } + + @Override + public QueryTokenStream visitAnySomeQuantifier(HqlParser.AnySomeQuantifierContext ctx) { + + if (ctx.ANY() != null) { + return QueryRenderer.from(QueryTokens.token(ctx.ANY())); + } + + return QueryRenderer.from(QueryTokens.token(ctx.SOME())); + } + + @Override + public QueryTokenStream visitListaggFunction(HqlParser.ListaggFunctionContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + + builder.append(QueryTokens.token(ctx.LISTAGG())); + builder.append(TOKEN_OPEN_PAREN); + + QueryRendererBuilder nested = QueryRenderer.builder(); + + if (ctx.DISTINCT() != null) { + builder.append(QueryTokens.expression(ctx.DISTINCT())); + } + + builder.appendInline(visit(ctx.expressionOrPredicate(0))); + builder.append(TOKEN_COMMA); + builder.appendInline(visit(ctx.expressionOrPredicate(1))); + + if (ctx.onOverflowClause() != null) { + builder.appendExpression(visit(ctx.onOverflowClause())); + } + + builder.appendInline(nested); + builder.append(TOKEN_CLOSE_PAREN); + + if (ctx.withinGroupClause() != null) { + builder.appendExpression(visit(ctx.withinGroupClause())); + } + + if (ctx.filterClause() != null) { + builder.appendExpression(visit(ctx.filterClause())); + } + + if (ctx.overClause() != null) { + builder.appendExpression(visit(ctx.overClause())); + } + + return builder; + } + + @Override + public QueryTokenStream visitOnOverflowClause(HqlParser.OnOverflowClauseContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + + builder.append(QueryTokens.expression(ctx.ON())); + builder.append(QueryTokens.expression(ctx.OVERFLOW())); + + if (ctx.ERROR() != null) { + builder.append(QueryTokens.expression(ctx.ERROR())); + } else { + + builder.append(QueryTokens.expression(ctx.TRUNCATE())); + + if (ctx.expression() != null) { + builder.appendExpression(visit(ctx.expression())); + } + + if (ctx.WITH() != null) { + builder.append(QueryTokens.expression(ctx.WITH())); + } + + if (ctx.WITHOUT() != null) { + builder.append(QueryTokens.expression(ctx.WITHOUT())); + } + + if (ctx.COUNT() != null) { + builder.append(QueryTokens.expression(ctx.COUNT())); + } + } + + return builder; + } + + @Override + public QueryTokenStream visitWithinGroupClause(HqlParser.WithinGroupClauseContext ctx) { QueryRendererBuilder builder = QueryRenderer.builder(); builder.append(QueryTokens.expression(ctx.WITHIN())); builder.append(QueryTokens.expression(ctx.GROUP())); + builder.append(TOKEN_OPEN_PAREN); builder.appendInline(visit(ctx.orderByClause())); builder.append(TOKEN_CLOSE_PAREN); @@ -1667,211 +2252,415 @@ public QueryTokenStream visitWithinGroup(HqlParser.WithinGroupContext ctx) { } @Override - public QueryTokenStream visitOverClause(HqlParser.OverClauseContext ctx) { + public QueryTokenStream visitNullsClause(HqlParser.NullsClauseContext ctx) { QueryRendererBuilder builder = QueryRenderer.builder(); - builder.append(QueryTokens.expression(ctx.OVER())); - QueryRendererBuilder nested = QueryRenderer.builder(); - nested.append(TOKEN_OPEN_PAREN); + if (ctx.IGNORE() != null) { + builder.append(QueryTokens.expression(ctx.IGNORE())); + } else { + builder.append(QueryTokens.expression(ctx.RESPECT())); + } - List trees = new ArrayList<>(); + builder.append(QueryTokens.expression(ctx.NULLS())); - if (ctx.partitionClause() != null) { - trees.add(ctx.partitionClause()); + return builder; + } + + @Override + public QueryTokenStream visitNthSideClause(HqlParser.NthSideClauseContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + + builder.append(QueryTokens.expression(ctx.FROM())); + + if (ctx.FIRST() != null) { + builder.append(QueryTokens.expression(ctx.FIRST())); + } else { + builder.append(QueryTokens.expression(ctx.LAST())); } - if (ctx.orderByClause() != null) { - trees.add(ctx.orderByClause()); + return builder; + } + + @Override + public QueryTokenStream visitFrameStart(HqlParser.FrameStartContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + + if (ctx.CURRENT() != null) { + + builder.append(QueryTokens.expression(ctx.CURRENT())); + builder.append(QueryTokens.expression(ctx.ROW())); + } else if (ctx.UNBOUNDED() != null) { + builder.append(QueryTokens.expression(ctx.UNBOUNDED())); + builder.append(QueryTokens.expression(ctx.PRECEDING())); + } else { + + builder.appendExpression(visit(ctx.expression())); + builder.append(QueryTokens.expression(ctx.PRECEDING() != null ? ctx.PRECEDING() : ctx.FOLLOWING())); } - if (ctx.frameClause() != null) { - trees.add(ctx.frameClause()); + return builder; + + } + + @Override + public QueryTokenStream visitFrameEnd(HqlParser.FrameEndContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + + if (ctx.CURRENT() != null) { + + builder.append(QueryTokens.expression(ctx.CURRENT())); + builder.append(QueryTokens.expression(ctx.ROW())); + } else if (ctx.UNBOUNDED() != null) { + builder.append(QueryTokens.expression(ctx.UNBOUNDED())); + builder.append(QueryTokens.expression(ctx.FOLLOWING())); + } else { + + builder.appendExpression(visit(ctx.expression())); + builder.append(QueryTokens.expression(ctx.PRECEDING() != null ? ctx.PRECEDING() : ctx.FOLLOWING())); + } + + return builder; + } + + @Override + public QueryTokenStream visitFrameExclusion(HqlParser.FrameExclusionContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + + builder.append(QueryTokens.expression(ctx.EXCLUDE())); + + if (ctx.CURRENT() != null) { + builder.append(QueryTokens.expression(ctx.CURRENT())); + builder.append(QueryTokens.expression(ctx.ROW())); + } else if (ctx.GROUP() != null) { + builder.append(QueryTokens.expression(ctx.GROUP())); + } else if (ctx.TIES() != null) { + builder.append(QueryTokens.expression(ctx.TIES())); + } else { + builder.append(QueryTokens.expression(ctx.NO())); + builder.append(QueryTokens.expression(ctx.OTHERS())); + } + + return builder; + } + + @Override + public QueryTokenStream visitCollectionQuantifier(HqlParser.CollectionQuantifierContext ctx) { + + if (ctx.elementsValuesQuantifier() != null) { + return visit(ctx.elementsValuesQuantifier()); + } + + return visit(ctx.indicesKeysQuantifier()); + } + + @Override + public QueryTokenStream visitElementsValuesQuantifier(HqlParser.ElementsValuesQuantifierContext ctx) { + return QueryRenderer.from(QueryTokens.token(ctx.ELEMENTS() != null ? ctx.ELEMENTS() : ctx.VALUES())); + } + + @Override + public QueryTokenStream visitIndicesKeysQuantifier(HqlParser.IndicesKeysQuantifierContext ctx) { + return QueryRenderer.from(QueryTokens.token(ctx.INDICES() != null ? ctx.INDICES() : ctx.KEYS())); + } + + @Override + public QueryTokenStream visitGeneralPathExpression(HqlParser.GeneralPathExpressionContext ctx) { + return visit(ctx.generalPathFragment()); + } + + @Override + public QueryTokenStream visitPath(HqlParser.PathContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + + if (ctx.treatedPath() != null) { + + builder.append(visit(ctx.treatedPath())); + + if (ctx.pathContinutation() != null) { + builder.append(visit(ctx.pathContinutation())); + } + } else if (ctx.generalPathFragment() != null) { + builder.append(visit(ctx.generalPathFragment())); + } + + return builder; + } + + @Override + public QueryTokenStream visitGeneralPathFragment(HqlParser.GeneralPathFragmentContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + + builder.append(visit(ctx.simplePath())); + + if (ctx.indexedPathAccessFragment() != null) { + builder.append(visit(ctx.indexedPathAccessFragment())); + } + + return builder; + } + + @Override + public QueryTokenStream visitIndexedPathAccessFragment(HqlParser.IndexedPathAccessFragmentContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + + builder.append(TOKEN_OPEN_SQUARE_BRACKET); + builder.appendInline(visit(ctx.expression())); + builder.append(TOKEN_CLOSE_SQUARE_BRACKET); + + if (ctx.generalPathFragment() != null) { + + builder.append(TOKEN_DOT); + builder.append(visit(ctx.generalPathFragment())); + } + + return builder; + } + + @Override + public QueryTokenStream visitSimplePath(HqlParser.SimplePathContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + + builder.append(visit(ctx.identifier())); + + if (!ctx.simplePathElement().isEmpty()) { + builder.append(TOKEN_DOT); } - nested.appendInline(QueryTokenStream.concat(trees, this::visit, TOKEN_SPACE)); - nested.append(TOKEN_CLOSE_PAREN); - - builder.appendInline(nested); + builder.append(QueryTokenStream.concat(ctx.simplePathElement(), this::visit, TOKEN_DOT)); return builder; } @Override - public QueryTokenStream visitPartitionClause(HqlParser.PartitionClauseContext ctx) { + public QueryTokenStream visitSimplePathElement(HqlParser.SimplePathElementContext ctx) { QueryRendererBuilder builder = QueryRenderer.builder(); - builder.append(QueryTokens.expression(ctx.PARTITION())); - builder.append(QueryTokens.expression(ctx.BY())); - - builder.append(QueryTokenStream.concat(ctx.expression(), this::visit, TOKEN_COMMA)); + builder.append(visit(ctx.identifier())); return builder; } @Override - public QueryTokenStream visitFrameClause(HqlParser.FrameClauseContext ctx) { - - QueryRendererBuilder builder = QueryRenderer.builder(); + public QueryTokenStream visitCaseList(HqlParser.CaseListContext ctx) { - if (ctx.RANGE() != null) { - builder.append(QueryTokens.expression(ctx.RANGE())); - } else if (ctx.ROWS() != null) { - builder.append(QueryTokens.expression(ctx.ROWS())); - } else if (ctx.GROUPS() != null) { - builder.append(QueryTokens.expression(ctx.GROUPS())); + if (ctx.simpleCaseExpression() != null) { + return visit(ctx.simpleCaseExpression()); + } else if (ctx.searchedCaseExpression() != null) { + return visit(ctx.searchedCaseExpression()); + } else { + return QueryTokenStream.empty(); } + } - if (ctx.BETWEEN() != null) { - builder.append(QueryTokens.expression(ctx.BETWEEN())); - } + @Override + public QueryTokenStream visitSimpleCaseExpression(HqlParser.SimpleCaseExpressionContext ctx) { - builder.appendExpression(visit(ctx.frameStart())); + QueryRendererBuilder builder = QueryRenderer.builder(); - if (ctx.AND() != null) { + builder.append(QueryTokens.expression(ctx.CASE())); + builder.append(visit(ctx.expressionOrPredicate(0))); - builder.append(QueryTokens.expression(ctx.AND())); - builder.appendExpression(visit(ctx.frameEnd())); - } + ctx.caseWhenExpressionClause().forEach(caseWhenExpressionClauseContext -> { + builder.append(visit(caseWhenExpressionClauseContext)); + }); - if (ctx.frameExclusion() != null) { - builder.appendExpression(visit(ctx.frameExclusion())); + if (ctx.ELSE() != null) { + + builder.append(QueryTokens.expression(ctx.ELSE())); + builder.append(visit(ctx.expressionOrPredicate(1))); } + builder.append(QueryTokens.expression(ctx.END())); + return builder; } @Override - public QueryTokenStream visitUnboundedPrecedingFrameStart(HqlParser.UnboundedPrecedingFrameStartContext ctx) { + public QueryTokenStream visitSearchedCaseExpression(HqlParser.SearchedCaseExpressionContext ctx) { QueryRendererBuilder builder = QueryRenderer.builder(); - builder.append(QueryTokens.expression(ctx.UNBOUNDED())); - builder.append(QueryTokens.expression(ctx.PRECEDING())); + builder.append(QueryTokens.expression(ctx.CASE())); + + builder.append(QueryTokenStream.concat(ctx.caseWhenPredicateClause(), this::visit, TOKEN_SPACE)); + + if (ctx.ELSE() != null) { + + builder.append(QueryTokens.expression(ctx.ELSE())); + builder.appendExpression(visit(ctx.expressionOrPredicate())); + } + + builder.append(QueryTokens.expression(ctx.END())); return builder; } @Override - public QueryTokenStream visitExpressionPrecedingFrameStart(HqlParser.ExpressionPrecedingFrameStartContext ctx) { + public QueryTokenStream visitCaseWhenExpressionClause(HqlParser.CaseWhenExpressionClauseContext ctx) { QueryRendererBuilder builder = QueryRenderer.builder(); + builder.append(QueryTokens.expression(ctx.WHEN())); builder.appendExpression(visit(ctx.expression())); - builder.append(QueryTokens.expression(ctx.PRECEDING())); + builder.append(QueryTokens.expression(ctx.THEN())); + builder.appendExpression(visit(ctx.expressionOrPredicate())); return builder; } @Override - public QueryTokenStream visitCurrentRowFrameStart(HqlParser.CurrentRowFrameStartContext ctx) { + public QueryTokenStream visitCaseWhenPredicateClause(HqlParser.CaseWhenPredicateClauseContext ctx) { QueryRendererBuilder builder = QueryRenderer.builder(); - builder.append(QueryTokens.expression(ctx.CURRENT())); - builder.append(QueryTokens.expression(ctx.ROW())); + builder.append(QueryTokens.expression(ctx.WHEN())); + builder.appendExpression(visit(ctx.predicate())); + builder.append(QueryTokens.expression(ctx.THEN())); + builder.appendExpression(visit(ctx.expressionOrPredicate())); return builder; } @Override - public QueryTokenStream visitExpressionFollowingFrameStart(HqlParser.ExpressionFollowingFrameStartContext ctx) { + public QueryTokenStream visitGenericFunction(HqlParser.GenericFunctionContext ctx) { QueryRendererBuilder builder = QueryRenderer.builder(); + QueryRendererBuilder nested = QueryRenderer.builder(); - builder.appendExpression(visit(ctx.expression())); - builder.append(QueryTokens.expression(ctx.FOLLOWING())); + nested.append(visit(ctx.genericFunctionName())); + nested.append(TOKEN_OPEN_PAREN); - return builder; - } + if (ctx.genericFunctionArguments() != null) { + nested.appendInline(visit(ctx.genericFunctionArguments())); + } else if (ctx.ASTERISK() != null) { + nested.append(QueryTokens.token(ctx.ASTERISK())); + } - @Override - public QueryTokenStream visitCurrentRowFrameExclusion(HqlParser.CurrentRowFrameExclusionContext ctx) { + nested.append(TOKEN_CLOSE_PAREN); + builder.append(nested); - QueryRendererBuilder builder = QueryRenderer.builder(); + if (ctx.pathContinutation() != null) { + builder.append(visit(ctx.pathContinutation())); + } - builder.append(QueryTokens.expression(ctx.EXCLUDE())); - builder.append(QueryTokens.expression(ctx.CURRENT())); - builder.append(QueryTokens.expression(ctx.ROW())); + if (ctx.nthSideClause() != null) { + builder.appendExpression(visit(ctx.nthSideClause())); + } - return builder; - } + if (ctx.nullsClause() != null) { + builder.appendExpression(visit(ctx.nullsClause())); + } - @Override - public QueryTokenStream visitGroupFrameExclusion(HqlParser.GroupFrameExclusionContext ctx) { + if (ctx.withinGroupClause() != null) { + builder.appendExpression(visit(ctx.withinGroupClause())); + } - QueryRendererBuilder builder = QueryRenderer.builder(); + if (ctx.filterClause() != null) { + builder.appendExpression(visit(ctx.filterClause())); + } - builder.append(QueryTokens.expression(ctx.EXCLUDE())); - builder.append(QueryTokens.expression(ctx.GROUP())); + if (ctx.overClause() != null) { + builder.appendExpression(visit(ctx.overClause())); + } return builder; } @Override - public QueryTokenStream visitTiesFrameExclusion(HqlParser.TiesFrameExclusionContext ctx) { + public QueryTokenStream visitFilterClause(HqlParser.FilterClauseContext ctx) { QueryRendererBuilder builder = QueryRenderer.builder(); - builder.append(QueryTokens.expression(ctx.EXCLUDE())); - builder.append(QueryTokens.expression(ctx.TIES())); + builder.append(QueryTokens.expression(ctx.FILTER())); + builder.append(TOKEN_OPEN_PAREN); + builder.appendInline(visit(ctx.whereClause())); + builder.append(TOKEN_CLOSE_PAREN); return builder; } @Override - public QueryTokenStream visitNoOthersFrameExclusion(HqlParser.NoOthersFrameExclusionContext ctx) { + public QueryTokenStream visitOverClause(HqlParser.OverClauseContext ctx) { QueryRendererBuilder builder = QueryRenderer.builder(); + builder.append(QueryTokens.expression(ctx.OVER())); - builder.append(QueryTokens.expression(ctx.EXCLUDE())); - builder.append(QueryTokens.expression(ctx.NO())); - builder.append(QueryTokens.expression(ctx.OTHERS())); + QueryRendererBuilder nested = QueryRenderer.builder(); + nested.append(TOKEN_OPEN_PAREN); - return builder; - } + List trees = new ArrayList<>(); - @Override - public QueryTokenStream visitExpressionPrecedingFrameEnd(HqlParser.ExpressionPrecedingFrameEndContext ctx) { + if (ctx.partitionClause() != null) { + trees.add(ctx.partitionClause()); + } - QueryRendererBuilder builder = QueryRenderer.builder(); + if (ctx.orderByClause() != null) { + trees.add(ctx.orderByClause()); + } - builder.appendExpression(visit(ctx.expression())); - builder.append(QueryTokens.expression(ctx.PRECEDING())); + if (ctx.frameClause() != null) { + trees.add(ctx.frameClause()); + } + + nested.appendInline(QueryTokenStream.concat(trees, this::visit, TOKEN_SPACE)); + nested.append(TOKEN_CLOSE_PAREN); + + builder.appendInline(nested); return builder; } @Override - public QueryTokenStream visitCurrentRowFrameEnd(HqlParser.CurrentRowFrameEndContext ctx) { + public QueryTokenStream visitPartitionClause(HqlParser.PartitionClauseContext ctx) { QueryRendererBuilder builder = QueryRenderer.builder(); - builder.append(QueryTokens.expression(ctx.CURRENT())); - builder.append(QueryTokens.expression(ctx.ROW())); + builder.append(QueryTokens.expression(ctx.PARTITION())); + builder.append(QueryTokens.expression(ctx.BY())); + + builder.append(QueryTokenStream.concat(ctx.expression(), this::visit, TOKEN_COMMA)); return builder; } @Override - public QueryTokenStream visitExpressionFollowingFrameEnd(HqlParser.ExpressionFollowingFrameEndContext ctx) { + public QueryTokenStream visitFrameClause(HqlParser.FrameClauseContext ctx) { QueryRendererBuilder builder = QueryRenderer.builder(); - builder.appendExpression(visit(ctx.expression())); - builder.append(QueryTokens.expression(ctx.FOLLOWING())); + if (ctx.RANGE() != null) { + builder.append(QueryTokens.expression(ctx.RANGE())); + } else if (ctx.ROWS() != null) { + builder.append(QueryTokens.expression(ctx.ROWS())); + } else if (ctx.GROUPS() != null) { + builder.append(QueryTokens.expression(ctx.GROUPS())); + } - return builder; - } + if (ctx.BETWEEN() != null) { + builder.append(QueryTokens.expression(ctx.BETWEEN())); + } - @Override - public QueryTokenStream visitUnboundedFollowingFrameEnd(HqlParser.UnboundedFollowingFrameEndContext ctx) { + builder.appendExpression(visit(ctx.frameStart())); - QueryRendererBuilder builder = QueryRenderer.builder(); + if (ctx.AND() != null) { - builder.append(QueryTokens.expression(ctx.UNBOUNDED())); - builder.append(QueryTokens.expression(ctx.FOLLOWING())); + builder.append(QueryTokens.expression(ctx.AND())); + builder.appendExpression(visit(ctx.frameEnd())); + } + + if (ctx.frameExclusion() != null) { + builder.appendExpression(visit(ctx.frameExclusion())); + } return builder; } @@ -1941,23 +2730,49 @@ public QueryTokenStream visitExtractFunction(HqlParser.ExtractFunctionContext ct QueryRendererBuilder nested = QueryRenderer.builder(); - nested.appendExpression(visit(ctx.expression(0))); + nested.appendExpression(visit(ctx.extractField())); nested.append(QueryTokens.expression(ctx.FROM())); - nested.append(visit(ctx.expression(1))); + nested.append(visit(ctx.expression())); builder.appendInline(nested); builder.append(TOKEN_CLOSE_PAREN); - } else if (ctx.dateTimeFunction() != null) { + } else if (ctx.datetimeField() != null) { - builder.append(visit(ctx.dateTimeFunction())); + builder.append(visit(ctx.datetimeField())); builder.append(TOKEN_OPEN_PAREN); - builder.appendInline(visit(ctx.expression(0))); + builder.appendInline(visit(ctx.expression())); builder.append(TOKEN_CLOSE_PAREN); } return builder; } + @Override + public QueryTokenStream visitExtractField(HqlParser.ExtractFieldContext ctx) { + + if (ctx.datetimeField() != null) { + return visit(ctx.datetimeField()); + } + + if (ctx.dayField() != null) { + return visit(ctx.dayField()); + } + + if (ctx.weekField() != null) { + return visit(ctx.weekField()); + } + + if (ctx.timeZoneField() != null) { + return visit(ctx.timeZoneField()); + } + + if (ctx.dateOrTimeField() != null) { + return visit(ctx.dateOrTimeField()); + } + + return QueryRenderer.builder(); + } + @Override public QueryTokenStream visitTrimFunction(HqlParser.TrimFunctionContext ctx) { @@ -1966,31 +2781,51 @@ public QueryTokenStream visitTrimFunction(HqlParser.TrimFunctionContext ctx) { builder.append(QueryTokens.token(ctx.TRIM())); builder.append(TOKEN_OPEN_PAREN); - if (ctx.LEADING() != null) { - builder.append(QueryTokens.expression(ctx.LEADING())); - } else if (ctx.TRAILING() != null) { - builder.append(QueryTokens.expression(ctx.TRAILING())); - } else if (ctx.BOTH() != null) { - builder.append(QueryTokens.expression(ctx.BOTH())); + if (ctx.trimSpecification() != null) { + builder.appendExpression(visit(ctx.trimSpecification())); } - if (ctx.stringLiteral() != null) { - builder.append(visit(ctx.stringLiteral())); + if (ctx.trimCharacter() != null) { + builder.appendExpression(visit(ctx.trimCharacter())); } if (ctx.FROM() != null) { builder.append(QueryTokens.expression(ctx.FROM())); } - builder.appendInline(visit(ctx.expression())); + if (ctx.expression() != null) { + builder.append(visit(ctx.expression())); + } + builder.append(TOKEN_CLOSE_PAREN); return builder; } @Override - public QueryTokenStream visitDateTimeFunction(HqlParser.DateTimeFunctionContext ctx) { - return QueryRendererBuilder.from(QueryTokens.expression(ctx.d)); + public QueryTokenStream visitTrimSpecification(HqlParser.TrimSpecificationContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + + if (ctx.BOTH() != null) { + builder.append(QueryTokens.expression(ctx.BOTH())); + } else if (ctx.LEADING() != null) { + builder.append(QueryTokens.expression(ctx.LEADING())); + } else if (ctx.TRAILING() != null) { + builder.append(QueryTokens.expression(ctx.TRAILING())); + } + + return builder.build(); + } + + @Override + public QueryTokenStream visitTrimCharacter(HqlParser.TrimCharacterContext ctx) { + + if (ctx.stringLiteral() != null) { + return visit(ctx.stringLiteral()); + } + + return visit(ctx.parameter()); } @Override @@ -1998,25 +2833,32 @@ public QueryTokenStream visitEveryFunction(HqlParser.EveryFunctionContext ctx) { QueryRendererBuilder builder = QueryRenderer.builder(); - builder.append(QueryTokens.expression(ctx.every)); + builder.appendExpression(visit(ctx.everyAllQuantifier())); - if (ctx.ELEMENTS() != null) { - builder.append(QueryTokens.expression(ctx.ELEMENTS())); - } else if (ctx.INDICES() != null) { - builder.append(QueryTokens.expression(ctx.INDICES())); - } + if (ctx.predicate() != null) { + builder.append(TOKEN_OPEN_PAREN); + builder.appendInline(visit(ctx.predicate())); + builder.append(TOKEN_CLOSE_PAREN); - builder.append(TOKEN_OPEN_PAREN); + if (ctx.filterClause() != null) { + builder.appendExpression(visit(ctx.filterClause())); + } - if (ctx.predicate() != null) { - builder.append(visit(ctx.predicate())); + if (ctx.overClause() != null) { + builder.appendExpression(visit(ctx.overClause())); + } } else if (ctx.subquery() != null) { - builder.append(visit(ctx.subquery())); - } else if (ctx.simplePath() != null) { - builder.append(visit(ctx.simplePath())); - } + builder.append(TOKEN_OPEN_PAREN); + builder.appendInline(visit(ctx.subquery())); + builder.append(TOKEN_CLOSE_PAREN); + } else { - builder.append(TOKEN_CLOSE_PAREN); + builder.appendExpression(visit(ctx.collectionQuantifier())); + + builder.append(TOKEN_OPEN_PAREN); + builder.appendInline(visit(ctx.simplePath())); + builder.append(TOKEN_CLOSE_PAREN); + } return builder; } @@ -2026,25 +2868,32 @@ public QueryTokenStream visitAnyFunction(HqlParser.AnyFunctionContext ctx) { QueryRendererBuilder builder = QueryRenderer.builder(); - builder.append(QueryTokens.expression(ctx.any)); + builder.appendExpression(visit(ctx.anySomeQuantifier())); - if (ctx.ELEMENTS() != null) { - builder.append(QueryTokens.expression(ctx.ELEMENTS())); - } else if (ctx.INDICES() != null) { - builder.append(QueryTokens.expression(ctx.INDICES())); - } + if (ctx.predicate() != null) { + builder.append(TOKEN_OPEN_PAREN); + builder.appendInline(visit(ctx.predicate())); + builder.append(TOKEN_CLOSE_PAREN); - builder.append(TOKEN_OPEN_PAREN); + if (ctx.filterClause() != null) { + builder.appendExpression(visit(ctx.filterClause())); + } - if (ctx.predicate() != null) { - builder.append(visit(ctx.predicate())); + if (ctx.overClause() != null) { + builder.appendExpression(visit(ctx.overClause())); + } } else if (ctx.subquery() != null) { - builder.append(visit(ctx.subquery())); - } else if (ctx.simplePath() != null) { - builder.append(visit(ctx.simplePath())); - } + builder.append(TOKEN_OPEN_PAREN); + builder.appendInline(visit(ctx.subquery())); + builder.append(TOKEN_CLOSE_PAREN); + } else { - builder.append(TOKEN_CLOSE_PAREN); + builder.appendExpression(visit(ctx.collectionQuantifier())); + + builder.append(TOKEN_OPEN_PAREN); + builder.appendInline(visit(ctx.simplePath())); + builder.append(TOKEN_CLOSE_PAREN); + } return builder; } @@ -2529,16 +3378,6 @@ public QueryTokenStream visitIdentifier(HqlParser.IdentifierContext ctx) { } } - @Override - public QueryTokenStream visitCharacter(HqlParser.CharacterContext ctx) { - return QueryRendererBuilder.from(QueryTokens.expression(ctx.CHARACTER())); - } - - @Override - public QueryTokenStream visitFunctionName(HqlParser.FunctionNameContext ctx) { - return QueryTokenStream.concat(ctx.reservedWord(), this::visit, TOKEN_DOT); - } - @Override public QueryTokenStream visitReservedWord(HqlParser.ReservedWordContext ctx) { diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryRendererTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryRendererTests.java index 8a23e279cd..4c25ec66f0 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryRendererTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryRendererTests.java @@ -37,6 +37,7 @@ * * @author Greg Turnquist * @author Christoph Strobl + * @author Mark Paluch * @since 3.1 */ class HqlQueryRendererTests { @@ -1551,9 +1552,11 @@ void castFunctionWithFqdnShouldWork() { assertQuery("SELECT o FROM Order o WHERE CAST(:userId AS java.util.UUID) IS NULL OR o.user.id = :userId"); } - @Test // GH-3025 - void durationLiteralsShouldWork() { - assertQuery("SELECT ce.id FROM CalendarEvent ce WHERE (ce.endDate - ce.startDate) > 5 MINUTE"); + @ParameterizedTest // GH-3025 + @ValueSource(strings = { "YEAR", "MONTH", "DAY", "WEEK", "QUARTER", "HOUR", "MINUTE", "SECOND", "NANOSECOND", + "NANOSECOND", "EPOCH" }) + void durationLiteralsShouldWork(String dtField) { + assertQuery("SELECT ce.id FROM CalendarEvent ce WHERE (ce.endDate - ce.startDate) > 5 %s".formatted(dtField)); } @Test // GH-3025 diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlSpecificationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlSpecificationTests.java index 3e459fa26e..0dff2c328e 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlSpecificationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlSpecificationTests.java @@ -21,6 +21,9 @@ import org.antlr.v4.runtime.CommonTokenStream; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.ValueSource; + import org.springframework.data.jpa.repository.query.QueryRenderer.TokenRenderer; /** @@ -31,6 +34,7 @@ * IMPORTANT: Purely verifies the parser without any transformations. * * @author Greg Turnquist + * @author Mark Paluch * @since 3.1 */ class HqlSpecificationTests { @@ -331,6 +335,177 @@ OR TREAT(e AS Contractor).hours > 100 """); } + @Test // GH-3689 + void generic() { + + assertQuery(""" + SELECT e FROM Employee e + WHERE FOO(x).bar RESPECT NULLS + """); + + assertQuery(""" + SELECT e FROM Employee e + WHERE FOO(x).bar IGNORE NULLS + """); + } + + @Test // GH-3689 + void size() { + + assertQuery(""" + SELECT e FROM Employee e + WHERE SIZE(x) > 1 + """); + } + + @Test // GH-3689 + void collectionAggregate() { + + assertQuery(""" + SELECT e FROM Employee e + WHERE MAXELEMENT(foo) > MINELEMENT(bar) + """); + + assertQuery(""" + SELECT e FROM Employee e + WHERE MININDEX(foo) > MAXINDEX(bar) + """); + } + + @Test // GH-3689 + void trunc() { + + assertQuery(""" + SELECT e FROM Employee e + WHERE TRUNC(x) = TRUNCATE(y) + """); + + assertQuery(""" + SELECT e FROM Employee e + WHERE TRUNC(e, 'foo') = TRUNCATE(e, 'bar') + """); + } + + @ParameterizedTest // GH-3689 + @ValueSource(strings = { "YYYY", "MONTH", "DAY", "WEEK", "QUARTER", "HOUR", "MINUTE", "SECOND", "NANOSECOND", + "NANOSECOND", "EPOCH" }) + void trunc(String truncation) { + + assertQuery(""" + SELECT e FROM Employee e + WHERE TRUNC(e, %1$s) = TRUNCATE(e, %1$s) + """.formatted(truncation)); + } + + @Test // GH-3689 + void format() { + + assertQuery(""" + SELECT e FROM Employee e + WHERE FORMAT(x AS 'foo') = FORMAT(x AS 'bar') + """); + } + + @Test // GH-3689 + void collate() { + + assertQuery(""" + SELECT e FROM Employee e + WHERE COLLATE(x AS foo) = COLLATE(x AS foo.bar) + """); + } + + @Test // GH-3689 + void substring() { + + assertQuery("select substring(c.number, 1, 2) " + // + "from Call c"); + + assertQuery("select substring(c.number, 1) " + // + "from Call c"); + + assertQuery("select substring(c.number FROM 1 FOR 2) " + // + "from Call c"); + + assertQuery("select substring(c.number FROM 1) " + // + "from Call c"); + } + + @Test // GH-3689 + void overlay() { + + assertQuery("select OVERLAY(c.number PLACING 1 FROM 2) " + // + "from Call c "); + + assertQuery("select OVERLAY(p.number PLACING 1 FROM 2 FOR 3) " + // + "from Call c "); + } + + @Test // GH-3689 + void pad() { + + assertQuery("select PAD(c.number WITH 1 LEADING) " + // + "from Call c "); + + assertQuery("select PAD(c.number WITH 1 TRAILING) " + // + "from Call c "); + + assertQuery("select PAD(c.number WITH 1 LEADING '0') " + // + "from Call c "); + + assertQuery("select PAD(c.number WITH 1 TRAILING '0') " + // + "from Call c "); + } + + @Test // GH-3689 + void position() { + + assertQuery("select POSITION(c.number IN 'foo') " + // + "from Call c "); + } + + @Test // GH-3689 + void currentDateFunctions() { + + assertQuery("select CURRENT DATE, CURRENT_DATE() " + // + "from Call c "); + + assertQuery("select CURRENT TIME, CURRENT_TIME() " + // + "from Call c "); + + assertQuery("select CURRENT TIMESTAMP, CURRENT_TIMESTAMP() " + // + "from Call c "); + + assertQuery("select INSTANT, CURRENT_INSTANT() " + // + "from Call c "); + + assertQuery("select LOCAL DATE, LOCAL_DATE() " + // + "from Call c "); + + assertQuery("select LOCAL TIME, LOCAL_TIME() " + // + "from Call c "); + + assertQuery("select LOCAL DATETIME, LOCAL_DATETIME() " + // + "from Call c "); + + assertQuery("select OFFSET DATETIME, OFFSET_DATETIME() " + // + "from Call c "); + } + + @Test // GH-3689 + void cube() { + + assertQuery("select CUBE(foo), CUBE(foo, bar) " + // + "from Call c "); + } + + @Test // GH-3689 + void rollup() { + + assertQuery("select ROLLUP(foo), ROLLUP(foo, bar) " + // + "from Call c "); + } + @Test void pathExpressionsNamedParametersExample() { @@ -383,6 +558,80 @@ WHERE EXISTS (SELECT spouseEmp """); } + @Test // GH-3689 + void everyAll() { + + assertQuery(""" + SELECT DISTINCT emp + FROM Employee emp + WHERE EVERY (SELECT spouseEmp + FROM Employee spouseEmp) > 1 + """); + + assertQuery(""" + SELECT DISTINCT emp + FROM Employee emp + WHERE ALL (SELECT spouseEmp + FROM Employee spouseEmp) > 1 + """); + + assertQuery(""" + SELECT DISTINCT emp + FROM Employee emp + WHERE ALL (foo > 1) OVER (PARTITION BY bar) + """); + + assertQuery(""" + SELECT DISTINCT emp + FROM Employee emp + WHERE ALL VALUES (foo) > 1 + """); + + assertQuery(""" + SELECT DISTINCT emp + FROM Employee emp + WHERE ALL ELEMENTS (foo) > 1 + """); + } + + @Test // GH-3689 + void anySome() { + + assertQuery(""" + SELECT DISTINCT emp + FROM Employee emp + WHERE ANY (SELECT spouseEmp + FROM Employee spouseEmp) > 1 + """); + + assertQuery(""" + SELECT DISTINCT emp + FROM Employee emp + WHERE SOME (SELECT spouseEmp + FROM Employee spouseEmp) > 1 + """); + + assertQuery(""" + SELECT DISTINCT emp + FROM Employee emp + WHERE ANY (foo > 1) OVER (PARTITION BY bar) + """); + + assertQuery(""" + SELECT DISTINCT emp + FROM Employee emp + WHERE ANY VALUES (foo) > 1 + """); + } + + @Test // GH-3689 + void listAgg() { + + assertQuery("select listagg(p.number, ', ') within group (order by p.type, p.number) " + // + "from Phone p " + // + "group by p.person"); + } + @Test void allExample() { @@ -1119,9 +1368,6 @@ void hqlQueries() { assertQuery("select concat(p.number, ' : ', cast(c.duration as string)) " + // "from Call c " + // "join c.phone p"); - assertQuery("select substring(p.number, 1, 2) " + // - "from Call c " + // - "join c.phone p"); assertQuery("select upper(p.name) " + // "from Person p "); assertQuery("select lower(p.name) " + // @@ -1450,9 +1696,6 @@ void hqlQueries() { "from Call c " + // "join c.phone p " + // "group by p.number"); - assertQuery("select listagg(p.number, ', ') within group (order by p.type, p.number) " + // - "from Phone p " + // - "group by p.person"); assertQuery("select sum(c.duration) " + // "from Call c "); assertQuery("select p.name, sum(c.duration) " + // From 0656209e5dc57234d661a3be2d9ab71331ad5b79 Mon Sep 17 00:00:00 2001 From: Christoph Strobl Date: Wed, 27 Nov 2024 15:16:00 +0100 Subject: [PATCH 08/87] Add HQL rendering tests. Extend tests for parsing/rendering hql functions and expressions. Assert count query creation works fine for when nested function calls are present in select. Fix minor rendering issue that added superfluous leading whitespace to expressions nested within a function. Bring newly added reserved keywords into order. Original Pull Request: #3691 --- .../data/jpa/repository/query/Hql.g4 | 8 +- .../jpa/repository/query/QueryRenderer.java | 3 +- .../query/HqlQueryRendererTests.java | 3 + .../query/HqlQueryTransformerTests.java | 3 +- .../query/HqlSpecificationTests.java | 105 +++++++++++++----- 5 files changed, 88 insertions(+), 34 deletions(-) diff --git a/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Hql.g4 b/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Hql.g4 index 728d3fe7b2..728ef8ca22 100644 --- a/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Hql.g4 +++ b/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Hql.g4 @@ -1349,6 +1349,9 @@ CASE : C A S E; CAST : C A S T; CEILING : C E I L I N G; COLLATE : C O L L A T E; +COLUMN : C O L U M N; +CONFLICT : C O N F L I C T; +CONSTRAINT : C O N S T R A I N T; CONTAINS : C O N T A I N S; COUNT : C O U N T; CROSS : C R O S S; @@ -1358,11 +1361,7 @@ CURRENT_DATE : C U R R E N T '_' D A T E; CURRENT_INSTANT : C U R R E N T '_' I N S T A N T; CURRENT_TIME : C U R R E N T '_' T I M E; CURRENT_TIMESTAMP : C U R R E N T '_' T I M E S T A M P; -CONFLICT : C O N F L I C T; -CONSTRAINT : C O N S T R A I N T; -COLUMN : C O L U M N; CYCLE : C Y C L E; -DO : D O; DATE : D A T E; DATETIME : D A T E T I M E ; DAY : D A Y; @@ -1371,6 +1370,7 @@ DELETE : D E L E T E; DEPTH : D E P T H; DESC : D E S C; DISTINCT : D I S T I N C T; +DO : D O; ELEMENT : E L E M E N T; ELEMENTS : E L E M E N T S; ELSE : E L S E; diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryRenderer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryRenderer.java index 1bdde97beb..87fe53e050 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryRenderer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryRenderer.java @@ -38,6 +38,7 @@ * * * @author Mark Paluch + * @author Christoph Strobl */ abstract class QueryRenderer implements QueryTokenStream { @@ -243,7 +244,7 @@ String render() { for (QueryRenderer queryRenderer : nested) { if (lastAppended != null && (lastExpression || queryRenderer.isExpression()) && !builder.isEmpty() - && !lastAppended.endsWith(" ")) { + && (!lastAppended.endsWith(" ") && !lastAppended.endsWith("("))) { builder.append(' '); } diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryRendererTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryRendererTests.java index 4c25ec66f0..99547994e1 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryRendererTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryRendererTests.java @@ -1556,7 +1556,10 @@ void castFunctionWithFqdnShouldWork() { @ValueSource(strings = { "YEAR", "MONTH", "DAY", "WEEK", "QUARTER", "HOUR", "MINUTE", "SECOND", "NANOSECOND", "NANOSECOND", "EPOCH" }) void durationLiteralsShouldWork(String dtField) { + assertQuery("SELECT ce.id FROM CalendarEvent ce WHERE (ce.endDate - ce.startDate) > 5 %s".formatted(dtField)); + assertQuery("SELECT ce.id FROM CalendarEvent ce WHERE ce.text LIKE :text GROUP BY year(cd.date) HAVING (ce.endDate - ce.startDate) > 5 %s".formatted(dtField)); + assertQuery("SELECT ce.id as id, cd.startDate + 5 %s AS summedDate FROM CalendarEvent ce".formatted(dtField)); } @Test // GH-3025 diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryTransformerTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryTransformerTests.java index 482b02db47..40aa7d274b 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryTransformerTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryTransformerTests.java @@ -1090,7 +1090,7 @@ void aliasesShouldNotOverlapWithSortProperties() { "SELECT t3 FROM Test3 t3 JOIN t3.test2 x WHERE x.id = :test2Id order by t3.testDuplicateColumnName desc"); } - @Test // GH-3269 + @Test // GH-3269, GH-3689 void createsCountQueryUsingAliasCorrectly() { assertCountQuery("select distinct 1 as x from Employee", "select count(distinct 1) from Employee AS __"); @@ -1102,6 +1102,7 @@ void createsCountQueryUsingAliasCorrectly() { "select count(distinct a, b, sum(amount), d) from Employee AS __ GROUP BY n"); assertCountQuery("select distinct a, count(b) as c from Employee GROUP BY n", "select count(distinct a, count(b)) from Employee AS __ GROUP BY n"); + assertCountQuery("select distinct substring(e.firstname, 1, position('a' in e.lastname)) as x from from Employee", "select count(distinct substring(e.firstname, 1, position('a' in e.lastname))) from from Employee"); } @Test // GH-3427 diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlSpecificationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlSpecificationTests.java index 0dff2c328e..80483a05b9 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlSpecificationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlSpecificationTests.java @@ -23,7 +23,6 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.ValueSource; - import org.springframework.data.jpa.repository.query.QueryRenderer.TokenRenderer; /** @@ -35,6 +34,7 @@ * * @author Greg Turnquist * @author Mark Paluch + * @author Christoph Strobl * @since 3.1 */ class HqlSpecificationTests { @@ -335,18 +335,15 @@ OR TREAT(e AS Contractor).hours > 100 """); } - @Test // GH-3689 - void generic() { - - assertQuery(""" - SELECT e FROM Employee e - WHERE FOO(x).bar RESPECT NULLS - """); + @ParameterizedTest // GH-3689 + @ValueSource(strings = { "RESPECT NULLS", "IGNORE NULLS" }) + void generic(String nullHandling) { + // not in the official documentation but supported in the grammar. assertQuery(""" SELECT e FROM Employee e - WHERE FOO(x).bar IGNORE NULLS - """); + WHERE FOO(x).bar %s + """.formatted(nullHandling)); } @Test // GH-3689 @@ -356,6 +353,11 @@ void size() { SELECT e FROM Employee e WHERE SIZE(x) > 1 """); + + assertQuery(""" + SELECT e FROM Employee e + WHERE SIZE(e.skills) > 1 + """); } @Test // GH-3689 @@ -384,10 +386,15 @@ WHERE TRUNC(x) = TRUNCATE(y) SELECT e FROM Employee e WHERE TRUNC(e, 'foo') = TRUNCATE(e, 'bar') """); + + assertQuery(""" + SELECT e FROM Employee e + WHERE TRUNC(e, 'YEAR') = TRUNCATE(LOCAL DATETIME, 'YEAR') + """); } @ParameterizedTest // GH-3689 - @ValueSource(strings = { "YYYY", "MONTH", "DAY", "WEEK", "QUARTER", "HOUR", "MINUTE", "SECOND", "NANOSECOND", + @ValueSource(strings = { "YEAR", "MONTH", "DAY", "WEEK", "QUARTER", "HOUR", "MINUTE", "SECOND", "NANOSECOND", "NANOSECOND", "EPOCH" }) void trunc(String truncation) { @@ -402,7 +409,17 @@ void format() { assertQuery(""" SELECT e FROM Employee e - WHERE FORMAT(x AS 'foo') = FORMAT(x AS 'bar') + WHERE FORMAT(x AS 'yyyy') = FORMAT(e.hiringDate AS 'yyyy') + """); + + assertQuery(""" + SELECT e FROM Employee e + WHERE e.hiringDate = format(LOCAL DATETIME as 'yyyy-MM-dd') + """); + + assertQuery(""" + SELECT e FROM Employee e + WHERE e.hiringDate = format(LOCAL_DATE() as 'yyyy-MM-dd') """); } @@ -411,7 +428,7 @@ void collate() { assertQuery(""" SELECT e FROM Employee e - WHERE COLLATE(x AS foo) = COLLATE(x AS foo.bar) + WHERE COLLATE(x AS ucs_basic) = COLLATE(e.name AS ucs_basic) """); } @@ -424,11 +441,20 @@ void substring() { assertQuery("select substring(c.number, 1) " + // "from Call c"); + assertQuery("select substring(c.number, 1, position('/0' in c.number)) " + // + "from Call c"); + assertQuery("select substring(c.number FROM 1 FOR 2) " + // "from Call c"); assertQuery("select substring(c.number FROM 1) " + // "from Call c"); + + assertQuery("select substring(c.number FROM 1 FOR position('/0' in c.number)) " + // + "from Call c"); + + assertQuery("select substring(c.number FROM 1) AS shortNumber " + // + "from Call c"); } @Test // GH-3689 @@ -462,6 +488,9 @@ void position() { assertQuery("select POSITION(c.number IN 'foo') " + // "from Call c "); + + assertQuery("select POSITION(c.number IN 'foo') + 1 AS pos " + // + "from Call c "); } @Test // GH-3689 @@ -490,6 +519,9 @@ void currentDateFunctions() { assertQuery("select OFFSET DATETIME, OFFSET_DATETIME() " + // "from Call c "); + + assertQuery("select OFFSET DATETIME AS offsetDatetime, OFFSET_DATETIME() AS offset_datetime " + // + "from Call c "); } @Test // GH-3689 @@ -497,6 +529,8 @@ void cube() { assertQuery("select CUBE(foo), CUBE(foo, bar) " + // "from Call c "); + + assertQuery("select c.callerId from Call c GROUP BY CUBE(state, province)"); } @Test // GH-3689 @@ -504,6 +538,8 @@ void rollup() { assertQuery("select ROLLUP(foo), ROLLUP(foo, bar) " + // "from Call c "); + + assertQuery("select c.callerId from Call c GROUP BY ROLLUP(state, province)"); } @Test @@ -710,16 +746,13 @@ WHERE FUNCTION('hasGoodCredit', c.balance, c.creditLimit) = TRUE """); } - @Test // GH-3628 - void functionInvocationWithIsBoolean() { - - assertQuery(""" - from RoleTmpl where find_in_set(:appId, appIds) is true - """); + @ParameterizedTest // GH-3628 + @ValueSource(strings = { "is true", "is not true", "is false", "is not false" }) + void functionInvocationWithIsBoolean(String booleanComparison) { assertQuery(""" - from RoleTmpl where find_in_set(:appId, appIds) is false - """); + from RoleTmpl where find_in_set(:appId, appIds) %s + """.formatted(booleanComparison)); } @Test @@ -1094,20 +1127,36 @@ void booleanPredicate() { """); } - @Test // GH-3628 - void distinctFromPredicate() { + @ParameterizedTest // GH-3628 + @ValueSource(strings = { "IS DISTINCT FROM", "IS NOT DISTINCT FROM" }) + void distinctFromPredicate(String distinctFrom) { assertQuery(""" SELECT c FROM Customer c - WHERE c.orders IS DISTINCT FROM c.payments - """); + WHERE c.orders %s c.payments + """.formatted(distinctFrom)); assertQuery(""" SELECT c FROM Customer c - WHERE c.orders IS NOT DISTINCT FROM c.payments - """); + WHERE c.orders %s c.payments + """.formatted(distinctFrom)); + + assertQuery(""" + SELECT c + FROM Customer c + GROUP BY c.lastname + HAVING c.orders %s c.payments + """.formatted(distinctFrom)); + + assertQuery(""" + SELECT c + FROM Customer c + WHERE EXISTS (SELECT c2 + FROM Customer c2 + WHERE c2.orders %s c.orders) + """.formatted(distinctFrom)); } @Test @@ -1576,7 +1625,7 @@ void hqlQueries() { assertQuery("select longest.duration " + // "from Phone p " + // "left join lateral (" + // - " select c.duration as duration " + // + "select c.duration as duration " + // " from p.calls c" + // " order by c.duration desc" + // " limit 1 " + // From 3b59550b6b2c121c2ac7738f902760820b62a912 Mon Sep 17 00:00:00 2001 From: Christoph Strobl Date: Fri, 26 Apr 2024 15:58:28 +0200 Subject: [PATCH 09/87] Update Projection section in reference documentation. For the time being we at least now document the current behaviour and how to cope with it. Closes: #3286 Original pull request: #3449 --- .../ROOT/pages/repositories/projections.adoc | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/main/antora/modules/ROOT/pages/repositories/projections.adoc b/src/main/antora/modules/ROOT/pages/repositories/projections.adoc index 556eebe91f..04ad285e4e 100644 --- a/src/main/antora/modules/ROOT/pages/repositories/projections.adoc +++ b/src/main/antora/modules/ROOT/pages/repositories/projections.adoc @@ -15,3 +15,28 @@ include::{commons}@data-commons::page$repositories/projections-interface.adoc[le include::{commons}@data-commons::page$repositories/projections-class.adoc[leveloffset=1] + +[NOTE] +==== +Some JPA providers may require additional hints when working with <> especially when using those directly with method derived queries. +If you are facing errors like `JpaSystemException: Specified result type did not match Query selection type` make sure to provide a constructor hint via `@PersistenceCreator` to be passed on, as outlined below: + +[source,java] +---- +public class NamesOnly { + + private final String firstname; + private final String lastname; + + protected NamesOnly() { } + + @PersistenceCreator + public NamesOnly(String firstname, String lastname) { + this.firstname = firstname; + this.lastname = lastname; + } + + // ... +} +---- +==== From 229db64d3669d8fba5cf073400a476f054f7aee7 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Tue, 3 Dec 2024 10:29:29 +0100 Subject: [PATCH 10/87] Polishing. Tweak wording. See: #3286 Original pull request: #3449 --- .../antora/modules/ROOT/pages/repositories/projections.adoc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/antora/modules/ROOT/pages/repositories/projections.adoc b/src/main/antora/modules/ROOT/pages/repositories/projections.adoc index 04ad285e4e..3c6bca8320 100644 --- a/src/main/antora/modules/ROOT/pages/repositories/projections.adoc +++ b/src/main/antora/modules/ROOT/pages/repositories/projections.adoc @@ -18,8 +18,9 @@ include::{commons}@data-commons::page$repositories/projections-class.adoc[levelo [NOTE] ==== -Some JPA providers may require additional hints when working with <> especially when using those directly with method derived queries. -If you are facing errors like `JpaSystemException: Specified result type did not match Query selection type` make sure to provide a constructor hint via `@PersistenceCreator` to be passed on, as outlined below: +<> types must declare a single constructor so that Spring Data can determine its input properties. +If your class defines more than one constructor, then you cannot use the type without further hints for DTO projections. +In such a case annotate the desired constructor with `@PersistenceCreator` as outlined below so that Spring Data can determine which properties to select: [source,java] ---- From b0f8c511a7a2260f2c255c3d58d49a79b62ac23b Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Tue, 3 Dec 2024 10:53:35 +0100 Subject: [PATCH 11/87] Fix Native Query projections mapping to DTOs. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We now provide the target type to createNativeQuery(…) if we detect that a native query result type is a projection and not an interface. Closes #2757 --- .../jpa/repository/query/NativeJpaQuery.java | 13 +++++++++--- .../jpa/repository/UserRepositoryTests.java | 14 +++++++++++++ .../jpa/repository/sample/NameOnlyRecord.java | 20 +++++++++++++++++++ .../jpa/repository/sample/UserRepository.java | 3 +++ 4 files changed, 47 insertions(+), 3 deletions(-) create mode 100644 spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/NameOnlyRecord.java diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/NativeJpaQuery.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/NativeJpaQuery.java index 61c4c6ef19..c664af9f11 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/NativeJpaQuery.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/NativeJpaQuery.java @@ -93,8 +93,15 @@ private Class getTypeToQueryFor(ReturnedType returnedType) { return result; } - return returnedType.isProjecting() && !getMetamodel().isJpaManaged(returnedType.getReturnedType()) // - ? Tuple.class - : result; + if (returnedType.isProjecting()) { + + if (returnedType.getReturnedType().isInterface()) { + return Tuple.class; + } + + return returnedType.getReturnedType(); + } + + return result; } } diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/UserRepositoryTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/UserRepositoryTests.java index 225336983e..caf40e1d99 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/UserRepositoryTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/UserRepositoryTests.java @@ -67,6 +67,7 @@ import org.springframework.data.jpa.domain.sample.Role; import org.springframework.data.jpa.domain.sample.SpecialUser; import org.springframework.data.jpa.domain.sample.User; +import org.springframework.data.jpa.repository.sample.NameOnlyRecord; import org.springframework.data.jpa.repository.sample.SampleEvaluationContextExtension.SampleSecurityContextHolder; import org.springframework.data.jpa.repository.sample.UserRepository; import org.springframework.data.jpa.repository.sample.UserRepository.NameOnly; @@ -2979,6 +2980,19 @@ void supportsInterfaceProjectionsWithNativeQueries() { assertThat(result.getLastname()).isEqualTo(user.getLastname()); } + @Test // GH-2757 + void supportsRecordsWithNativeQueries() { + + flushTestUsers(); + + User user = repository.findAll().get(0); + + NameOnlyRecord result = repository.findRecordProjectionByNativeQuery(user.getId()); + + assertThat(result.firstname()).isEqualTo(user.getFirstname()); + assertThat(result.lastname()).isEqualTo(user.getLastname()); + } + @Test // DATAJPA-1248 void supportsProjectionsWithNativeQueriesAndCamelCaseProperty() { diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/NameOnlyRecord.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/NameOnlyRecord.java new file mode 100644 index 0000000000..d8dd5fa1b3 --- /dev/null +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/NameOnlyRecord.java @@ -0,0 +1,20 @@ +/* + * Copyright 2018-2024 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. + * You may obtain a copy of the License at + * + * https://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, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.data.jpa.repository.sample; + +public record NameOnlyRecord(String firstname, String lastname) { + +} diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/UserRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/UserRepository.java index 01526cd0bf..060710fead 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/UserRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/UserRepository.java @@ -558,6 +558,9 @@ List findUsersByFirstnameForSpELExpressionWithParameterIndexOnlyWithEntity @Query(value = "SELECT firstname, lastname FROM SD_User WHERE id = ?1", nativeQuery = true) NameOnly findByNativeQuery(Integer id); + @NativeQuery("SELECT firstname, lastname FROM SD_User WHERE id = ?1") + NameOnlyRecord findRecordProjectionByNativeQuery(Integer id); + // GH-3155 @NativeQuery(value = "SELECT emailaddress, secondary_email_address FROM SD_User WHERE id = ?1", sqlResultSetMapping = "emailDto") From eb9f7465d751c0872d36aaa19f08418dfd688ee9 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Tue, 3 Dec 2024 12:08:40 +0100 Subject: [PATCH 12/87] Polishing. Refine projection documentation. See #2757 --- src/main/antora/antora-playbook.yml | 2 +- .../ROOT/pages/repositories/projections.adoc | 55 ++++++++++--------- 2 files changed, 29 insertions(+), 28 deletions(-) diff --git a/src/main/antora/antora-playbook.yml b/src/main/antora/antora-playbook.yml index 54e23dabe2..04dbefb29a 100644 --- a/src/main/antora/antora-playbook.yml +++ b/src/main/antora/antora-playbook.yml @@ -17,7 +17,7 @@ content: - url: https://github.com/spring-projects/spring-data-commons # Refname matching: # https://docs.antora.org/antora/latest/playbook/content-refname-matching/ - branches: [main, 3.2.x] + branches: [ main, 3.4.x ] start_path: src/main/antora asciidoc: attributes: diff --git a/src/main/antora/modules/ROOT/pages/repositories/projections.adoc b/src/main/antora/modules/ROOT/pages/repositories/projections.adoc index 3c6bca8320..00a6a8c8ef 100644 --- a/src/main/antora/modules/ROOT/pages/repositories/projections.adoc +++ b/src/main/antora/modules/ROOT/pages/repositories/projections.adoc @@ -3,41 +3,42 @@ :projection-collection: Collection -include::{commons}@data-commons::page$repositories/projections-intro.adoc[] +== Introduction -NOTE: It is important to note that <> with JPQL is limited to *constructor expressions* in your JPQL expression, e.g. `SELECT new com.example.NamesOnly(u.firstname, u.lastname) from User u`. -(Note the usage of a FQDN for the DTO type!) This JPQL expression can be used in `@Query` annotations as well where you define any named queries. -And it's important to point out that class-based projections do not work with native queries AT ALL. -As a workaround you may use named queries with `ResultSetMapping` or the Hibernate-specific javadoc:{hibernatejavadocurl}org.hibernate.query.ResultListTransformer[] +include::{commons}@data-commons::page$repositories/projections-intro.adoc[leveloffset+=1] + +include::{commons}@data-commons::page$repositories/projections-interface.adoc[leveloffset=2] + +include::{commons}@data-commons::page$repositories/projections-class.adoc[leveloffset=2] + +== Using Projections with JPA -include::{commons}@data-commons::page$repositories/projections-interface.adoc[leveloffset=1] +You can use Projections with JPA in several ways. +Depending on the technique and query type, you need to apply specific considerations. -include::{commons}@data-commons::page$repositories/projections-class.adoc[leveloffset=1] +Spring Data JPA uses generally `Tuple` queries to construct interface proxies for <>. +=== Derived queries +Query derivation supports both, class-based and interface projections by introspecting the returned type. +Class-based projections use JPA's instantiation mechanism (constructor expressions) to create the projection instance. -[NOTE] -==== -<> types must declare a single constructor so that Spring Data can determine its input properties. -If your class defines more than one constructor, then you cannot use the type without further hints for DTO projections. -In such a case annotate the desired constructor with `@PersistenceCreator` as outlined below so that Spring Data can determine which properties to select: +Projections limit the selection to top-level properties of the target entity. +Any nested properties resolving to joins select the entire nested property causing the full join to materialize. -[source,java] ----- -public class NamesOnly { +=== String-based queries - private final String firstname; - private final String lastname; +Support for string-based queries covers both, JPQL queries(`@Query`) and native queries (`@NativeQuery`). + +==== JPQL Queries + +When using <> with JPQL, you must use *constructor expressions* in your JPQL query, e.g. `SELECT new com.example.NamesOnly(u.firstname, u.lastname) from User u`. +(Note the usage of a FQDN for the DTO type!) This JPQL expression can be used in `@Query` annotations as well where you define any named queries. +As a workaround you may use named queries with `ResultSetMapping` or the Hibernate-specific javadoc:{hibernatejavadocurl}org.hibernate.query.ResultListTransformer[] - protected NamesOnly() { } +==== Native Queries - @PersistenceCreator - public NamesOnly(String firstname, String lastname) { - this.firstname = firstname; - this.lastname = lastname; - } +When using <>, their usage requires slightly more consideration depending on your : - // ... -} ----- -==== +* If properties of the result type map directly to the result (the order of columns and their types match the constructor arguments), then you can declare the query result type as the DTO type without further hints (or use the DTO class through dynamic projections). +* If the properties do not match or require transformation, use `@SqlResultSetMapping` through JPA's annotations map the result set to the DTO and provide the result mapping name through `@NativeQuery(resultSetMapping = "…")`. From e4a2416b845df21e2aadada19a5a4ad59bd91f72 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Mon, 9 Dec 2024 14:25:53 +0100 Subject: [PATCH 13/87] Refine NamedQuery error messages when using Sort/Pageable parameters. Closes #3660 --- .../jpa/repository/query/JpaQueryMethod.java | 15 ++----------- .../data/jpa/repository/query/NamedQuery.java | 21 +++++++++++-------- .../JpaQueryLookupStrategyUnitTests.java | 2 +- 3 files changed, 15 insertions(+), 23 deletions(-) diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryMethod.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryMethod.java index 885b989bbe..ab2cd777ef 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryMethod.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryMethod.java @@ -22,7 +22,6 @@ import java.lang.reflect.Method; import java.util.Arrays; import java.util.Collections; -import java.util.HashSet; import java.util.List; import java.util.Optional; import java.util.Set; @@ -70,20 +69,10 @@ public class JpaQueryMethod extends QueryMethod { * Persistence Specification: Persistent Fields and Properties - Paragraph starting with * "Collection-valued persistent...". */ - private static final Set> NATIVE_ARRAY_TYPES; + private static final Set> NATIVE_ARRAY_TYPES = Set.of(byte[].class, Byte[].class, char[].class, + Character[].class); private static final StoredProcedureAttributeSource storedProcedureAttributeSource = StoredProcedureAttributeSource.INSTANCE; - static { - - Set> types = new HashSet<>(); - types.add(byte[].class); - types.add(Byte[].class); - types.add(char[].class); - types.add(Character[].class); - - NATIVE_ARRAY_TYPES = Collections.unmodifiableSet(types); - } - private final QueryExtractor extractor; private final Method method; private final Class returnType; diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/NamedQuery.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/NamedQuery.java index 659c04c7de..bfa635b413 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/NamedQuery.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/NamedQuery.java @@ -69,8 +69,9 @@ private NamedQuery(JpaQueryMethod method, EntityManager em) { Parameters parameters = method.getParameters(); if (parameters.hasSortParameter()) { - throw new IllegalStateException(String.format("Finder method %s is backed by a NamedQuery and must " - + "not contain a sort parameter as we cannot modify the query; Use @Query instead", method)); + throw new IllegalStateException(String.format("Query method %s is backed by a NamedQuery and must " + + "not contain a sort parameter as we cannot modify the query; Use @%s(value=…) instead to apply sorting or remove the 'Sort' parameter.", + method, method.isNativeQuery() ? "NativeQuery" : "Query")); } this.namedCountQueryIsPresent = hasNamedQuery(em, countQueryName); @@ -85,14 +86,14 @@ private NamedQuery(JpaQueryMethod method, EntityManager em) { if (parameters.hasPageableParameter()) { LOG.warn(String.format( - "Finder method %s is backed by a NamedQuery but contains a Pageable parameter; Sorting delivered via this Pageable will not be applied", - method)); + "Query method %s is backed by a NamedQuery but contains a Pageable parameter; Sorting delivered via this Pageable will not be applied; Use @%s(value=…) instead to apply sorting.", + method, method.isNativeQuery() ? "NativeQuery" : "Query")); } String queryString = extractor.extractQueryString(query); - // TODO: Detect whether a named query is a native one. - this.declaredQuery = Lazy.of(() -> DeclaredQuery.of(queryString, query.toString().contains("NativeQuery"))); + this.declaredQuery = Lazy + .of(() -> DeclaredQuery.of(queryString, method.isNativeQuery() || query.toString().contains("NativeQuery"))); this.metadataCache = new QueryParameterSetter.QueryMetadataCache(); } @@ -133,7 +134,7 @@ public static RepositoryQuery lookupFrom(JpaQueryMethod method, EntityManager em String queryName = method.getNamedQueryName(); if (LOG.isDebugEnabled()) { - LOG.debug(String.format("Looking up named query %s", queryName)); + LOG.debug(String.format("Looking up named query '%s'", queryName)); } if (!hasNamedQuery(em, queryName)) { @@ -141,12 +142,14 @@ public static RepositoryQuery lookupFrom(JpaQueryMethod method, EntityManager em } if (method.isScrollQuery()) { - throw QueryCreationException.create(method, "Scroll queries are not supported using String-based queries"); + throw QueryCreationException.create(method, String.format( + "Scroll queries are not supported using String-based queries as we cannot rewrite the query string. Use @%s(value=…) instead.", + method.isNativeQuery() ? "NativeQuery" : "Query")); } RepositoryQuery query = new NamedQuery(method, em); if (LOG.isDebugEnabled()) { - LOG.debug(String.format("Found named query %s", queryName)); + LOG.debug(String.format("Found named query '%s'", queryName)); } return query; } diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpaQueryLookupStrategyUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpaQueryLookupStrategyUnitTests.java index 7a27c1bfc6..cff7fc83c6 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpaQueryLookupStrategyUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpaQueryLookupStrategyUnitTests.java @@ -163,7 +163,7 @@ void namedQueryWithSortShouldThrowIllegalStateException() throws NoSuchMethodExc assertThatIllegalStateException() .isThrownBy(() -> strategy.resolveQuery(method, metadata, projectionFactory, namedQueries)) .withMessageContaining( - "is backed by a NamedQuery and must not contain a sort parameter as we cannot modify the query; Use @Query instead"); + "is backed by a NamedQuery and must not contain a sort parameter as we cannot modify the query; Use @Query(value=…) instead to apply sorting or remove the 'Sort' parameter."); } @Test // GH-2018 From 9cd3d63a72fc8172f84d97f4bc58fb5d610a023d Mon Sep 17 00:00:00 2001 From: Hyeon Sung Date: Mon, 2 Dec 2024 16:50:11 +0900 Subject: [PATCH 14/87] Extract repeated string literals in `SimpleJpaRepository` to constants. Closes #3698 --- .../support/SimpleJpaRepository.java | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java index bf2faea2f4..1036ce24dd 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java @@ -100,7 +100,11 @@ public class SimpleJpaRepository implements JpaRepositoryImplementation entityInformation; private final EntityManager entityManager; @@ -190,7 +194,7 @@ public void deleteById(ID id) { @SuppressWarnings("unchecked") public void delete(T entity) { - Assert.notNull(entity, "Entity must not be null"); + Assert.notNull(entity, ENTITY_MUST_NOT_BE_NULL); if (entityInformation.isNew(entity)) { return; @@ -490,8 +494,8 @@ public long delete(@Nullable Specification spec) { @Override public R findBy(Specification spec, Function, R> queryFunction) { - Assert.notNull(spec, "Specification must not be null"); - Assert.notNull(queryFunction, "Query function must not be null"); + Assert.notNull(spec, SPECIFICATION_MUST_NOT_BE_NULL); + Assert.notNull(queryFunction, QUERY_FUNCTION_MUST_NOT_BE_NULL); return doFindBy(spec, getDomainClass(), queryFunction); } @@ -499,8 +503,8 @@ public R findBy(Specification spec, Function R doFindBy(Specification spec, Class domainClass, Function, R> queryFunction) { - Assert.notNull(spec, "Specification must not be null"); - Assert.notNull(queryFunction, "Query function must not be null"); + Assert.notNull(spec, SPECIFICATION_MUST_NOT_BE_NULL); + Assert.notNull(queryFunction, QUERY_FUNCTION_MUST_NOT_BE_NULL); ScrollQueryFactory scrollFunction = (sort, scrollPosition) -> { @@ -589,8 +593,8 @@ public Page findAll(Example example, Pageable pageable) { @Override public R findBy(Example example, Function, R> queryFunction) { - Assert.notNull(example, "Example must not be null"); - Assert.notNull(queryFunction, "Query function must not be null"); + Assert.notNull(example, EXAMPLE_MUST_NOT_BE_NULL); + Assert.notNull(queryFunction, QUERY_FUNCTION_MUST_NOT_BE_NULL); ExampleSpecification spec = new ExampleSpecification<>(example, escapeCharacter); Class probeType = example.getProbeType(); @@ -617,7 +621,7 @@ public long count(@Nullable Specification spec) { @Transactional public S save(S entity) { - Assert.notNull(entity, "Entity must not be null"); + Assert.notNull(entity, ENTITY_MUST_NOT_BE_NULL); if (entityInformation.isNew(entity)) { entityManager.persist(entity); @@ -990,7 +994,7 @@ private static class ExampleSpecification implements Specification { */ ExampleSpecification(Example example, EscapeCharacter escapeCharacter) { - Assert.notNull(example, "Example must not be null"); + Assert.notNull(example, EXAMPLE_MUST_NOT_BE_NULL); Assert.notNull(escapeCharacter, "EscapeCharacter must not be null"); this.example = example; From c5f0c6397f82c1f310e34c69a5c384db8dc1cd7c Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Tue, 10 Dec 2024 10:15:19 +0100 Subject: [PATCH 15/87] Polishing. Extract assertion message constants from QuerydslJpaPredicateExecutor. See #3698 --- .../support/QuerydslJpaPredicateExecutor.java | 30 +++++++++++-------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/QuerydslJpaPredicateExecutor.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/QuerydslJpaPredicateExecutor.java index c16f95c0a1..08f3b7ab07 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/QuerydslJpaPredicateExecutor.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/QuerydslJpaPredicateExecutor.java @@ -75,6 +75,12 @@ */ public class QuerydslJpaPredicateExecutor implements QuerydslPredicateExecutor, JpaRepositoryConfigurationAware { + private static final String PREDICATE_MUST_NOT_BE_NULL = "Predicate must not be null"; + private static final String ORDER_SPECIFIERS_MUST_NOT_BE_NULL = "Order specifiers must not be null"; + private static final String SORT_MUST_NOT_BE_NULL = "Sort must not be null"; + private static final String PAGEABLE_MUST_NOT_BE_NULL = "Pageable must not be null"; + private static final String QUERY_FUNCTION_MUST_NOT_BE_NULL = "Query function must not be null"; + private final JpaEntityInformation entityInformation; private final EntityPath path; private final Querydsl querydsl; @@ -116,7 +122,7 @@ public void setProjectionFactory(ProjectionFactory projectionFactory) { @Override public Optional findOne(Predicate predicate) { - Assert.notNull(predicate, "Predicate must not be null"); + Assert.notNull(predicate, PREDICATE_MUST_NOT_BE_NULL); try { return Optional.ofNullable(createQuery(predicate).select(path).limit(2).fetchOne()); @@ -128,7 +134,7 @@ public Optional findOne(Predicate predicate) { @Override public List findAll(Predicate predicate) { - Assert.notNull(predicate, "Predicate must not be null"); + Assert.notNull(predicate, PREDICATE_MUST_NOT_BE_NULL); return createQuery(predicate).select(path).fetch(); } @@ -136,8 +142,8 @@ public List findAll(Predicate predicate) { @Override public List findAll(Predicate predicate, OrderSpecifier... orders) { - Assert.notNull(predicate, "Predicate must not be null"); - Assert.notNull(orders, "Order specifiers must not be null"); + Assert.notNull(predicate, PREDICATE_MUST_NOT_BE_NULL); + Assert.notNull(orders, ORDER_SPECIFIERS_MUST_NOT_BE_NULL); return executeSorted(createQuery(predicate).select(path), orders); } @@ -145,8 +151,8 @@ public List findAll(Predicate predicate, OrderSpecifier... orders) { @Override public List findAll(Predicate predicate, Sort sort) { - Assert.notNull(predicate, "Predicate must not be null"); - Assert.notNull(sort, "Sort must not be null"); + Assert.notNull(predicate, PREDICATE_MUST_NOT_BE_NULL); + Assert.notNull(sort, SORT_MUST_NOT_BE_NULL); return executeSorted(createQuery(predicate).select(path), sort); } @@ -154,7 +160,7 @@ public List findAll(Predicate predicate, Sort sort) { @Override public List findAll(OrderSpecifier... orders) { - Assert.notNull(orders, "Order specifiers must not be null"); + Assert.notNull(orders, ORDER_SPECIFIERS_MUST_NOT_BE_NULL); return executeSorted(createQuery(new Predicate[0]).select(path), orders); } @@ -162,8 +168,8 @@ public List findAll(OrderSpecifier... orders) { @Override public Page findAll(Predicate predicate, Pageable pageable) { - Assert.notNull(predicate, "Predicate must not be null"); - Assert.notNull(pageable, "Pageable must not be null"); + Assert.notNull(predicate, PREDICATE_MUST_NOT_BE_NULL); + Assert.notNull(pageable, PAGEABLE_MUST_NOT_BE_NULL); final JPQLQuery countQuery = createCountQuery(predicate); JPQLQuery query = querydsl.applyPagination(pageable, createQuery(predicate).select(path)); @@ -175,8 +181,8 @@ public Page findAll(Predicate predicate, Pageable pageable) { @Override public R findBy(Predicate predicate, Function, R> queryFunction) { - Assert.notNull(predicate, "Predicate must not be null"); - Assert.notNull(queryFunction, "Query function must not be null"); + Assert.notNull(predicate, PREDICATE_MUST_NOT_BE_NULL); + Assert.notNull(queryFunction, QUERY_FUNCTION_MUST_NOT_BE_NULL); Function> finder = sort -> { AbstractJPAQuery select = (AbstractJPAQuery) createQuery(predicate).select(path); @@ -260,7 +266,7 @@ public boolean exists(Predicate predicate) { */ protected AbstractJPAQuery createQuery(Predicate... predicate) { - Assert.notNull(predicate, "Predicate must not be null"); + Assert.notNull(predicate, PREDICATE_MUST_NOT_BE_NULL); AbstractJPAQuery query = doCreateQuery(getQueryHints().withFetchGraphs(entityManager), predicate); CrudMethodMetadata metadata = getRepositoryMethodMetadata(); From 813bf498d4391b9587d621bf391bc0e3edb7bcd9 Mon Sep 17 00:00:00 2001 From: Christoph Strobl Date: Tue, 10 Dec 2024 14:05:53 +0100 Subject: [PATCH 16/87] Add reflection runtime hint for SqmQueryPart. This commit fixes an issue where some hibernate internals get triggered when obtaining a single result. Closes: #3708 --- .../jpa/repository/aot/JpaRuntimeHints.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/aot/JpaRuntimeHints.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/aot/JpaRuntimeHints.java index a2dcece1f2..276bcbdfd8 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/aot/JpaRuntimeHints.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/aot/JpaRuntimeHints.java @@ -93,5 +93,23 @@ public void registerHints(RuntimeHints hints, @Nullable ClassLoader classLoader) hints.reflection().registerType(NamedEntityGraph.class, hint -> hint.onReachableType(EntityGraph.class).withMembers(MemberCategory.INVOKE_PUBLIC_METHODS)); + + if (ClassUtils.isPresent("org.hibernate.Hibernate", classLoader)) { + + /* + Fetching a single results causes: + java.lang.IllegalArgumentException: Class org.hibernate.query.sqm.tree.select.SqmQueryPart[] is instantiated reflectively but was never registered.Register the class by adding "unsafeAllocated" for the class in reflect-config.json. + at org.graalvm.nativeimage.builder/com.oracle.svm.core.graal.snippets.SubstrateAllocationSnippets.arrayHubErrorStub(SubstrateAllocationSnippets.java:345) + at org.hibernate.internal.util.collections.StandardStack.push(StandardStack.java:48) + at org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitQuerySpec(BaseSqmToSqlAstConverter.java:2073) + + both formats: + - org.hibernate.query.sqm.tree.select.SqmQueryPart[] + - [Lorg.hibernate.query.sqm.tree.select.SqmQueryPart; + seem to be supported via reflect-config. However TypeReference does not support [L... + */ + hints.reflection().registerType(TypeReference.of("org.hibernate.query.sqm.tree.select.SqmQueryPart[]"), + MemberCategory.UNSAFE_ALLOCATED); + } } } From dcd36bf108598d023391c67936d27b82119933ab Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Tue, 10 Dec 2024 15:17:37 +0100 Subject: [PATCH 17/87] Use primary table alias for SQL count query derivation with DISTINCT queries. We now use render COUNT(DISTINCT a.*) where 'a' is the primary table alias instead of COUNT(DISTINCT *). Closes #3707 --- .../query/JSqlParserQueryEnhancer.java | 12 +++++++----- .../query/JSqlParserQueryEnhancerUnitTests.java | 16 ++++++++++++++++ 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JSqlParserQueryEnhancer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JSqlParserQueryEnhancer.java index 37ec06e12f..1686148603 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JSqlParserQueryEnhancer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JSqlParserQueryEnhancer.java @@ -354,11 +354,11 @@ public String createCountQueryFor(@Nullable String countProjection) { return this.query.getQueryString(); } - return createCountQueryFor(this.query, selectBody, countProjection); + return createCountQueryFor(this.query, selectBody, countProjection, primaryAlias); } private static String createCountQueryFor(DeclaredQuery query, PlainSelect selectBody, - @Nullable String countProjection) { + @Nullable String countProjection, @Nullable String primaryAlias) { // remove order by selectBody.setOrderByElements(null); @@ -373,7 +373,8 @@ private static String createCountQueryFor(DeclaredQuery query, PlainSelect selec selectBody.setDistinct(null); // reset possible distinct Function jSqlCount = getJSqlCount( - Collections.singletonList(countPropertyNameForSelection(selectBody.getSelectItems(), distinct)), distinct); + Collections.singletonList(countPropertyNameForSelection(selectBody.getSelectItems(), distinct, primaryAlias)), + distinct); selectBody.setSelectItems(Collections.singletonList(SelectItem.from(jSqlCount))); } @@ -463,7 +464,8 @@ private static OrderByElement getOrderClause(Set joinAliases, Set> selectItems, boolean distinct) { + private static String countPropertyNameForSelection(List> selectItems, boolean distinct, + @Nullable String tableAlias) { if (onlyASingleColumnProjection(selectItems)) { @@ -472,7 +474,7 @@ private static String countPropertyNameForSelection(List> selectIt return column.getFullyQualifiedName(); } - return (distinct ? "*" : "1"); + return distinct ? ((tableAlias != null ? tableAlias + "." : "") + "*") : "1"; } /** diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JSqlParserQueryEnhancerUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JSqlParserQueryEnhancerUnitTests.java index a41b54193c..7ed0a804c8 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JSqlParserQueryEnhancerUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JSqlParserQueryEnhancerUnitTests.java @@ -51,6 +51,22 @@ void shouldApplySorting() { assertThat(sql).isEqualTo("SELECT e FROM Employee e ORDER BY e.foo ASC, e.bar ASC"); } + @Test // GH-3707 + void countQueriesShouldConsiderPrimaryTableAlias() { + + QueryEnhancer enhancer = createQueryEnhancer(DeclaredQuery.of(""" + SELECT DISTINCT a.*, b.b1 + FROM TableA a + JOIN TableB b ON a.b = b.b + LEFT JOIN TableC c ON b.c = c.c + ORDER BY b.b1, a.a1, a.a2 + """, true)); + + String sql = enhancer.createCountQueryFor(); + + assertThat(sql).startsWith("SELECT count(DISTINCT a.*) FROM TableA a"); + } + @Override @ParameterizedTest // GH-2773 @MethodSource("jpqlCountQueries") From aaef8b3ca4b86f4959141237e80e6782ea4dcb95 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Tue, 10 Dec 2024 15:31:54 +0100 Subject: [PATCH 18/87] Polishing. Disable records projection test with Hibernate 6.2. See #2757 --- .../data/jpa/repository/UserRepositoryTests.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/UserRepositoryTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/UserRepositoryTests.java index caf40e1d99..02a89c3677 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/UserRepositoryTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/UserRepositoryTests.java @@ -71,6 +71,7 @@ import org.springframework.data.jpa.repository.sample.SampleEvaluationContextExtension.SampleSecurityContextHolder; import org.springframework.data.jpa.repository.sample.UserRepository; import org.springframework.data.jpa.repository.sample.UserRepository.NameOnly; +import org.springframework.data.jpa.util.DisabledOnHibernate; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.transaction.annotation.Transactional; @@ -2981,6 +2982,7 @@ void supportsInterfaceProjectionsWithNativeQueries() { } @Test // GH-2757 + @DisabledOnHibernate("6.2") void supportsRecordsWithNativeQueries() { flushTestUsers(); From ff6d2af900399079e1c3499701462199c83987f2 Mon Sep 17 00:00:00 2001 From: Yannick Brandt Date: Wed, 11 Dec 2024 11:21:41 +0100 Subject: [PATCH 19/87] Fix Hql-Queries using CEILING and LN. Closes #3711 --- .../springframework/data/jpa/repository/query/Hql.g4 | 4 +++- .../jpa/repository/query/HqlQueryRendererTests.java | 12 +++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Hql.g4 b/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Hql.g4 index 728ef8ca22..80e9297840 100644 --- a/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Hql.g4 +++ b/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Hql.g4 @@ -25,7 +25,7 @@ grammar Hql; * management of complex rules in the generated Visitor. Finally, there are labels applied to rule elements (op=('+'|'-') * to simplify the processing. * - * @author Greg Turnquist + * @author Greg Turnquist, Yannick Brandt * @since 3.1 */ } @@ -1133,6 +1133,7 @@ reservedWord | BY | CASE | CAST + | CEILING | COLLATE | CONTAINS | COUNT @@ -1206,6 +1207,7 @@ reservedWord | LIMIT | LIST | LISTAGG + | LN | LOCAL | LOCAL_DATE | LOCAL_DATETIME diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryRendererTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryRendererTests.java index 99547994e1..2f9dd07363 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryRendererTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryRendererTests.java @@ -37,7 +37,7 @@ * * @author Greg Turnquist * @author Christoph Strobl - * @author Mark Paluch + * @author Mark Paluch, Yannick Brandt * @since 3.1 */ class HqlQueryRendererTests { @@ -1509,6 +1509,16 @@ select round(count(ri) * 100 / max(ri.receipt.positions), 0) as perc }); } + @Test + void ceilingFunctionShouldWork() { + assertQuery("select ceiling(1.5) from Element a"); + } + + @Test + void lnFunctionSouldWork() { + assertQuery("select ln(7.5) from Element a"); + } + @Test // GH-2981 void cteWithClauseShouldWork() { From e0bd821476ef0dd8c672f51701ea026613f77ffc Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Wed, 11 Dec 2024 16:34:52 +0100 Subject: [PATCH 20/87] Polishing. Align HQL parsing with Hibernate to accept generic function names. Also, align literals, add missing expression grammar for ID, NATURALID, VERSION, TYPE, FK and remove parser rules interfering with undesired parsing results. Add missing literals. See #3711 --- .../data/jpa/repository/query/Hql.g4 | 370 +++++++++++++----- .../query/HqlQueryIntrospector.java | 4 +- .../repository/query/HqlQueryRenderer.java | 362 ++++++++++++++--- .../query/HqlQueryRendererTests.java | 213 +++++++++- .../query/HqlQueryTransformerTests.java | 3 +- 5 files changed, 795 insertions(+), 157 deletions(-) diff --git a/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Hql.g4 b/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Hql.g4 index 80e9297840..4b0bb9a14c 100644 --- a/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Hql.g4 +++ b/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Hql.g4 @@ -25,7 +25,9 @@ grammar Hql; * management of complex rules in the generated Visitor. Finally, there are labels applied to rule elements (op=('+'|'-') * to simplify the processing. * - * @author Greg Turnquist, Yannick Brandt + * @author Greg Turnquist + * @author Mark Paluch + * @author Yannick Brandt * @since 3.1 */ } @@ -307,9 +309,10 @@ setOperator // Literals // https://docs.jboss.org/hibernate/orm/6.1/userguide/html_single/Hibernate_User_Guide.html#hql-literals literal - : NULL + : STRING_LITERAL + | JAVA_STRING_LITERAL + | NULL | booleanLiteral - | stringLiteral | numericLiteral | dateTimeLiteral | binaryLiteral @@ -321,19 +324,16 @@ booleanLiteral | FALSE ; -// https://docs.jboss.org/hibernate/orm/6.1/userguide/html_single/Hibernate_User_Guide.html#hql-string-literals -stringLiteral - : STRINGLITERAL - | JAVASTRINGLITERAL - | CHARACTER - ; - // https://docs.jboss.org/hibernate/orm/6.1/userguide/html_single/Hibernate_User_Guide.html#hql-numeric-literals numericLiteral - : INTEGER_LITERAL - | FLOAT_LITERAL - | HEXLITERAL - ; + : INTEGER_LITERAL + | LONG_LITERAL + | BIG_INTEGER_LITERAL + | FLOAT_LITERAL + | DOUBLE_LITERAL + | BIG_DECIMAL_LITERAL + | HEX_LITERAL + ; // https://docs.jboss.org/hibernate/orm/6.1/userguide/html_single/Hibernate_User_Guide.html#hql-datetime-literals dateTimeLiteral @@ -399,7 +399,7 @@ dateOrTimeField // https://docs.jboss.org/hibernate/orm/6.1/userguide/html_single/Hibernate_User_Guide.html#hql-binary-literals binaryLiteral : BINARY_LITERAL - | '{' HEXLITERAL (',' HEXLITERAL)* '}' + | '{' HEX_LITERAL (',' HEX_LITERAL)* '}' ; // https://docs.jboss.org/hibernate/orm/6.1/userguide/html_single/Hibernate_User_Guide.html#hql-enum-literals @@ -433,19 +433,29 @@ expression ; primaryExpression - : caseList # CaseExpression - | literal # LiteralExpression - | parameter # ParameterExpression - | function # FunctionExpression - | generalPathFragment # GeneralPathExpression + : caseList # CaseExpression + | literal # LiteralExpression + | parameter # ParameterExpression + | entityTypeReference # EntityTypeExpression + | entityIdReference # EntityIdExpression + | entityVersionReference # EntityVersionExpression + | entityNaturalIdReference # EntityNaturalIdExpression + | syntacticDomainPath pathContinuation? # SyntacticPathExpression + | function # FunctionExpression + | generalPathFragment # GeneralPathExpression ; -// https://docs.jboss.org/hibernate/orm/6.1/userguide/html_single/Hibernate_User_Guide.html#hql-Datetime-arithmetic -// TBD - -// https://docs.jboss.org/hibernate/orm/6.1/userguide/html_single/Hibernate_User_Guide.html#hql-path-expressions +/** + * A much more complicated path expression involving operators and functions + * + * A path which needs to be resolved semantically. This recognizes + * any path-like structure. Generally, the path is semantically + * interpreted by the consumer of the parse-tree. However, there + * are certain cases where we can syntactically recognize a navigable + * path; see 'syntacticNavigablePath' rule + */ path - : treatedPath pathContinutation? + : syntacticDomainPath pathContinuation? | generalPathFragment ; @@ -457,14 +467,120 @@ indexedPathAccessFragment : '[' expression ']' ('.' generalPathFragment)? ; +/** + * A simple path expression + * + * - a reference to an identification variable (not case-sensitive), + * - followed by a list of period-separated identifiers (case-sensitive) + */ simplePath : identifier simplePathElement* ; +/** + * An element of a simple path expression: a period, and an identifier (case-sensitive) + */ simplePathElement : '.' identifier ; +/** + * A continuation of a path expression "broken" by an operator or function + */ +pathContinuation + : '.' simplePath + ; + +/** + * The special function 'type()' + */ +entityTypeReference + : TYPE '(' (path | parameter) ')' + ; + +/** + * The special function 'id()' + */ +entityIdReference + : ID '(' path ')' pathContinuation? + ; + +/** + * The special function 'version()' + */ +entityVersionReference + : VERSION '(' path ')' + ; + +/** + * The special function 'naturalid()' + */ +entityNaturalIdReference + : NATURALID '(' path ')' pathContinuation? + ; + +/** + * An operator or function that may occur within a path expression + * + * Rule for cases where we syntactically know that the path is a + * "domain path" because it is one of these special cases: + * + * * TREAT( path ) + * * ELEMENTS( path ) + * * INDICES( path ) + * * VALUE( path ) + * * KEY( path ) + * * path[ selector ] + * * ARRAY_GET( embeddableArrayPath, index ).path + * * COALESCE( array1, array2 )[ selector ].path + */ +syntacticDomainPath + : treatedNavigablePath + | collectionValueNavigablePath + | mapKeyNavigablePath + | simplePath indexedPathAccessFragment + | simplePath slicedPathAccessFragment + | toOneFkReference + | function pathContinuation + | function indexedPathAccessFragment pathContinuation? + | function slicedPathAccessFragment + ; + +/** + * The slice operator to obtain elements between the lower and upper bound. + */ +slicedPathAccessFragment + : '[' expression ':' expression ']' + ; + +/** + * A 'treat()' function that "breaks" a path expression + */ +treatedNavigablePath + : TREAT '(' path AS simplePath ')' pathContinuation? + ; + +/** + * A 'value()' function that "breaks" a path expression + */ +collectionValueNavigablePath + : elementValueQuantifier '(' path ')' pathContinuation? + ; + +/** + * A 'key()' or 'index()' function that "breaks" a path expression + */ +mapKeyNavigablePath + : indexKeyQuantifier '(' path ')' pathContinuation? + ; + +/** + * The special function 'fk()' + */ +toOneFkReference + : FK '(' path ')' + ; + // https://docs.jboss.org/hibernate/orm/6.1/userguide/html_single/Hibernate_User_Guide.html#hql-case-expressions caseList : simpleCaseExpression @@ -511,7 +627,7 @@ function */ standardFunction : castFunction - | treatedPath + | treatedNavigablePath | extractFunction | truncFunction | formatFunction @@ -587,7 +703,7 @@ trimSpecification ; trimCharacter - : stringLiteral + : STRING_LITERAL | parameter ; @@ -604,7 +720,7 @@ padSpecification ; padCharacter - : stringLiteral + : STRING_LITERAL ; padLength @@ -756,7 +872,7 @@ rollup * see 'Dialect.appendDatetimeFormat()' */ format - : stringLiteral + : STRING_LITERAL ; /** @@ -785,7 +901,7 @@ jpaNonstandardFunction * The name of a user-defined or native database function, given as a quoted string */ jpaNonstandardFunctionName - : stringLiteral + : STRING_LITERAL | identifier ; @@ -799,7 +915,7 @@ columnFunction * The function name, followed by a parenthesized list of ','-separated expressions */ genericFunction - : genericFunctionName '(' (genericFunctionArguments | ASTERISK)? ')' pathContinutation? + : genericFunctionName '(' (genericFunctionArguments | ASTERISK)? ')' pathContinuation? nthSideClause? nullsClause? withinGroupClause? filterClause? overClause? ; @@ -984,15 +1100,6 @@ frameExclusion | EXCLUDE NO OTHERS ; -// https://docs.jboss.org/hibernate/orm/6.1/userguide/html_single/Hibernate_User_Guide.html#hql-treat-type -treatedPath - : TREAT '(' path AS simplePath')' pathContinutation? - ; - -pathContinutation - : '.' simplePath - ; - // Predicates // https://docs.jboss.org/hibernate/orm/6.1/userguide/html_single/Hibernate_User_Guide.html#hql-conditional-expressions predicate @@ -1027,6 +1134,16 @@ elementsValuesQuantifier | VALUES ; +elementValueQuantifier + : ELEMENT + | VALUE + ; + +indexKeyQuantifier + : INDEX + | KEY + ; + indicesKeysQuantifier : INDICES | KEYS @@ -1045,7 +1162,7 @@ betweenExpression // https://docs.jboss.org/hibernate/orm/6.1/userguide/html_single/Hibernate_User_Guide.html#hql-like-predicate stringPatternMatching - : expression NOT? (LIKE | ILIKE) expression (ESCAPE (stringLiteral|parameter))? + : expression NOT? (LIKE | ILIKE) expression (ESCAPE (STRING_LITERAL | JAVA_STRING_LITERAL |parameter))? ; // https://docs.jboss.org/hibernate/orm/6.1/userguide/html_single/Hibernate_User_Guide.html#hql-elements-indices @@ -1097,9 +1214,12 @@ parameterOrNumberLiteral | numericLiteral ; +/** + * An identification variable (an entity alias) + */ variable : AS identifier - | reservedWord + | nakedIdentifier ; parameter @@ -1111,16 +1231,9 @@ entityName : identifier ('.' identifier)* ; -identifier - : reservedWord - ; - -functionName - : reservedWord ('.' reservedWord)* - ; - -reservedWord - : IDENTIFICATION_VARIABLE +nakedIdentifier + : IDENTIFIER + | QUOTED_IDENTIFIER | f=(ALL | AND | ANY @@ -1133,8 +1246,10 @@ reservedWord | BY | CASE | CAST - | CEILING | COLLATE + | COLUMN + | CONFLICT + | CONSTRAINT | CONTAINS | COUNT | CROSS @@ -1153,6 +1268,7 @@ reservedWord | DEPTH | DESC | DISTINCT + | DO | ELEMENT | ELEMENTS | ELSE @@ -1166,18 +1282,15 @@ reservedWord | EXCEPT | EXCLUDE | EXISTS - | EXP | EXTRACT - | FALSE | FETCH | FILTER | FIRST - | FLOOR + | FK | FOLLOWING | FOR | FORMAT | FROM - | FULL | FUNCTION | GROUP | GROUPS @@ -1187,10 +1300,9 @@ reservedWord | IGNORE | ILIKE | IN - | INCLUDES | INDEX + | INCLUDES | INDICES - | INNER | INSERT | INSTANT | INTERSECT @@ -1199,15 +1311,14 @@ reservedWord | IS | JOIN | KEY + | KEYS | LAST | LATERAL | LEADING - | LEFT | LIKE | LIMIT | LIST | LISTAGG - | LN | LOCAL | LOCAL_DATE | LOCAL_DATETIME @@ -1231,6 +1342,7 @@ reservedWord | NEXT | NO | NOT + | NOTHING | NULLS | OBJECT | OF @@ -1241,7 +1353,6 @@ reservedWord | OR | ORDER | OTHERS - | OUTER | OVER | OVERFLOW | OVERLAY @@ -1250,7 +1361,6 @@ reservedWord | PERCENT | PLACING | POSITION - | POWER | PRECEDING | QUARTER | RANGE @@ -1267,7 +1377,6 @@ reservedWord | SOME | SUBSTRING | SUM - | TRUE | THEN | TIES | TIME @@ -1295,7 +1404,17 @@ reservedWord | WITH | WITHIN | WITHOUT - | YEAR) + | YEAR + | ZONED) + ; + +identifier + : nakedIdentifier + | FULL + | INNER + | LEFT + | OUTER + | RIGHT ; /* @@ -1334,14 +1453,20 @@ fragment X: 'x' | 'X'; fragment Y: 'y' | 'Y'; fragment Z: 'z' | 'Z'; +ASTERISK : '*'; + // The following are reserved identifiers: +ID : I D; +VERSION : V E R S I O N; +VERSIONED : V E R S I O N E D; +NATURALID : N A T U R A L I D; +FK : F K; ALL : A L L; AND : A N D; ANY : A N Y; AS : A S; ASC : A S C; -ASTERISK : '*'; AVG : A V G; BETWEEN : B E T W E E N; BOTH : B O T H; @@ -1349,7 +1474,6 @@ BREADTH : B R E A D T H; BY : B Y; CASE : C A S E; CAST : C A S T; -CEILING : C E I L I N G; COLLATE : C O L L A T E; COLUMN : C O L U M N; CONFLICT : C O N F L I C T; @@ -1386,14 +1510,10 @@ EVERY : E V E R Y; EXCEPT : E X C E P T; EXCLUDE : E X C L U D E; EXISTS : E X I S T S; -EXP : E X P; EXTRACT : E X T R A C T; -FALSE : F A L S E; FETCH : F E T C H; FILTER : F I L T E R; FIRST : F I R S T; -FK : F K; -FLOOR : F L O O R; FOLLOWING : F O L L O W I N G; FOR : F O R; FORMAT : F O R M A T; @@ -1404,7 +1524,6 @@ GROUP : G R O U P; GROUPS : G R O U P S; HAVING : H A V I N G; HOUR : H O U R; -ID : I D; IGNORE : I G N O R E; ILIKE : I L I K E; IN : I N; @@ -1429,7 +1548,6 @@ LIKE : L I K E; LIMIT : L I M I T; LIST : L I S T; LISTAGG : L I S T A G G; -LN : L N; LOCAL : L O C A L; LOCAL_DATE : L O C A L '_' D A T E ; LOCAL_DATETIME : L O C A L '_' D A T E T I M E; @@ -1448,13 +1566,11 @@ MININDEX : M I N I N D E X; MINUTE : M I N U T E; MONTH : M O N T H; NANOSECOND : N A N O S E C O N D; -NATURALID : N A T U R A L I D; NEW : N E W; NEXT : N E X T; NO : N O; NOT : N O T; NOTHING : N O T H I N G; -NULL : N U L L; NULLS : N U L L S; OBJECT : O B J E C T; OF : O F; @@ -1474,7 +1590,6 @@ PARTITION : P A R T I T I O N; PERCENT : P E R C E N T; PLACING : P L A C I N G; POSITION : P O S I T I O N; -POWER : P O W E R; PRECEDING : P R E C E D I N G; QUARTER : Q U A R T E R; RANGE : R A N G E; @@ -1501,7 +1616,6 @@ TO : T O; TRAILING : T R A I L I N G; TREAT : T R E A T; TRIM : T R I M; -TRUE : T R U E; TRUNC : T R U N C; TRUNCATE : T R U N C A T E; TYPE : T Y P E; @@ -1511,8 +1625,6 @@ UPDATE : U P D A T E; USING : U S I N G; VALUE : V A L U E; VALUES : V A L U E S; -VERSION : V E R S I O N; -VERSIONED : V E R S I O N E D; WEEK : W E E K; WHEN : W H E N; WHERE : W H E R E; @@ -1520,20 +1632,102 @@ WITH : W I T H; WITHIN : W I T H I N; WITHOUT : W I T H O U T; YEAR : Y E A R; +ZONED : Z O N E D; + +NULL : N U L L; +TRUE : T R U E; +FALSE : F A L S E; + +fragment +INTEGER_NUMBER + : DIGIT+ + ; + +fragment +FLOATING_POINT_NUMBER + : DIGIT+ '.' DIGIT* EXPONENT? + | '.' DIGIT+ EXPONENT? + | DIGIT+ EXPONENT + | DIGIT+ + ; + +fragment +EXPONENT : [eE] [+-]? DIGIT+; -fragment INTEGER_NUMBER : ('0' .. '9')+ ; -fragment FLOAT_NUMBER : INTEGER_NUMBER+ '.'? INTEGER_NUMBER* (E [+-]? INTEGER_NUMBER)? ; fragment HEX_DIGIT : [0-9a-fA-F]; +fragment SINGLE_QUOTE : '\''; +fragment DOUBLE_QUOTE : '"'; + +STRING_LITERAL : SINGLE_QUOTE ( SINGLE_QUOTE SINGLE_QUOTE | ~('\'') )* SINGLE_QUOTE; + +JAVA_STRING_LITERAL + : DOUBLE_QUOTE ( ESCAPE_SEQUENCE | ~('"') )* DOUBLE_QUOTE + | [jJ] SINGLE_QUOTE ( ESCAPE_SEQUENCE | ~('\'') )* SINGLE_QUOTE + | [jJ] DOUBLE_QUOTE ( ESCAPE_SEQUENCE | ~('\'') )* DOUBLE_QUOTE + ; + +INTEGER_LITERAL : INTEGER_NUMBER ('_' INTEGER_NUMBER)*; + +LONG_LITERAL : INTEGER_NUMBER ('_' INTEGER_NUMBER)* LONG_SUFFIX; + +FLOAT_LITERAL : FLOATING_POINT_NUMBER FLOAT_SUFFIX; + +DOUBLE_LITERAL : FLOATING_POINT_NUMBER DOUBLE_SUFFIX?; + +BIG_INTEGER_LITERAL : INTEGER_NUMBER BIG_INTEGER_SUFFIX; + +BIG_DECIMAL_LITERAL : FLOATING_POINT_NUMBER BIG_DECIMAL_SUFFIX; + +HEX_LITERAL : '0' [xX] HEX_DIGIT+ LONG_SUFFIX?; -CHARACTER : '\'' (~ ('\'' | '\\' )) '\'' ; -STRINGLITERAL : '\'' ('\'' '\'' | ~('\''))* '\'' ; -JAVASTRINGLITERAL : '"' ( ('\\' [btnfr"']) | ~('"'))* '"'; -INTEGER_LITERAL : INTEGER_NUMBER (L | B I)? ; -FLOAT_LITERAL : FLOAT_NUMBER (D | F | B D)?; -HEXLITERAL : '0' X HEX_DIGIT+ ; BINARY_LITERAL : [xX] '\'' HEX_DIGIT+ '\'' | [xX] '"' HEX_DIGIT+ '"' ; -IDENTIFICATION_VARIABLE : ('a' .. 'z' | 'A' .. 'Z' | '\u0080' .. '\ufffe' | '$' | '_') ('a' .. 'z' | 'A' .. 'Z' | '\u0080' .. '\ufffe' | '0' .. '9' | '$' | '_')* ; +fragment +LETTER : [a-zA-Z\u0080-\ufffe_$]; + +fragment +DIGIT : [0-9]; + +fragment +LONG_SUFFIX : [lL]; + +fragment +FLOAT_SUFFIX : [fF]; + +fragment +DOUBLE_SUFFIX : [dD]; + +fragment +BIG_DECIMAL_SUFFIX : [bB] [dD]; + +fragment +BIG_INTEGER_SUFFIX : [bB] [iI]; + +// Identifiers +IDENTIFIER + : LETTER (LETTER | DIGIT)* + ; + +fragment +BACKTICK : '`'; + +fragment BACKSLASH : '\\'; + +fragment +UNICODE_ESCAPE + : 'u' HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT + ; + +fragment +ESCAPE_SEQUENCE + : BACKSLASH [btnfr"'] + | BACKSLASH UNICODE_ESCAPE + | BACKSLASH BACKSLASH + ; + +QUOTED_IDENTIFIER + : BACKTICK ( ESCAPE_SEQUENCE | '\\' BACKTICK | ~([`]) )* BACKTICK + ; diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryIntrospector.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryIntrospector.java index 0e6c5cab02..259556e542 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryIntrospector.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryIntrospector.java @@ -15,7 +15,7 @@ */ package org.springframework.data.jpa.repository.query; -import static org.springframework.data.jpa.repository.query.QueryTokens.TOKEN_COMMA; +import static org.springframework.data.jpa.repository.query.QueryTokens.*; import java.util.ArrayList; import java.util.Collections; @@ -84,7 +84,7 @@ public Void visitInstantiation(HqlParser.InstantiationContext ctx) { } private static String capturePrimaryAlias(VariableContext ctx) { - return ((ctx).reservedWord() != null ? ctx.reservedWord() : ctx.identifier().reservedWord()).getText(); + return ((ctx).nakedIdentifier() != null ? ctx.nakedIdentifier() : ctx.identifier()).getText(); } private static List captureSelectItems(List selections, diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryRenderer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryRenderer.java index 2ef49b95ff..311fdce1d3 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryRenderer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryRenderer.java @@ -1032,8 +1032,10 @@ public QueryTokenStream visitLiteral(HqlParser.LiteralContext ctx) { return QueryRendererBuilder.from(QueryTokens.expression(ctx.NULL())); } else if (ctx.booleanLiteral() != null) { return visit(ctx.booleanLiteral()); - } else if (ctx.stringLiteral() != null) { - return visit(ctx.stringLiteral()); + } else if (ctx.JAVA_STRING_LITERAL() != null) { + return QueryRendererBuilder.from(QueryTokens.expression(ctx.JAVA_STRING_LITERAL())); + } else if (ctx.STRING_LITERAL() != null) { + return QueryRendererBuilder.from(QueryTokens.expression(ctx.STRING_LITERAL())); } else if (ctx.numericLiteral() != null) { return visit(ctx.numericLiteral()); } else if (ctx.dateTimeLiteral() != null) { @@ -1057,27 +1059,23 @@ public QueryTokenStream visitBooleanLiteral(HqlParser.BooleanLiteralContext ctx) } } - @Override - public QueryTokenStream visitStringLiteral(HqlParser.StringLiteralContext ctx) { - - if (ctx.STRINGLITERAL() != null) { - return QueryRendererBuilder.from(QueryTokens.expression(ctx.STRINGLITERAL())); - } else if (ctx.CHARACTER() != null) { - return QueryRendererBuilder.from(QueryTokens.expression(ctx.CHARACTER())); - } else { - return QueryTokenStream.empty(); - } - } - @Override public QueryTokenStream visitNumericLiteral(HqlParser.NumericLiteralContext ctx) { if (ctx.INTEGER_LITERAL() != null) { return QueryRendererBuilder.from(QueryTokens.token(ctx.INTEGER_LITERAL())); + } else if (ctx.LONG_LITERAL() != null) { + return QueryRendererBuilder.from(QueryTokens.token(ctx.LONG_LITERAL())); + } else if (ctx.BIG_INTEGER_LITERAL() != null) { + return QueryRendererBuilder.from(QueryTokens.token(ctx.BIG_INTEGER_LITERAL())); } else if (ctx.FLOAT_LITERAL() != null) { return QueryRendererBuilder.from(QueryTokens.token(ctx.FLOAT_LITERAL())); - } else if (ctx.HEXLITERAL() != null) { - return QueryRendererBuilder.from(QueryTokens.token(ctx.HEXLITERAL())); + } else if (ctx.DOUBLE_LITERAL() != null) { + return QueryRendererBuilder.from(QueryTokens.token(ctx.DOUBLE_LITERAL())); + } else if (ctx.BIG_DECIMAL_LITERAL() != null) { + return QueryRendererBuilder.from(QueryTokens.token(ctx.BIG_DECIMAL_LITERAL())); + } else if (ctx.HEX_LITERAL() != null) { + return QueryRendererBuilder.from(QueryTokens.token(ctx.HEX_LITERAL())); } else { return QueryTokenStream.empty(); } @@ -1238,11 +1236,11 @@ public QueryTokenStream visitBinaryLiteral(HqlParser.BinaryLiteralContext ctx) { if (ctx.BINARY_LITERAL() != null) { builder.append(QueryTokens.expression(ctx.BINARY_LITERAL())); - } else if (ctx.HEXLITERAL() != null) { + } else if (ctx.HEX_LITERAL() != null) { builder.append(TOKEN_OPEN_BRACE); - builder.append(QueryTokenStream.concat(ctx.HEXLITERAL(), it -> { + builder.append(QueryTokenStream.concat(ctx.HEX_LITERAL(), it -> { return QueryRendererBuilder.from(QueryTokens.token(it)); }, TOKEN_COMMA)); @@ -1425,6 +1423,195 @@ public QueryTokenStream visitParameterExpression(HqlParser.ParameterExpressionCo return visit(ctx.parameter()); } + @Override + public QueryTokenStream visitEntityTypeExpression(HqlParser.EntityTypeExpressionContext ctx) { + return visit(ctx.entityTypeReference()); + } + + @Override + public QueryTokenStream visitEntityIdExpression(HqlParser.EntityIdExpressionContext ctx) { + return visit(ctx.entityIdReference()); + } + + @Override + public QueryTokenStream visitEntityVersionExpression(HqlParser.EntityVersionExpressionContext ctx) { + return visit(ctx.entityVersionReference()); + } + + @Override + public QueryTokenStream visitEntityNaturalIdExpression(HqlParser.EntityNaturalIdExpressionContext ctx) { + return visit(ctx.entityNaturalIdReference()); + } + + @Override + public QueryTokenStream visitSyntacticPathExpression(HqlParser.SyntacticPathExpressionContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + + builder.appendInline(visit(ctx.syntacticDomainPath())); + + if (ctx.pathContinuation() != null) { + builder.appendInline(visit(ctx.pathContinuation())); + } + + return builder; + } + + @Override + public QueryTokenStream visitPathContinuation(HqlParser.PathContinuationContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + + builder.append(TOKEN_DOT); + builder.append(visit(ctx.simplePath())); + + return builder; + } + + @Override + public QueryTokenStream visitEntityTypeReference(HqlParser.EntityTypeReferenceContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + + builder.append(QueryTokens.token(ctx.TYPE())); + builder.append(TOKEN_OPEN_PAREN); + + if (ctx.path() != null) { + builder.appendInline(visit(ctx.path())); + } + + if (ctx.parameter() != null) { + builder.appendInline(visit(ctx.parameter())); + } + builder.append(TOKEN_CLOSE_PAREN); + + return builder; + } + + @Override + public QueryTokenStream visitEntityIdReference(HqlParser.EntityIdReferenceContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + + builder.append(QueryTokens.token(ctx.ID())); + builder.append(TOKEN_OPEN_PAREN); + builder.appendInline(visit(ctx.path())); + builder.append(TOKEN_CLOSE_PAREN); + + if (ctx.pathContinuation() != null) { + builder.appendInline(visit(ctx.pathContinuation())); + } + + return builder; + } + + @Override + public QueryTokenStream visitEntityVersionReference(HqlParser.EntityVersionReferenceContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + + builder.append(QueryTokens.token(ctx.VERSION())); + builder.append(TOKEN_OPEN_PAREN); + builder.appendInline(visit(ctx.path())); + builder.append(TOKEN_CLOSE_PAREN); + + return builder; + } + + @Override + public QueryTokenStream visitEntityNaturalIdReference(HqlParser.EntityNaturalIdReferenceContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + + builder.append(QueryTokens.token(ctx.NATURALID())); + builder.append(TOKEN_OPEN_PAREN); + builder.appendInline(visit(ctx.path())); + builder.append(TOKEN_CLOSE_PAREN); + + if (ctx.pathContinuation() != null) { + builder.appendInline(visit(ctx.pathContinuation())); + } + + return builder; + } + + @Override + public QueryTokenStream visitSyntacticDomainPath(HqlParser.SyntacticDomainPathContext ctx) { + + if (ctx.treatedNavigablePath() != null) { + return visit(ctx.treatedNavigablePath()); + } + + if (ctx.collectionValueNavigablePath() != null) { + return visit(ctx.collectionValueNavigablePath()); + } + + if (ctx.mapKeyNavigablePath() != null) { + return visit(ctx.mapKeyNavigablePath()); + } + + if (ctx.toOneFkReference() != null) { + return visit(ctx.toOneFkReference()); + } + + if (ctx.function() != null) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + + builder.append(visit(ctx.function())); + + if (ctx.indexedPathAccessFragment() != null) { + builder.append(visit(ctx.indexedPathAccessFragment())); + } + + if (ctx.slicedPathAccessFragment() != null) { + builder.append(visit(ctx.slicedPathAccessFragment())); + } + + if (ctx.pathContinuation() != null) { + builder.append(visit(ctx.pathContinuation())); + } + + return builder; + } + + if (ctx.indexedPathAccessFragment() != null) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + + builder.append(visit(ctx.simplePath())); + builder.append(visit(ctx.indexedPathAccessFragment())); + + return builder; + } + + if (ctx.slicedPathAccessFragment() != null) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + + builder.append(visit(ctx.simplePath())); + builder.append(visit(ctx.slicedPathAccessFragment())); + + return builder; + } + + return QueryRenderer.empty(); + } + + @Override + public QueryTokenStream visitSlicedPathAccessFragment(HqlParser.SlicedPathAccessFragmentContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + + builder.append(TOKEN_OPEN_SQUARE_BRACKET); + builder.appendInline(visit(ctx.expression(0))); + builder.append(TOKEN_COLON); + builder.appendInline(visit(ctx.expression(1))); + builder.append(TOKEN_CLOSE_SQUARE_BRACKET); + + return builder; + } + @Override public QueryTokenStream visitFunctionExpression(HqlParser.FunctionExpressionContext ctx) { return visit(ctx.function()); @@ -1479,10 +1666,6 @@ public QueryTokenStream visitStandardFunction(HqlParser.StandardFunctionContext return visit(ctx.castFunction()); } - if (ctx.treatedPath() != null) { - return visit(ctx.treatedPath()); - } - if (ctx.extractFunction() != null) { return visit(ctx.extractFunction()); } @@ -1634,7 +1817,7 @@ public QueryTokenStream visitPadSpecification(HqlParser.PadSpecificationContext @Override public QueryTokenStream visitPadCharacter(HqlParser.PadCharacterContext ctx) { - return visit(ctx.stringLiteral()); + return QueryRendererBuilder.from(QueryTokens.token(ctx.STRING_LITERAL())); } @Override @@ -1908,7 +2091,7 @@ public QueryTokenStream visitRollup(HqlParser.RollupContext ctx) { @Override public QueryTokenStream visitFormat(HqlParser.FormatContext ctx) { - return visit(ctx.stringLiteral()); + return QueryRendererBuilder.from(QueryTokens.token(ctx.STRING_LITERAL())); } @Override @@ -1970,7 +2153,7 @@ public QueryTokenStream visitJpaNonstandardFunctionName(HqlParser.JpaNonstandard return visit(ctx.identifier()); } - return visit(ctx.stringLiteral()); + return QueryRendererBuilder.from(QueryTokens.token(ctx.STRING_LITERAL())); } @Override @@ -2378,12 +2561,12 @@ public QueryTokenStream visitPath(HqlParser.PathContext ctx) { QueryRendererBuilder builder = QueryRenderer.builder(); - if (ctx.treatedPath() != null) { + if (ctx.syntacticDomainPath() != null) { - builder.append(visit(ctx.treatedPath())); + builder.append(visit(ctx.syntacticDomainPath())); - if (ctx.pathContinutation() != null) { - builder.append(visit(ctx.pathContinutation())); + if (ctx.pathContinuation() != null) { + builder.append(visit(ctx.pathContinuation())); } } else if (ctx.generalPathFragment() != null) { builder.append(visit(ctx.generalPathFragment())); @@ -2549,8 +2732,8 @@ public QueryTokenStream visitGenericFunction(HqlParser.GenericFunctionContext ct nested.append(TOKEN_CLOSE_PAREN); builder.append(nested); - if (ctx.pathContinutation() != null) { - builder.append(visit(ctx.pathContinutation())); + if (ctx.pathContinuation() != null) { + builder.append(visit(ctx.pathContinuation())); } if (ctx.nthSideClause() != null) { @@ -2821,8 +3004,8 @@ public QueryTokenStream visitTrimSpecification(HqlParser.TrimSpecificationContex @Override public QueryTokenStream visitTrimCharacter(HqlParser.TrimCharacterContext ctx) { - if (ctx.stringLiteral() != null) { - return visit(ctx.stringLiteral()); + if (ctx.STRING_LITERAL() != null) { + return QueryRendererBuilder.from(QueryTokens.token(ctx.STRING_LITERAL())); } return visit(ctx.parameter()); @@ -2899,7 +3082,7 @@ public QueryTokenStream visitAnyFunction(HqlParser.AnyFunctionContext ctx) { } @Override - public QueryTokenStream visitTreatedPath(HqlParser.TreatedPathContext ctx) { + public QueryTokenStream visitTreatedNavigablePath(HqlParser.TreatedNavigablePathContext ctx) { QueryRendererBuilder builder = QueryRenderer.builder(); @@ -2914,24 +3097,88 @@ public QueryTokenStream visitTreatedPath(HqlParser.TreatedPathContext ctx) { builder.appendInline(nested); builder.append(TOKEN_CLOSE_PAREN); - if (ctx.pathContinutation() != null) { - builder.append(visit(ctx.pathContinutation())); + if (ctx.pathContinuation() != null) { + builder.append(visit(ctx.pathContinuation())); } return builder; } @Override - public QueryTokenStream visitPathContinutation(HqlParser.PathContinutationContext ctx) { + public QueryTokenStream visitCollectionValueNavigablePath(HqlParser.CollectionValueNavigablePathContext ctx) { QueryRendererBuilder builder = QueryRenderer.builder(); - builder.append(TOKEN_DOT); - builder.append(visit(ctx.simplePath())); + builder.append(visit(ctx.elementValueQuantifier())); + builder.append(TOKEN_OPEN_PAREN); + builder.append(visit(ctx.path())); + builder.append(TOKEN_CLOSE_PAREN); + + if (ctx.pathContinuation() != null) { + builder.append(visit(ctx.pathContinuation())); + } return builder; } + @Override + public QueryTokenStream visitMapKeyNavigablePath(HqlParser.MapKeyNavigablePathContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + + builder.append(visit(ctx.indexKeyQuantifier())); + builder.append(TOKEN_OPEN_PAREN); + builder.append(visit(ctx.path())); + builder.append(TOKEN_CLOSE_PAREN); + + if (ctx.pathContinuation() != null) { + builder.append(visit(ctx.pathContinuation())); + } + + return builder; + } + + @Override + public QueryTokenStream visitToOneFkReference(HqlParser.ToOneFkReferenceContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + + builder.append(QueryTokens.token(ctx.FK())); + builder.append(TOKEN_OPEN_PAREN); + builder.append(visit(ctx.path())); + builder.append(TOKEN_CLOSE_PAREN); + + return builder; + } + + @Override + public QueryTokenStream visitElementValueQuantifier(HqlParser.ElementValueQuantifierContext ctx) { + + if (ctx.ELEMENT() != null) { + return QueryRendererBuilder.from(QueryTokens.token(ctx.ELEMENT())); + } + + if (ctx.VALUE() != null) { + return QueryRendererBuilder.from(QueryTokens.token(ctx.VALUE())); + } + + return QueryTokenStream.empty(); + } + + @Override + public QueryTokenStream visitIndexKeyQuantifier(HqlParser.IndexKeyQuantifierContext ctx) { + + if (ctx.INDEX() != null) { + return QueryRendererBuilder.from(QueryTokens.token(ctx.INDEX())); + } + + if (ctx.KEY() != null) { + return QueryRendererBuilder.from(QueryTokens.token(ctx.KEY())); + } + + return QueryTokenStream.empty(); + } + @Override public QueryTokenStream visitIsBooleanPredicate(HqlParser.IsBooleanPredicateContext ctx) { @@ -3176,8 +3423,10 @@ public QueryTokenStream visitStringPatternMatching(HqlParser.StringPatternMatchi builder.append(QueryTokens.expression(ctx.ESCAPE())); - if (ctx.stringLiteral() != null) { - builder.appendExpression(visit(ctx.stringLiteral())); + if (ctx.STRING_LITERAL() != null) { + builder.append(QueryTokens.expression(ctx.STRING_LITERAL())); + } else if (ctx.JAVA_STRING_LITERAL() != null) { + builder.append(QueryTokens.expression(ctx.JAVA_STRING_LITERAL())); } else if (ctx.parameter() != null) { builder.appendExpression(visit(ctx.parameter())); } @@ -3335,8 +3584,8 @@ public QueryTokenStream visitVariable(HqlParser.VariableContext ctx) { builder.append(QueryTokens.expression(ctx.AS())); builder.append(visit(ctx.identifier())); - } else if (ctx.reservedWord() != null) { - builder.append(visit(ctx.reservedWord())); + } else if (ctx.nakedIdentifier() != null) { + builder.append(visit(ctx.nakedIdentifier())); } return builder; @@ -3371,20 +3620,33 @@ public QueryTokenStream visitEntityName(HqlParser.EntityNameContext ctx) { @Override public QueryTokenStream visitIdentifier(HqlParser.IdentifierContext ctx) { - if (ctx.reservedWord() != null) { - return visit(ctx.reservedWord()); - } else { - return QueryTokenStream.empty(); + if (ctx.nakedIdentifier() != null) { + return visit(ctx.nakedIdentifier()); + } else if (ctx.FULL() != null) { + return QueryRendererBuilder.from(QueryTokens.token(ctx.FULL())); + } else if (ctx.LEFT() != null) { + return QueryRendererBuilder.from(QueryTokens.token(ctx.LEFT())); + } else if (ctx.INNER() != null) { + return QueryRendererBuilder.from(QueryTokens.token(ctx.INNER())); + } else if (ctx.OUTER() != null) { + return QueryRendererBuilder.from(QueryTokens.token(ctx.OUTER())); + } else if (ctx.RIGHT() != null) { + return QueryRendererBuilder.from(QueryTokens.token(ctx.RIGHT())); } + + return QueryTokenStream.empty(); } @Override - public QueryTokenStream visitReservedWord(HqlParser.ReservedWordContext ctx) { + public QueryTokenStream visitNakedIdentifier(HqlParser.NakedIdentifierContext ctx) { - if (ctx.IDENTIFICATION_VARIABLE() != null) { - return QueryRendererBuilder.from(QueryTokens.token(ctx.IDENTIFICATION_VARIABLE())); + if (ctx.IDENTIFIER() != null) { + return QueryRendererBuilder.from(QueryTokens.token(ctx.IDENTIFIER())); + } else if (ctx.QUOTED_IDENTIFIER() != null) { + return QueryRendererBuilder.from(QueryTokens.token(ctx.QUOTED_IDENTIFIER())); } else { return QueryRendererBuilder.from(QueryTokens.token(ctx.f)); } } + } diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryRendererTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryRendererTests.java index 2f9dd07363..067a3adbe4 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryRendererTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryRendererTests.java @@ -37,7 +37,8 @@ * * @author Greg Turnquist * @author Christoph Strobl - * @author Mark Paluch, Yannick Brandt + * @author Mark Paluch + * @author Yannick Brandt * @since 3.1 */ class HqlQueryRendererTests { @@ -179,6 +180,180 @@ void pathExpressionSyntaxExample1() { """); } + @Test // GH-3711 + void entityTypeReference() { + + assertQuery(""" + SELECT TYPE(e) + FROM Employee e + """); + + assertQuery(""" + SELECT TYPE(?0) + FROM Employee e + """); + } + + @Test // GH-3711 + void entityIdReference() { + + assertQuery(""" + SELECT ID(e) + FROM Employee e + """); + + assertQuery(""" + SELECT ID(e).foo + FROM Employee e + """); + } + + @Test // GH-3711 + void entityNaturalIdReference() { + + assertQuery(""" + SELECT NATURALID(e) + FROM Employee e + """); + + assertQuery(""" + SELECT NATURALID(e).foo + FROM Employee e + """); + } + + @Test // GH-3711 + void entityVersionReference() { + + assertQuery(""" + SELECT VERSION(e) + FROM Employee e + """); + } + + @Test // GH-3711 + void treatedNavigablePath() { + + assertQuery(""" + SELECT TREAT(e as Integer).foo + FROM Employee e + """); + } + + @Test // GH-3711 + void collectionValueNavigablePath() { + + assertQuery(""" + SELECT ELEMENT(e) + FROM Employee e + """); + + assertQuery(""" + SELECT ELEMENT(e).foo + FROM Employee e + """); + + assertQuery(""" + SELECT VALUE(e) + FROM Employee e + """); + + assertQuery(""" + SELECT VALUE(e).foo + FROM Employee e + """); + } + + @Test // GH-3711 + void mapKeyNavigablePath() { + + assertQuery(""" + SELECT KEY(e) + FROM Employee e + """); + + assertQuery(""" + SELECT KEY(e).foo + FROM Employee e + """); + + assertQuery(""" + SELECT INDEX(e) + FROM Employee e + """); + } + + @Test // GH-3711 + void toOneFkReference() { + + assertQuery(""" + SELECT FK(e) + FROM Employee e + """); + + assertQuery(""" + SELECT FK(e.foo) + FROM Employee e + """); + } + + @Test // GH-3711 + void indexedPathAccessFragment() { + + assertQuery(""" + SELECT e.names[0] + FROM Employee e + """); + + assertQuery(""" + SELECT e.payments[1].id + FROM Employee e + """); + + assertQuery(""" + SELECT some_function()[0] + FROM Employee e + """); + + assertQuery(""" + SELECT some_function()[1].id + FROM Employee e + """); + } + + @Test // GH-3711 + void slicedPathAccessFragment() { + + assertQuery(""" + SELECT e.names[0:1] + FROM Employee e + """); + + assertQuery(""" + SELECT e.payments[1:2].id + FROM Employee e + """); + + assertQuery(""" + SELECT some_function()[0:1] + FROM Employee e + """); + + assertQuery(""" + SELECT some_function()[1:2].id + FROM Employee e + """); + } + + @Test // GH-3711 + void functionPathContinuation() { + + assertQuery(""" + SELECT some_function().foo + FROM Employee e + """); + } + @Test void joinsExample1() { @@ -299,7 +474,7 @@ void fromClauseDowncastingExample1() { assertQuery(""" SELECT b.name, b.ISBN FROM Order o JOIN TREAT(o.product AS Book) b - """); + """); } @Test @@ -308,7 +483,7 @@ void fromClauseDowncastingExample2() { assertQuery(""" SELECT e FROM Employee e JOIN TREAT(e.projects AS LargeProject) lp WHERE lp.budget > 1000 - """); + """); } /** @@ -323,7 +498,7 @@ void fromClauseDowncastingExample3_SPEC_BUG() { WHERE TREAT(p AS LargeProject).budget > 1000 OR TREAT(p AS SmallProject).name LIKE 'Persist%' OR p.description LIKE "cost overrun" - """); + """); } @Test @@ -334,7 +509,7 @@ void fromClauseDowncastingExample3fixed() { WHERE TREAT(p AS LargeProject).budget > 1000 OR TREAT(p AS SmallProject).name LIKE 'Persist%' OR p.description LIKE 'cost overrun' - """); + """); } @Test @@ -344,7 +519,7 @@ void fromClauseDowncastingExample4() { SELECT e FROM Employee e WHERE TREAT(e AS Exempt).vacationDays > 10 OR TREAT(e AS Contractor).hours > 100 - """); + """); } @Test @@ -408,7 +583,7 @@ void allExample() { WHERE emp.salary > ALL (SELECT m.salary FROM Manager m WHERE m.department = emp.department) - """); + """); } @Test @@ -420,7 +595,7 @@ void existsSubSelectExample2() { WHERE EXISTS (SELECT spouseEmp FROM Employee spouseEmp WHERE spouseEmp = emp.spouse) - """); + """); } @Test @@ -488,7 +663,7 @@ void updateCaseExample1() { WHEN e.rating = 2 THEN e.salary * 1.05 ELSE e.salary * 1.01 END - """); + """); } @Test @@ -501,7 +676,7 @@ void updateCaseExample2() { WHEN 2 THEN e.salary * 1.05 ELSE e.salary * 1.01 END - """); + """); } @Test @@ -541,7 +716,7 @@ void theRest() { SELECT e FROM Employee e WHERE TYPE(e) IN (Exempt, Contractor) - """); + """); } @Test @@ -1509,13 +1684,13 @@ select round(count(ri) * 100 / max(ri.receipt.positions), 0) as perc }); } - @Test + @Test // GH-3711 void ceilingFunctionShouldWork() { assertQuery("select ceiling(1.5) from Element a"); } - @Test - void lnFunctionSouldWork() { + @Test // GH-3711 + void lnFunctionShouldWork() { assertQuery("select ln(7.5) from Element a"); } @@ -1568,10 +1743,18 @@ void castFunctionWithFqdnShouldWork() { void durationLiteralsShouldWork(String dtField) { assertQuery("SELECT ce.id FROM CalendarEvent ce WHERE (ce.endDate - ce.startDate) > 5 %s".formatted(dtField)); - assertQuery("SELECT ce.id FROM CalendarEvent ce WHERE ce.text LIKE :text GROUP BY year(cd.date) HAVING (ce.endDate - ce.startDate) > 5 %s".formatted(dtField)); + assertQuery( + "SELECT ce.id FROM CalendarEvent ce WHERE ce.text LIKE :text GROUP BY year(cd.date) HAVING (ce.endDate - ce.startDate) > 5 %s" + .formatted(dtField)); assertQuery("SELECT ce.id as id, cd.startDate + 5 %s AS summedDate FROM CalendarEvent ce".formatted(dtField)); } + @ParameterizedTest // GH-3711 + @ValueSource(strings = { "1", "1_000", "1L", "1_000L", "1bi", "1.1f", "2.2d", "2.2bd" }) + void numberLiteralsShouldWork(String literal) { + assertQuery(String.format("SELECT %s FROM User u where u.id = %s", literal, literal)); + } + @Test // GH-3025 void binaryLiteralsShouldWork() { diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryTransformerTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryTransformerTests.java index 40aa7d274b..2ee28f804a 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryTransformerTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryTransformerTests.java @@ -924,7 +924,7 @@ where exists ( and iu = u ) and ct.id = :teamId - """, relationshipName, joinAlias, joinAlias)); + """, relationshipName, joinAlias, joinAlias)); } static Stream queriesWithReservedWordsAsIdentifiers() { @@ -933,7 +933,6 @@ static Stream queriesWithReservedWordsAsIdentifiers() { Arguments.of("right", "rt"), // Arguments.of("left", "lt"), // Arguments.of("outer", "ou"), // - Arguments.of("full", "full"), // Arguments.of("inner", "inr")); } From 18e89cc91a632ccbf96194a2ba172a29e433f916 Mon Sep 17 00:00:00 2001 From: Christoph Strobl Date: Fri, 13 Dec 2024 09:34:25 +0100 Subject: [PATCH 21/87] Prepare 3.4.1 (2024.1.1). See #3678 --- pom.xml | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/pom.xml b/pom.xml index 92fc11728b..54fd35ac34 100755 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.springframework.data.build spring-data-parent - 3.4.1-SNAPSHOT + 3.4.1 @@ -41,7 +41,7 @@ 5.0 9.1.0 42.7.4 - 3.4.1-SNAPSHOT + 3.4.1 0.10.3 org.hibernate @@ -289,20 +289,8 @@ - - spring-snapshot - https://repo.spring.io/snapshot - - true - - - false - - - - spring-milestone - https://repo.spring.io/milestone - + + From 72bd0868d66bd795a1eb7521444322e7fac0a728 Mon Sep 17 00:00:00 2001 From: Christoph Strobl Date: Fri, 13 Dec 2024 09:34:47 +0100 Subject: [PATCH 22/87] Release version 3.4.1 (2024.1.1). See #3678 --- pom.xml | 2 +- spring-data-envers/pom.xml | 4 ++-- spring-data-jpa-distribution/pom.xml | 2 +- spring-data-jpa/pom.xml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index 54fd35ac34..29b19df668 100755 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.springframework.data spring-data-jpa-parent - 3.4.1-SNAPSHOT + 3.4.1 pom Spring Data JPA Parent diff --git a/spring-data-envers/pom.xml b/spring-data-envers/pom.xml index e47a1201e6..7d049e6ce1 100755 --- a/spring-data-envers/pom.xml +++ b/spring-data-envers/pom.xml @@ -5,12 +5,12 @@ org.springframework.data spring-data-envers - 3.4.1-SNAPSHOT + 3.4.1 org.springframework.data spring-data-jpa-parent - 3.4.1-SNAPSHOT + 3.4.1 ../pom.xml diff --git a/spring-data-jpa-distribution/pom.xml b/spring-data-jpa-distribution/pom.xml index 9b133f1b1b..9635c082b3 100644 --- a/spring-data-jpa-distribution/pom.xml +++ b/spring-data-jpa-distribution/pom.xml @@ -14,7 +14,7 @@ org.springframework.data spring-data-jpa-parent - 3.4.1-SNAPSHOT + 3.4.1 ../pom.xml diff --git a/spring-data-jpa/pom.xml b/spring-data-jpa/pom.xml index 22bf65d587..e12b7a01b1 100644 --- a/spring-data-jpa/pom.xml +++ b/spring-data-jpa/pom.xml @@ -6,7 +6,7 @@ org.springframework.data spring-data-jpa - 3.4.1-SNAPSHOT + 3.4.1 Spring Data JPA Spring Data module for JPA repositories. @@ -15,7 +15,7 @@ org.springframework.data spring-data-jpa-parent - 3.4.1-SNAPSHOT + 3.4.1 ../pom.xml From 16af77018ca12ce4f149f7c062e2bcc68b7cf838 Mon Sep 17 00:00:00 2001 From: Christoph Strobl Date: Fri, 13 Dec 2024 09:38:10 +0100 Subject: [PATCH 23/87] Prepare next development iteration. See #3678 --- pom.xml | 2 +- spring-data-envers/pom.xml | 4 ++-- spring-data-jpa-distribution/pom.xml | 2 +- spring-data-jpa/pom.xml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index 29b19df668..de583669b5 100755 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.springframework.data spring-data-jpa-parent - 3.4.1 + 3.4.2-SNAPSHOT pom Spring Data JPA Parent diff --git a/spring-data-envers/pom.xml b/spring-data-envers/pom.xml index 7d049e6ce1..179457d72e 100755 --- a/spring-data-envers/pom.xml +++ b/spring-data-envers/pom.xml @@ -5,12 +5,12 @@ org.springframework.data spring-data-envers - 3.4.1 + 3.4.2-SNAPSHOT org.springframework.data spring-data-jpa-parent - 3.4.1 + 3.4.2-SNAPSHOT ../pom.xml diff --git a/spring-data-jpa-distribution/pom.xml b/spring-data-jpa-distribution/pom.xml index 9635c082b3..9fe854e7ac 100644 --- a/spring-data-jpa-distribution/pom.xml +++ b/spring-data-jpa-distribution/pom.xml @@ -14,7 +14,7 @@ org.springframework.data spring-data-jpa-parent - 3.4.1 + 3.4.2-SNAPSHOT ../pom.xml diff --git a/spring-data-jpa/pom.xml b/spring-data-jpa/pom.xml index e12b7a01b1..b370a46d5e 100644 --- a/spring-data-jpa/pom.xml +++ b/spring-data-jpa/pom.xml @@ -6,7 +6,7 @@ org.springframework.data spring-data-jpa - 3.4.1 + 3.4.2-SNAPSHOT Spring Data JPA Spring Data module for JPA repositories. @@ -15,7 +15,7 @@ org.springframework.data spring-data-jpa-parent - 3.4.1 + 3.4.2-SNAPSHOT ../pom.xml From c47ba6248027106ef0d0ab4b4729522ec0376c09 Mon Sep 17 00:00:00 2001 From: Christoph Strobl Date: Fri, 13 Dec 2024 09:38:12 +0100 Subject: [PATCH 24/87] After release cleanups. See #3678 --- pom.xml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index de583669b5..4f937df2d3 100755 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.springframework.data.build spring-data-parent - 3.4.1 + 3.4.2-SNAPSHOT @@ -41,7 +41,7 @@ 5.0 9.1.0 42.7.4 - 3.4.1 + 3.4.2-SNAPSHOT 0.10.3 org.hibernate @@ -289,8 +289,20 @@ - - + + spring-snapshot + https://repo.spring.io/snapshot + + true + + + false + + + + spring-milestone + https://repo.spring.io/milestone + From 29b8855d8b69786bc79a786acd247d45b85cd9df Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Wed, 8 Jan 2025 09:58:42 +0100 Subject: [PATCH 25/87] Extend license header copyright years to 2025. See #3732 --- .../data/envers/repository/config/EnableEnversRepositories.java | 2 +- .../repository/support/DefaultRevisionEntityInformation.java | 2 +- .../data/envers/repository/support/DefaultRevisionMetadata.java | 2 +- .../envers/repository/support/EnversRevisionRepository.java | 2 +- .../repository/support/EnversRevisionRepositoryFactoryBean.java | 2 +- .../envers/repository/support/EnversRevisionRepositoryImpl.java | 2 +- .../repository/support/ReflectionRevisionEntityInformation.java | 2 +- .../src/test/java/org/springframework/data/envers/Config.java | 2 +- .../repository/support/DefaultRevisionMetadataUnitTests.java | 2 +- .../support/EnversRevisionRepositoryImplUnitTests.java | 2 +- .../repository/support/QueryDslRepositoryIntegrationTests.java | 2 +- .../envers/repository/support/RepositoryIntegrationTests.java | 2 +- .../org/springframework/data/envers/sample/AbstractEntity.java | 2 +- .../java/org/springframework/data/envers/sample/Country.java | 2 +- .../data/envers/sample/CountryQueryDslRepository.java | 2 +- .../springframework/data/envers/sample/CountryRepository.java | 2 +- .../data/envers/sample/CustomRevisionEntity.java | 2 +- .../data/envers/sample/CustomRevisionListener.java | 2 +- .../java/org/springframework/data/envers/sample/License.java | 2 +- .../springframework/data/envers/sample/LicenseRepository.java | 2 +- .../java/org/springframework/data/envers/sample/QCountry.java | 2 +- .../data/jpa/benchmark/RepositoryFinderBenchmarks.java | 2 +- .../data/jpa/benchmark/model/IPersonProjection.java | 2 +- .../org/springframework/data/jpa/benchmark/model/Person.java | 2 +- .../org/springframework/data/jpa/benchmark/model/Profile.java | 2 +- .../data/jpa/benchmark/repository/PersonRepository.java | 2 +- .../data/jpa/repository/query/HqlParserBenchmarks.java | 2 +- .../jpa/repository/query/JSqlParserQueryEnhancerBenchmarks.java | 2 +- .../data/jpa/convert/QueryByExamplePredicateBuilder.java | 2 +- .../data/jpa/convert/threeten/Jsr310JpaConverters.java | 2 +- .../org/springframework/data/jpa/domain/AbstractAuditable.java | 2 +- .../springframework/data/jpa/domain/AbstractPersistable.java | 2 +- .../main/java/org/springframework/data/jpa/domain/JpaSort.java | 2 +- .../java/org/springframework/data/jpa/domain/Specification.java | 2 +- .../data/jpa/domain/SpecificationComposition.java | 2 +- .../jpa/domain/support/AuditingBeanFactoryPostProcessor.java | 2 +- .../data/jpa/domain/support/AuditingEntityListener.java | 2 +- .../data/jpa/mapping/JpaMetamodelMappingContext.java | 2 +- .../springframework/data/jpa/mapping/JpaPersistentEntity.java | 2 +- .../data/jpa/mapping/JpaPersistentEntityImpl.java | 2 +- .../springframework/data/jpa/mapping/JpaPersistentProperty.java | 2 +- .../data/jpa/mapping/JpaPersistentPropertyImpl.java | 2 +- .../data/jpa/projection/CollectionAwareProjectionFactory.java | 2 +- .../org/springframework/data/jpa/provider/HibernateUtils.java | 2 +- .../org/springframework/data/jpa/provider/JpaClassUtils.java | 2 +- .../springframework/data/jpa/provider/PersistenceProvider.java | 2 +- .../org/springframework/data/jpa/provider/ProxyIdAccessor.java | 2 +- .../org/springframework/data/jpa/provider/QueryComment.java | 2 +- .../org/springframework/data/jpa/provider/QueryExtractor.java | 2 +- .../org/springframework/data/jpa/repository/EntityGraph.java | 2 +- .../org/springframework/data/jpa/repository/JpaContext.java | 2 +- .../org/springframework/data/jpa/repository/JpaRepository.java | 2 +- .../data/jpa/repository/JpaSpecificationExecutor.java | 2 +- .../main/java/org/springframework/data/jpa/repository/Lock.java | 2 +- .../main/java/org/springframework/data/jpa/repository/Meta.java | 2 +- .../java/org/springframework/data/jpa/repository/Modifying.java | 2 +- .../org/springframework/data/jpa/repository/NativeQuery.java | 2 +- .../java/org/springframework/data/jpa/repository/Query.java | 2 +- .../org/springframework/data/jpa/repository/QueryHints.java | 2 +- .../org/springframework/data/jpa/repository/QueryRewriter.java | 2 +- .../java/org/springframework/data/jpa/repository/Temporal.java | 2 +- .../data/jpa/repository/aot/JpaRuntimeHints.java | 2 +- .../jpa/repository/cdi/BeanManagerQueryRewriterProvider.java | 2 +- .../data/jpa/repository/cdi/JpaRepositoryBean.java | 2 +- .../data/jpa/repository/cdi/JpaRepositoryExtension.java | 2 +- .../jpa/repository/config/AuditingBeanDefinitionParser.java | 2 +- .../data/jpa/repository/config/BeanDefinitionNames.java | 2 +- .../data/jpa/repository/config/EnableJpaAuditing.java | 2 +- .../data/jpa/repository/config/EnableJpaRepositories.java | 2 +- .../data/jpa/repository/config/InspectionClassLoader.java | 2 +- .../data/jpa/repository/config/JpaAuditingRegistrar.java | 2 +- .../config/JpaMetamodelMappingContextFactoryBean.java | 2 +- .../data/jpa/repository/config/JpaRepositoriesRegistrar.java | 2 +- .../jpa/repository/config/JpaRepositoryConfigExtension.java | 2 +- .../jpa/repository/config/JpaRepositoryNameSpaceHandler.java | 2 +- .../data/jpa/repository/query/AbstractJpaQuery.java | 2 +- .../data/jpa/repository/query/AbstractStringBasedJpaQuery.java | 2 +- .../data/jpa/repository/query/BadJpqlGrammarErrorListener.java | 2 +- .../data/jpa/repository/query/BadJpqlGrammarException.java | 2 +- .../jpa/repository/query/BeanFactoryQueryRewriterProvider.java | 2 +- .../data/jpa/repository/query/CollectionUtils.java | 2 +- .../data/jpa/repository/query/DeclaredQuery.java | 2 +- .../data/jpa/repository/query/DefaultJpaEntityMetadata.java | 2 +- .../data/jpa/repository/query/DefaultJpaQueryMethodFactory.java | 2 +- .../data/jpa/repository/query/DefaultQueryEnhancer.java | 2 +- .../data/jpa/repository/query/DelegatingQueryRewriter.java | 2 +- .../data/jpa/repository/query/EmptyDeclaredQuery.java | 2 +- .../data/jpa/repository/query/EmptyQueryTokenStream.java | 2 +- .../data/jpa/repository/query/EqlCountQueryTransformer.java | 2 +- .../data/jpa/repository/query/EqlQueryIntrospector.java | 2 +- .../data/jpa/repository/query/EqlQueryRenderer.java | 2 +- .../data/jpa/repository/query/EqlSortedQueryTransformer.java | 2 +- .../data/jpa/repository/query/EscapeCharacter.java | 2 +- .../data/jpa/repository/query/ExpressionBasedStringQuery.java | 2 +- .../query/HibernateJpaParametersParameterAccessor.java | 2 +- .../data/jpa/repository/query/HqlCountQueryTransformer.java | 2 +- .../data/jpa/repository/query/HqlQueryIntrospector.java | 2 +- .../data/jpa/repository/query/HqlQueryRenderer.java | 2 +- .../data/jpa/repository/query/HqlSortedQueryTransformer.java | 2 +- .../jpa/repository/query/InvalidJpaQueryMethodException.java | 2 +- .../data/jpa/repository/query/JSqlParserQueryEnhancer.java | 2 +- .../data/jpa/repository/query/JSqlParserUtils.java | 2 +- .../springframework/data/jpa/repository/query/Jpa21Utils.java | 2 +- .../data/jpa/repository/query/JpaCountQueryCreator.java | 2 +- .../data/jpa/repository/query/JpaEntityGraph.java | 2 +- .../data/jpa/repository/query/JpaEntityMetadata.java | 2 +- .../data/jpa/repository/query/JpaKeysetScrollQueryCreator.java | 2 +- .../data/jpa/repository/query/JpaParameters.java | 2 +- .../jpa/repository/query/JpaParametersParameterAccessor.java | 2 +- .../data/jpa/repository/query/JpaQueryCreator.java | 2 +- .../data/jpa/repository/query/JpaQueryEnhancer.java | 2 +- .../data/jpa/repository/query/JpaQueryExecution.java | 2 +- .../data/jpa/repository/query/JpaQueryFactory.java | 2 +- .../data/jpa/repository/query/JpaQueryLookupStrategy.java | 2 +- .../data/jpa/repository/query/JpaQueryMethod.java | 2 +- .../data/jpa/repository/query/JpaQueryMethodFactory.java | 2 +- .../data/jpa/repository/query/JpaResultConverters.java | 2 +- .../data/jpa/repository/query/JpqlCountQueryTransformer.java | 2 +- .../data/jpa/repository/query/JpqlQueryIntrospector.java | 2 +- .../data/jpa/repository/query/JpqlQueryRenderer.java | 2 +- .../data/jpa/repository/query/JpqlSortedQueryTransformer.java | 2 +- .../data/jpa/repository/query/KeysetScrollDelegate.java | 2 +- .../data/jpa/repository/query/KeysetScrollSpecification.java | 2 +- .../org/springframework/data/jpa/repository/query/Meta.java | 2 +- .../springframework/data/jpa/repository/query/NamedQuery.java | 2 +- .../data/jpa/repository/query/NativeJpaQuery.java | 2 +- .../data/jpa/repository/query/ParameterBinder.java | 2 +- .../data/jpa/repository/query/ParameterBinderFactory.java | 2 +- .../data/jpa/repository/query/ParameterBinding.java | 2 +- .../data/jpa/repository/query/ParameterMetadataProvider.java | 2 +- .../data/jpa/repository/query/ParsedQueryIntrospector.java | 2 +- .../data/jpa/repository/query/PartTreeJpaQuery.java | 2 +- .../springframework/data/jpa/repository/query/Procedure.java | 2 +- .../data/jpa/repository/query/ProcedureParameter.java | 2 +- .../data/jpa/repository/query/QueryEnhancer.java | 2 +- .../data/jpa/repository/query/QueryEnhancerFactory.java | 2 +- .../data/jpa/repository/query/QueryParameterSetter.java | 2 +- .../data/jpa/repository/query/QueryParameterSetterFactory.java | 2 +- .../data/jpa/repository/query/QueryRenderer.java | 2 +- .../data/jpa/repository/query/QueryRewriterProvider.java | 2 +- .../springframework/data/jpa/repository/query/QueryToken.java | 2 +- .../data/jpa/repository/query/QueryTokenStream.java | 2 +- .../springframework/data/jpa/repository/query/QueryTokens.java | 2 +- .../data/jpa/repository/query/QueryTransformers.java | 2 +- .../springframework/data/jpa/repository/query/QueryUtils.java | 2 +- .../data/jpa/repository/query/ScrollDelegate.java | 2 +- .../data/jpa/repository/query/SimpleJpaQuery.java | 2 +- .../jpa/repository/query/StoredProcedureAttributeSource.java | 2 +- .../data/jpa/repository/query/StoredProcedureAttributes.java | 2 +- .../data/jpa/repository/query/StoredProcedureJpaQuery.java | 2 +- .../springframework/data/jpa/repository/query/StringQuery.java | 2 +- .../data/jpa/repository/support/CrudMethodMetadata.java | 2 +- .../jpa/repository/support/CrudMethodMetadataPostProcessor.java | 2 +- .../data/jpa/repository/support/DefaultJpaContext.java | 2 +- .../data/jpa/repository/support/DefaultQueryHints.java | 2 +- .../data/jpa/repository/support/EntityGraphFactory.java | 2 +- .../EntityManagerBeanDefinitionRegistrarPostProcessor.java | 2 +- .../jpa/repository/support/FetchableFluentQueryByPredicate.java | 2 +- .../repository/support/FetchableFluentQueryBySpecification.java | 2 +- .../data/jpa/repository/support/FluentQuerySupport.java | 2 +- .../data/jpa/repository/support/JpaEntityInformation.java | 2 +- .../jpa/repository/support/JpaEntityInformationSupport.java | 2 +- .../jpa/repository/support/JpaEvaluationContextExtension.java | 2 +- .../jpa/repository/support/JpaMetamodelEntityInformation.java | 2 +- .../jpa/repository/support/JpaPersistableEntityInformation.java | 2 +- .../jpa/repository/support/JpaRepositoryConfigurationAware.java | 2 +- .../data/jpa/repository/support/JpaRepositoryFactory.java | 2 +- .../data/jpa/repository/support/JpaRepositoryFactoryBean.java | 2 +- .../jpa/repository/support/JpaRepositoryImplementation.java | 2 +- .../data/jpa/repository/support/MutableQueryHints.java | 2 +- .../data/jpa/repository/support/QueryHintValue.java | 2 +- .../springframework/data/jpa/repository/support/QueryHints.java | 2 +- .../springframework/data/jpa/repository/support/Querydsl.java | 2 +- .../jpa/repository/support/QuerydslJpaPredicateExecutor.java | 2 +- .../data/jpa/repository/support/QuerydslJpaRepository.java | 2 +- .../data/jpa/repository/support/QuerydslRepositorySupport.java | 2 +- .../data/jpa/repository/support/SimpleJpaRepository.java | 2 +- .../support/ClasspathScanningPersistenceUnitPostProcessor.java | 2 +- .../data/jpa/support/MergingPersistenceUnitManager.java | 2 +- .../org/springframework/data/jpa/support/PageableUtils.java | 2 +- .../org/springframework/data/jpa/util/BeanDefinitionUtils.java | 2 +- .../springframework/data/jpa/util/HibernateProxyDetector.java | 2 +- .../java/org/springframework/data/jpa/util/JpaMetamodel.java | 2 +- .../springframework/data/jpa/util/JpaMetamodelCacheCleanup.java | 2 +- .../java/org/springframework/data/jpa/AntlrVersionTests.java | 2 +- .../jpa/convert/QueryByExamplePredicateBuilderUnitTests.java | 2 +- .../data/jpa/convert/threeten/DateTimeSample.java | 2 +- .../convert/threeten/Jsr310JpaConvertersIntegrationTests.java | 2 +- .../data/jpa/convert/threeten/Jsr310JpaConvertersUnitTests.java | 2 +- .../java/org/springframework/data/jpa/domain/JpaSortTests.java | 2 +- .../springframework/data/jpa/domain/SpecificationUnitTests.java | 2 +- .../data/jpa/domain/sample/AbstractAnnotatedAuditable.java | 2 +- .../data/jpa/domain/sample/AbstractMappedType.java | 2 +- .../org/springframework/data/jpa/domain/sample/Account.java | 2 +- .../org/springframework/data/jpa/domain/sample/Address.java | 2 +- .../data/jpa/domain/sample/AnnotatedAuditableUser.java | 2 +- .../data/jpa/domain/sample/AuditableEmbeddable.java | 2 +- .../springframework/data/jpa/domain/sample/AuditableEntity.java | 2 +- .../springframework/data/jpa/domain/sample/AuditableRole.java | 2 +- .../springframework/data/jpa/domain/sample/AuditableUser.java | 2 +- .../data/jpa/domain/sample/AuditorAwareStub.java | 2 +- .../java/org/springframework/data/jpa/domain/sample/Book.java | 2 +- .../java/org/springframework/data/jpa/domain/sample/Child.java | 2 +- .../springframework/data/jpa/domain/sample/ConcreteType1.java | 2 +- .../springframework/data/jpa/domain/sample/ConcreteType2.java | 2 +- .../data/jpa/domain/sample/CustomAbstractPersistable.java | 2 +- .../org/springframework/data/jpa/domain/sample/Customer.java | 2 +- .../java/org/springframework/data/jpa/domain/sample/Dummy.java | 2 +- .../data/jpa/domain/sample/EmbeddedIdExampleDepartment.java | 2 +- .../data/jpa/domain/sample/EmbeddedIdExampleEmployee.java | 2 +- .../data/jpa/domain/sample/EmbeddedIdExampleEmployeePK.java | 2 +- .../data/jpa/domain/sample/EmployeeWithName.java | 2 +- .../data/jpa/domain/sample/EntityWithAssignedId.java | 2 +- .../data/jpa/domain/sample/IdClassExampleDepartment.java | 2 +- .../data/jpa/domain/sample/IdClassExampleEmployee.java | 2 +- .../data/jpa/domain/sample/IdClassExampleEmployeePK.java | 2 +- .../org/springframework/data/jpa/domain/sample/Invoice.java | 2 +- .../org/springframework/data/jpa/domain/sample/InvoiceItem.java | 2 +- .../java/org/springframework/data/jpa/domain/sample/Item.java | 2 +- .../java/org/springframework/data/jpa/domain/sample/ItemId.java | 2 +- .../org/springframework/data/jpa/domain/sample/ItemSite.java | 2 +- .../org/springframework/data/jpa/domain/sample/ItemSiteId.java | 2 +- .../org/springframework/data/jpa/domain/sample/MailMessage.java | 2 +- .../org/springframework/data/jpa/domain/sample/MailSender.java | 2 +- .../org/springframework/data/jpa/domain/sample/MailUser.java | 2 +- .../java/org/springframework/data/jpa/domain/sample/Order.java | 2 +- .../springframework/data/jpa/domain/sample/OrmXmlEntity.java | 2 +- .../java/org/springframework/data/jpa/domain/sample/Owner.java | 2 +- .../springframework/data/jpa/domain/sample/OwnerContainer.java | 2 +- .../java/org/springframework/data/jpa/domain/sample/Parent.java | 2 +- .../data/jpa/domain/sample/PersistableWithIdClass.java | 2 +- .../data/jpa/domain/sample/PersistableWithIdClassPK.java | 2 +- .../data/jpa/domain/sample/PersistableWithSingleIdClass.java | 2 +- .../data/jpa/domain/sample/PersistableWithSingleIdClassPK.java | 2 +- .../data/jpa/domain/sample/PrimitiveVersionProperty.java | 2 +- .../java/org/springframework/data/jpa/domain/sample/Role.java | 2 +- .../springframework/data/jpa/domain/sample/SampleEntity.java | 2 +- .../springframework/data/jpa/domain/sample/SampleEntityPK.java | 2 +- .../data/jpa/domain/sample/SampleWithPrimitiveId.java | 2 +- .../data/jpa/domain/sample/SampleWithTimestampVersion.java | 2 +- .../java/org/springframework/data/jpa/domain/sample/Site.java | 2 +- .../java/org/springframework/data/jpa/domain/sample/User.java | 2 +- .../data/jpa/domain/sample/UserSpecifications.java | 2 +- .../data/jpa/domain/sample/UserWithOptionalField.java | 2 +- .../data/jpa/domain/sample/UserWithOptionalFieldRepository.java | 2 +- .../springframework/data/jpa/domain/sample/VersionedUser.java | 2 +- .../support/AbstractAttributeConverterIntegrationTests.java | 2 +- .../AnnotationAuditingBeanFactoryPostProcessorUnitTests.java | 2 +- .../support/AuditingBeanFactoryPostProcessorUnitTests.java | 2 +- .../data/jpa/domain/support/AuditingEntityListenerTests.java | 2 +- .../support/AuditingEntityWithEmbeddableListenerTests.java | 2 +- .../data/jpa/domain/support/AuditingNamespaceUnitTests.java | 2 +- .../domain/support/QueryByExampleWithOptionalEmptyTests.java | 2 +- .../infrastructure/EclipseLinkMetamodelIntegrationTests.java | 2 +- .../jpa/infrastructure/HibernateMetamodelIntegrationTests.java | 2 +- .../data/jpa/infrastructure/HibernateTestUtils.java | 2 +- .../data/jpa/infrastructure/MetamodelIntegrationTests.java | 2 +- .../jpa/infrastructure/OpenJpaMetamodelIntegrationTests.java | 2 +- .../jpa/mapping/JpaMetamodelMappingContextIntegrationTests.java | 2 +- .../data/jpa/mapping/JpaMetamodelMappingContextUnitTests.java | 2 +- .../data/jpa/mapping/JpaPersistentPropertyImplUnitTests.java | 2 +- .../data/jpa/provider/PersistenceProviderIntegrationTests.java | 2 +- .../data/jpa/provider/PersistenceProviderUnitTests.java | 2 +- .../jpa/repository/AbstractPersistableIntegrationTests.java | 2 +- .../data/jpa/repository/CrudMethodMetadataUnitTests.java | 2 +- .../repository/CustomAbstractPersistableIntegrationTests.java | 2 +- .../data/jpa/repository/CustomEclipseLinkJpaVendorAdapter.java | 2 +- .../jpa/repository/CustomHsqlHibernateJpaVendorAdaptor.java | 2 +- ...EclipseLinkEntityGraphRepositoryMethodsIntegrationTests.java | 2 +- .../jpa/repository/EclipseLinkNamespaceUserRepositoryTests.java | 2 +- .../repository/EclipseLinkParentRepositoryIntegrationTests.java | 2 +- .../repository/EclipseLinkQueryByExampleIntegrationTests.java | 2 +- .../EclipseLinkRepositoryWithCompositeKeyIntegrationTests.java | 2 +- .../repository/EclipseLinkStoredProcedureIntegrationTests.java | 2 +- .../jpa/repository/EclipseLinkUserRepositoryFinderTests.java | 2 +- .../EntityGraphRepositoryMethodsIntegrationTests.java | 2 +- .../jpa/repository/EntityWithAssignedIdIntegrationTests.java | 2 +- .../org/springframework/data/jpa/repository/GreetingsFrom.java | 2 +- .../data/jpa/repository/JavaConfigUserRepositoryTests.java | 2 +- .../jpa/repository/MappedTypeRepositoryIntegrationTests.java | 2 +- .../data/jpa/repository/NamespaceUserRepositoryTests.java | 2 +- .../data/jpa/repository/ORMInfrastructureTests.java | 2 +- .../OpenJpaEntityGraphRepositoryMethodsIntegrationTests.java | 2 +- .../jpa/repository/OpenJpaNamespaceUserRepositoryTests.java | 2 +- .../jpa/repository/OpenJpaParentRepositoryIntegrationTests.java | 2 +- .../OpenJpaRepositoryWithCompositeKeyIntegrationTests.java | 2 +- .../jpa/repository/OpenJpaStoredProcedureIntegrationTests.java | 2 +- .../data/jpa/repository/OpenJpaUserRepositoryFinderTests.java | 2 +- .../data/jpa/repository/ParentRepositoryIntegrationTests.java | 2 +- .../data/jpa/repository/QueryByExampleIntegrationTests.java | 2 +- .../data/jpa/repository/RedeclaringRepositoryMethodsTests.java | 2 +- .../data/jpa/repository/RepositoryWithCompositeKeyTests.java | 2 +- .../data/jpa/repository/RepositoryWithIdClassKeyTests.java | 2 +- .../data/jpa/repository/RoleRepositoryIntegrationTests.java | 2 +- .../org/springframework/data/jpa/repository/SPR8954Tests.java | 2 +- .../data/jpa/repository/SimpleJpaParameterBindingTests.java | 2 +- .../data/jpa/repository/StoredProcedureIntegrationTests.java | 2 +- .../data/jpa/repository/UserRepositoryFinderTests.java | 2 +- .../UserRepositoryStoredProcedureIntegrationTests.java | 2 +- .../data/jpa/repository/UserRepositoryTests.java | 2 +- .../data/jpa/repository/aot/JpaRuntimeHintsUnitTests.java | 2 +- .../data/jpa/repository/cdi/CdiExtensionIntegrationTests.java | 2 +- .../data/jpa/repository/cdi/EntityManagerFactoryProducer.java | 2 +- .../repository/cdi/JpaQueryRewriterWithCdiIntegrationTests.java | 2 +- .../jpa/repository/cdi/JpaRepositoryExtensionUnitTests.java | 2 +- .../org/springframework/data/jpa/repository/cdi/Person.java | 2 +- .../org/springframework/data/jpa/repository/cdi/PersonDB.java | 2 +- .../data/jpa/repository/cdi/PersonRepository.java | 2 +- .../jpa/repository/cdi/QualifiedCustomizedCdiConfiguration.java | 2 +- .../jpa/repository/cdi/QualifiedCustomizedUserRepository.java | 2 +- .../repository/cdi/QualifiedCustomizedUserRepositoryBean.java | 2 +- .../repository/cdi/QualifiedCustomizedUserRepositoryCustom.java | 2 +- .../data/jpa/repository/cdi/QualifiedEntityManagerProducer.java | 2 +- .../data/jpa/repository/cdi/QualifiedFragment.java | 2 +- .../data/jpa/repository/cdi/QualifiedFragmentBean.java | 2 +- .../data/jpa/repository/cdi/QualifiedPersonRepository.java | 2 +- .../data/jpa/repository/cdi/RepositoryConsumer.java | 2 +- .../data/jpa/repository/cdi/SamplePersonRepository.java | 2 +- .../data/jpa/repository/cdi/SamplePersonRepositoryCustom.java | 2 +- .../data/jpa/repository/cdi/SamplePersonRepositoryImpl.java | 2 +- .../springframework/data/jpa/repository/cdi/Transactional.java | 2 +- .../data/jpa/repository/cdi/TransactionalInterceptor.java | 2 +- .../jpa/repository/cdi/UnqualifiedEntityManagerProducer.java | 2 +- .../data/jpa/repository/cdi/UnqualifiedPersonRepository.java | 2 +- .../org/springframework/data/jpa/repository/cdi/UserDB.java | 2 +- .../config/AbstractAuditingViaJavaConfigRepositoriesTests.java | 2 +- .../jpa/repository/config/AbstractRepositoryConfigTests.java | 2 +- .../config/AllowNestedRepositoriesRepositoryConfigTests.java | 2 +- .../repository/config/AuditingBeanDefinitionParserTests.java | 2 +- .../repository/config/CustomRepositoryFactoryConfigTests.java | 2 +- .../config/DefaultAuditingViaJavaConfigRepositoriesTests.java | 2 +- .../config/ExplicitAuditingViaJavaConfigRepositoriesTests.java | 2 +- .../data/jpa/repository/config/InfrastructureConfig.java | 2 +- .../jpa/repository/config/InspectionClassLoaderUnitTests.java | 2 +- .../jpa/repository/config/JpaAuditingRegistrarUnitTests.java | 2 +- .../config/JpaRepositoriesRegistrarIntegrationTests.java | 2 +- .../repository/config/JpaRepositoriesRegistrarUnitTests.java | 2 +- .../config/JpaRepositoryConfigDefinitionParserTests.java | 2 +- .../config/JpaRepositoryConfigExtensionUnitTests.java | 2 +- .../config/JpaRepositoryRegistrationAotProcessorUnitTests.java | 2 +- .../repository/config/NestedRepositoriesJavaConfigTests.java | 2 +- .../data/jpa/repository/config/QueryLookupStrategyTests.java | 2 +- .../data/jpa/repository/config/RepositoriesJavaConfigTests.java | 2 +- .../data/jpa/repository/config/RepositoryAutoConfigTests.java | 2 +- .../data/jpa/repository/config/RepositoryConfigTests.java | 2 +- .../data/jpa/repository/config/TypeFilterConfigTests.java | 2 +- .../data/jpa/repository/custom/CustomGenericJpaRepository.java | 2 +- .../repository/custom/CustomGenericJpaRepositoryFactory.java | 2 +- .../custom/CustomGenericJpaRepositoryFactoryBean.java | 2 +- .../data/jpa/repository/custom/CustomGenericRepository.java | 2 +- .../jpa/repository/custom/UserCustomExtendedRepository.java | 2 +- .../generics/EclipseLinkGenericsIntegrationTests.java | 2 +- .../data/jpa/repository/generics/GenericsIntegrationTests.java | 2 +- .../procedures/MySqlStoredProcedureIntegrationTests.java | 2 +- .../procedures/PostgresStoredProcedureIntegrationTests.java | 2 +- .../PostgresStoredProcedureNullHandlingIntegrationTests.java | 2 +- .../jpa/repository/procedures/StoredProcedureConfigSupport.java | 2 +- .../repository/projections/ProjectionJoinIntegrationTests.java | 2 +- .../jpa/repository/projections/ProjectionsIntegrationTests.java | 2 +- .../data/jpa/repository/query/AbstractJpaQueryTests.java | 2 +- .../query/AbstractStringBasedJpaQueryIntegrationTests.java | 2 +- .../repository/query/AbstractStringBasedJpaQueryUnitTests.java | 2 +- .../data/jpa/repository/query/CollectionUtilsUnitTests.java | 2 +- .../query/CustomNonBindableJpaParametersIntegrationTests.java | 2 +- .../jpa/repository/query/DefaultQueryEnhancerUnitTests.java | 2 +- .../data/jpa/repository/query/DefaultQueryUtilsUnitTests.java | 2 +- .../data/jpa/repository/query/EclipseLinkJpa21UtilsTests.java | 2 +- .../EclipseLinkMetaAnnotatedQueryMethodIntegrationTests.java | 2 +- .../EclipseLinkParameterMetadataProviderIntegrationTests.java | 2 +- .../repository/query/EclipseLinkQueryUtilsIntegrationTests.java | 2 +- .../data/jpa/repository/query/EqlComplianceTests.java | 2 +- .../jpa/repository/query/EqlParserQueryEnhancerUnitTests.java | 2 +- .../data/jpa/repository/query/EqlQueryRendererTests.java | 2 +- .../data/jpa/repository/query/EqlQueryTransformerTests.java | 2 +- .../data/jpa/repository/query/EqlSpecificationTests.java | 2 +- .../data/jpa/repository/query/EscapeCharacterUnitTests.java | 2 +- .../repository/query/ExpressionBasedStringQueryUnitTests.java | 2 +- .../jpa/repository/query/HqlParserQueryEnhancerUnitTests.java | 2 +- .../data/jpa/repository/query/HqlParserUnitTests.java | 2 +- .../data/jpa/repository/query/HqlQueryRendererTests.java | 2 +- .../data/jpa/repository/query/HqlQueryTransformerTests.java | 2 +- .../data/jpa/repository/query/HqlSpecificationTests.java | 2 +- .../jpa/repository/query/JSqlParserQueryEnhancerUnitTests.java | 2 +- .../data/jpa/repository/query/Jpa21UtilsTests.java | 2 +- .../data/jpa/repository/query/Jpa21UtilsUnitTests.java | 2 +- .../repository/query/JpaCountQueryCreatorIntegrationTests.java | 2 +- .../data/jpa/repository/query/JpaParametersUnitTests.java | 2 +- .../data/jpa/repository/query/JpaQueryExecutionUnitTests.java | 2 +- .../jpa/repository/query/JpaQueryLookupStrategyUnitTests.java | 2 +- .../data/jpa/repository/query/JpaQueryMethodUnitTests.java | 2 +- .../jpa/repository/query/JpaQueryRewriteIntegrationTests.java | 2 +- .../data/jpa/repository/query/JpqlComplianceTests.java | 2 +- .../jpa/repository/query/JpqlParserQueryEnhancerUnitTests.java | 2 +- .../data/jpa/repository/query/JpqlQueryRendererTests.java | 2 +- .../data/jpa/repository/query/JpqlQueryTransformerTests.java | 2 +- .../data/jpa/repository/query/JpqlSpecificationTests.java | 2 +- .../repository/query/KeysetScrollSpecificationUnitTests.java | 2 +- .../data/jpa/repository/query/LikeBindingUnitTests.java | 2 +- .../query/MetaAnnotatedQueryMethodIntegrationTests.java | 2 +- .../jpa/repository/query/MetaAnnotatedQueryMethodUnitTests.java | 2 +- .../query/NamedOrIndexedQueryParameterSetterUnitTests.java | 2 +- .../data/jpa/repository/query/NamedQueryUnitTests.java | 2 +- .../data/jpa/repository/query/NativeJpaQueryUnitTests.java | 2 +- .../data/jpa/repository/query/OpenJpaJpa21UtilsTests.java | 2 +- .../query/OpenJpaParameterMetadataProviderIntegrationTests.java | 2 +- .../jpa/repository/query/OpenJpaQueryUtilsIntegrationTests.java | 2 +- .../data/jpa/repository/query/ParameterBinderUnitTests.java | 2 +- .../jpa/repository/query/ParameterBindingParserUnitTests.java | 2 +- .../jpa/repository/query/ParameterExpressionProviderTests.java | 2 +- .../query/ParameterMetadataProviderIntegrationTests.java | 2 +- .../repository/query/ParameterMetadataProviderUnitTests.java | 2 +- .../jpa/repository/query/PartTreeJpaQueryIntegrationTests.java | 2 +- .../jpa/repository/query/QueryEnhancerFactoryUnitTests.java | 2 +- .../data/jpa/repository/query/QueryEnhancerTckTests.java | 2 +- .../data/jpa/repository/query/QueryEnhancerUnitTests.java | 2 +- .../repository/query/QueryParameterSetterFactoryUnitTests.java | 2 +- .../data/jpa/repository/query/QueryUtilsIntegrationTests.java | 2 +- .../data/jpa/repository/query/QueryUtilsUnitTests.java | 2 +- .../jpa/repository/query/QueryWithNullLikeIntegrationTests.java | 2 +- .../data/jpa/repository/query/SimpleJpaQueryUnitTests.java | 2 +- .../query/StoredProcedureAttributeSourceUnitTests.java | 2 +- .../repository/query/StoredProcedureAttributesUnitTests.java | 2 +- .../data/jpa/repository/query/StringQueryUnitTests.java | 2 +- .../data/jpa/repository/query/TupleConverterUnitTests.java | 2 +- .../jpa/repository/sample/AnnotatedAuditableUserRepository.java | 2 +- .../data/jpa/repository/sample/AuditableEntityRepository.java | 2 +- .../data/jpa/repository/sample/AuditableUserRepository.java | 2 +- .../data/jpa/repository/sample/BookRepository.java | 2 +- .../data/jpa/repository/sample/CategoryRepository.java | 2 +- .../data/jpa/repository/sample/ClassWithNestedRepository.java | 2 +- .../data/jpa/repository/sample/ConcreteRepository1.java | 2 +- .../data/jpa/repository/sample/ConcreteRepository2.java | 2 +- .../repository/sample/CustomAbstractPersistableRepository.java | 2 +- .../data/jpa/repository/sample/DummyRepository.java | 2 +- .../jpa/repository/sample/EmployeeRepositoryWithEmbeddedId.java | 2 +- .../jpa/repository/sample/EmployeeRepositoryWithIdClass.java | 2 +- .../jpa/repository/sample/EntityWithAssignedIdRepository.java | 2 +- .../data/jpa/repository/sample/ItemRepository.java | 2 +- .../data/jpa/repository/sample/ItemSiteRepository.java | 2 +- .../data/jpa/repository/sample/MailMessageRepository.java | 2 +- .../data/jpa/repository/sample/MappedTypeRepository.java | 2 +- .../springframework/data/jpa/repository/sample/NameOnlyDto.java | 2 +- .../data/jpa/repository/sample/NameOnlyRecord.java | 2 +- .../data/jpa/repository/sample/ParentRepository.java | 2 +- .../data/jpa/repository/sample/ProductRepository.java | 2 +- .../sample/RedeclaringRepositoryMethodsRepository.java | 2 +- .../RepositoryMethodsWithEntityGraphConfigRepository.java | 2 +- .../data/jpa/repository/sample/RoleRepository.java | 2 +- .../data/jpa/repository/sample/RoleRepositoryWithMeta.java | 2 +- .../data/jpa/repository/sample/SampleConfig.java | 2 +- .../jpa/repository/sample/SampleEvaluationContextExtension.java | 2 +- .../data/jpa/repository/sample/SiteRepository.java | 2 +- .../data/jpa/repository/sample/UserRepository.java | 2 +- .../data/jpa/repository/sample/UserRepositoryCustom.java | 2 +- .../data/jpa/repository/sample/UserRepositoryImpl.java | 2 +- .../CrudMethodMetadataPopulatingMethodInterceptorUnitTests.java | 2 +- .../repository/support/DefaultJpaContextIntegrationTests.java | 2 +- .../data/jpa/repository/support/DefaultJpaContextUnitTests.java | 2 +- .../repository/support/DefaultJpaEntityMetadataUnitTest.java | 2 +- .../data/jpa/repository/support/DefaultQueryHintsTest.java | 2 +- .../support/DefaultTransactionDisablingIntegrationTests.java | 2 +- ...clipseLinkJpaMetamodelEntityInformationIntegrationTests.java | 2 +- .../jpa/repository/support/EclipseLinkJpaRepositoryTests.java | 2 +- .../jpa/repository/support/EclipseLinkProxyIdAccessorTests.java | 2 +- .../jpa/repository/support/EntityGraphFactoryUnitTests.java | 2 +- ...gerBeanDefinitionRegistrarPostProcessorIntegrationTests.java | 2 +- ...ityManagerBeanDefinitionRegistrarPostProcessorUnitTests.java | 2 +- .../jpa/repository/support/EntityManagerFactoryRefTests.java | 2 +- .../repository/support/EntityManagerFactoryRefUnitTests.java | 2 +- .../support/FetchableFluentQueryByPredicateUnitTests.java | 2 +- .../HibernateJpaMetamodelEntityInformationIntegrationTests.java | 2 +- .../JavaConfigDefaultTransactionDisablingIntegrationTests.java | 2 +- .../support/JpaEntityInformationSupportUnitTests.java | 2 +- .../support/JpaMetamodelEntityInformationIntegrationTests.java | 2 +- .../support/JpaMetamodelEntityInformationUnitTests.java | 2 +- .../support/JpaPersistableEntityInformationUnitTests.java | 2 +- ...RepositoryFactoryBeanEntityPathResolverIntegrationTests.java | 2 +- .../repository/support/JpaRepositoryFactoryBeanUnitTests.java | 2 +- .../jpa/repository/support/JpaRepositoryFactoryUnitTests.java | 2 +- .../data/jpa/repository/support/JpaRepositoryTests.java | 2 +- .../support/MailMessageRepositoryIntegrationTests.java | 2 +- .../data/jpa/repository/support/MutableQueryHintsUnitTests.java | 2 +- .../data/jpa/repository/support/OpenJpaJpaRepositoryTests.java | 2 +- .../OpenJpaMetamodelEntityInformationIntegrationTests.java | 2 +- .../jpa/repository/support/OpenJpaProxyIdAccessorTests.java | 2 +- .../support/QSimpleEntityPathResolverUnitTests_Sample.java | 2 +- .../data/jpa/repository/support/QuerydslIntegrationTests.java | 2 +- .../support/QuerydslJpaPredicateExecutorUnitTests.java | 2 +- .../data/jpa/repository/support/QuerydslJpaRepositoryTests.java | 2 +- .../support/QuerydslRepositorySupportIntegrationTests.java | 2 +- .../jpa/repository/support/QuerydslRepositorySupportTests.java | 2 +- .../jpa/repository/support/SimpleJpaRepositoryUnitTests.java | 2 +- .../jpa/repository/support/TransactionalRepositoryTests.java | 2 +- .../XmlConfigDefaultTransactionDisablingIntegrationTests.java | 2 +- .../ClasspathScanningPersistenceUnitPostProcessorUnitTests.java | 2 +- .../data/jpa/support/EntityManagerTestUtils.java | 2 +- .../jpa/support/MergingPersistenceUnitManagerUnitTests.java | 2 +- .../data/jpa/support/ProxyImageNameSubstitutor.java | 2 +- .../data/jpa/util/BooleanExecutionCondition.java | 2 +- .../org/springframework/data/jpa/util/ClassPathExclusions.java | 2 +- .../data/jpa/util/ClassPathExclusionsExtension.java | 2 +- .../org/springframework/data/jpa/util/DisabledOnHibernate.java | 2 +- .../data/jpa/util/DisabledOnHibernateCondition.java | 2 +- .../data/jpa/util/DisabledOnHibernateConditionTests.java | 2 +- .../test/java/org/springframework/data/jpa/util/FixedDate.java | 2 +- .../org/springframework/data/jpa/util/HidingClassLoader.java | 2 +- .../data/jpa/util/JpaMetamodelCacheCleanupIntegrationTests.java | 2 +- .../springframework/data/jpa/util/JpaMetamodelUnitTests.java | 2 +- .../data/jpa/util/PackageExcludingClassLoader.java | 2 +- src/main/antora/modules/ROOT/pages/index.adoc | 2 +- 510 files changed, 510 insertions(+), 510 deletions(-) diff --git a/spring-data-envers/src/main/java/org/springframework/data/envers/repository/config/EnableEnversRepositories.java b/spring-data-envers/src/main/java/org/springframework/data/envers/repository/config/EnableEnversRepositories.java index 7ec6ec4b70..feb8782229 100644 --- a/spring-data-envers/src/main/java/org/springframework/data/envers/repository/config/EnableEnversRepositories.java +++ b/spring-data-envers/src/main/java/org/springframework/data/envers/repository/config/EnableEnversRepositories.java @@ -1,5 +1,5 @@ /* - * Copyright 2021-2024 the original author or authors. + * Copyright 2021-2025 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. diff --git a/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/DefaultRevisionEntityInformation.java b/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/DefaultRevisionEntityInformation.java index cf461e8d9f..d8b96b28d9 100644 --- a/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/DefaultRevisionEntityInformation.java +++ b/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/DefaultRevisionEntityInformation.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. diff --git a/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/DefaultRevisionMetadata.java b/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/DefaultRevisionMetadata.java index 6b92607b1f..5c7672d10d 100755 --- a/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/DefaultRevisionMetadata.java +++ b/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/DefaultRevisionMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. diff --git a/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepository.java b/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepository.java index 2d0ba8bea5..f1483304f3 100644 --- a/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepository.java +++ b/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. diff --git a/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryFactoryBean.java b/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryFactoryBean.java index dd7a6b4768..9f40559ca4 100755 --- a/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryFactoryBean.java +++ b/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryFactoryBean.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. diff --git a/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryImpl.java b/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryImpl.java index 7a6c1b62a3..71e5c48cc3 100755 --- a/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryImpl.java +++ b/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. diff --git a/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/ReflectionRevisionEntityInformation.java b/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/ReflectionRevisionEntityInformation.java index ea629fcdbe..631dbca9f8 100644 --- a/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/ReflectionRevisionEntityInformation.java +++ b/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/ReflectionRevisionEntityInformation.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. diff --git a/spring-data-envers/src/test/java/org/springframework/data/envers/Config.java b/spring-data-envers/src/test/java/org/springframework/data/envers/Config.java index 5f636e65e5..c8c1aa963e 100755 --- a/spring-data-envers/src/test/java/org/springframework/data/envers/Config.java +++ b/spring-data-envers/src/test/java/org/springframework/data/envers/Config.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. diff --git a/spring-data-envers/src/test/java/org/springframework/data/envers/repository/support/DefaultRevisionMetadataUnitTests.java b/spring-data-envers/src/test/java/org/springframework/data/envers/repository/support/DefaultRevisionMetadataUnitTests.java index 930b20be20..f5e50b0dcc 100644 --- a/spring-data-envers/src/test/java/org/springframework/data/envers/repository/support/DefaultRevisionMetadataUnitTests.java +++ b/spring-data-envers/src/test/java/org/springframework/data/envers/repository/support/DefaultRevisionMetadataUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. diff --git a/spring-data-envers/src/test/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryImplUnitTests.java b/spring-data-envers/src/test/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryImplUnitTests.java index 81db782d28..625e099d5a 100644 --- a/spring-data-envers/src/test/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryImplUnitTests.java +++ b/spring-data-envers/src/test/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryImplUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2020-2024 the original author or authors. + * Copyright 2020-2025 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. diff --git a/spring-data-envers/src/test/java/org/springframework/data/envers/repository/support/QueryDslRepositoryIntegrationTests.java b/spring-data-envers/src/test/java/org/springframework/data/envers/repository/support/QueryDslRepositoryIntegrationTests.java index 7aed270c92..7009f219e5 100755 --- a/spring-data-envers/src/test/java/org/springframework/data/envers/repository/support/QueryDslRepositoryIntegrationTests.java +++ b/spring-data-envers/src/test/java/org/springframework/data/envers/repository/support/QueryDslRepositoryIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2024 the original author or authors. + * Copyright 2018-2025 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. diff --git a/spring-data-envers/src/test/java/org/springframework/data/envers/repository/support/RepositoryIntegrationTests.java b/spring-data-envers/src/test/java/org/springframework/data/envers/repository/support/RepositoryIntegrationTests.java index 1a4ce785ea..43f159b633 100755 --- a/spring-data-envers/src/test/java/org/springframework/data/envers/repository/support/RepositoryIntegrationTests.java +++ b/spring-data-envers/src/test/java/org/springframework/data/envers/repository/support/RepositoryIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. diff --git a/spring-data-envers/src/test/java/org/springframework/data/envers/sample/AbstractEntity.java b/spring-data-envers/src/test/java/org/springframework/data/envers/sample/AbstractEntity.java index 29cc905a15..1120fded1b 100644 --- a/spring-data-envers/src/test/java/org/springframework/data/envers/sample/AbstractEntity.java +++ b/spring-data-envers/src/test/java/org/springframework/data/envers/sample/AbstractEntity.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. diff --git a/spring-data-envers/src/test/java/org/springframework/data/envers/sample/Country.java b/spring-data-envers/src/test/java/org/springframework/data/envers/sample/Country.java index 67a2fed9d4..5973ecaa78 100755 --- a/spring-data-envers/src/test/java/org/springframework/data/envers/sample/Country.java +++ b/spring-data-envers/src/test/java/org/springframework/data/envers/sample/Country.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. diff --git a/spring-data-envers/src/test/java/org/springframework/data/envers/sample/CountryQueryDslRepository.java b/spring-data-envers/src/test/java/org/springframework/data/envers/sample/CountryQueryDslRepository.java index 741b2c117f..b7bc3e1c5a 100755 --- a/spring-data-envers/src/test/java/org/springframework/data/envers/sample/CountryQueryDslRepository.java +++ b/spring-data-envers/src/test/java/org/springframework/data/envers/sample/CountryQueryDslRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2024 the original author or authors. + * Copyright 2015-2025 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. diff --git a/spring-data-envers/src/test/java/org/springframework/data/envers/sample/CountryRepository.java b/spring-data-envers/src/test/java/org/springframework/data/envers/sample/CountryRepository.java index 046de77f23..4f5cc1f2f5 100755 --- a/spring-data-envers/src/test/java/org/springframework/data/envers/sample/CountryRepository.java +++ b/spring-data-envers/src/test/java/org/springframework/data/envers/sample/CountryRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. diff --git a/spring-data-envers/src/test/java/org/springframework/data/envers/sample/CustomRevisionEntity.java b/spring-data-envers/src/test/java/org/springframework/data/envers/sample/CustomRevisionEntity.java index be2dfd0fe3..d69410894d 100644 --- a/spring-data-envers/src/test/java/org/springframework/data/envers/sample/CustomRevisionEntity.java +++ b/spring-data-envers/src/test/java/org/springframework/data/envers/sample/CustomRevisionEntity.java @@ -1,5 +1,5 @@ /* - * Copyright 2021-2024 the original author or authors. + * Copyright 2021-2025 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. diff --git a/spring-data-envers/src/test/java/org/springframework/data/envers/sample/CustomRevisionListener.java b/spring-data-envers/src/test/java/org/springframework/data/envers/sample/CustomRevisionListener.java index 3bda04361d..80b45588db 100644 --- a/spring-data-envers/src/test/java/org/springframework/data/envers/sample/CustomRevisionListener.java +++ b/spring-data-envers/src/test/java/org/springframework/data/envers/sample/CustomRevisionListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2021-2024 the original author or authors. + * Copyright 2021-2025 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. diff --git a/spring-data-envers/src/test/java/org/springframework/data/envers/sample/License.java b/spring-data-envers/src/test/java/org/springframework/data/envers/sample/License.java index b6542eaa48..9ba1070f0a 100755 --- a/spring-data-envers/src/test/java/org/springframework/data/envers/sample/License.java +++ b/spring-data-envers/src/test/java/org/springframework/data/envers/sample/License.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. diff --git a/spring-data-envers/src/test/java/org/springframework/data/envers/sample/LicenseRepository.java b/spring-data-envers/src/test/java/org/springframework/data/envers/sample/LicenseRepository.java index 87b38d5b88..2d6b7737df 100755 --- a/spring-data-envers/src/test/java/org/springframework/data/envers/sample/LicenseRepository.java +++ b/spring-data-envers/src/test/java/org/springframework/data/envers/sample/LicenseRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. diff --git a/spring-data-envers/src/test/java/org/springframework/data/envers/sample/QCountry.java b/spring-data-envers/src/test/java/org/springframework/data/envers/sample/QCountry.java index 66a3d509b9..4d1f03c430 100755 --- a/spring-data-envers/src/test/java/org/springframework/data/envers/sample/QCountry.java +++ b/spring-data-envers/src/test/java/org/springframework/data/envers/sample/QCountry.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2024 the original author or authors. + * Copyright 2015-2025 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. diff --git a/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/RepositoryFinderBenchmarks.java b/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/RepositoryFinderBenchmarks.java index 05f66f1203..209dc55318 100644 --- a/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/RepositoryFinderBenchmarks.java +++ b/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/RepositoryFinderBenchmarks.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 the original author or authors. + * Copyright 2024-2025 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. diff --git a/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/model/IPersonProjection.java b/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/model/IPersonProjection.java index 6934c0ae67..442385ca32 100644 --- a/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/model/IPersonProjection.java +++ b/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/model/IPersonProjection.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 the original author or authors. + * Copyright 2024-2025 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. diff --git a/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/model/Person.java b/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/model/Person.java index 3996c0b611..aa830371aa 100644 --- a/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/model/Person.java +++ b/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/model/Person.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 the original author or authors. + * Copyright 2024-2025 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. diff --git a/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/model/Profile.java b/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/model/Profile.java index 816554553e..acd3f39b97 100644 --- a/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/model/Profile.java +++ b/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/model/Profile.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 the original author or authors. + * Copyright 2024-2025 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. diff --git a/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/repository/PersonRepository.java b/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/repository/PersonRepository.java index 3ba5fc00c9..491ab736a8 100644 --- a/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/repository/PersonRepository.java +++ b/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/repository/PersonRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 the original author or authors. + * Copyright 2024-2025 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. diff --git a/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/repository/query/HqlParserBenchmarks.java b/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/repository/query/HqlParserBenchmarks.java index 482c4454fa..fd46a3f6c2 100644 --- a/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/repository/query/HqlParserBenchmarks.java +++ b/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/repository/query/HqlParserBenchmarks.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 the original author or authors. + * Copyright 2024-2025 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. diff --git a/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/repository/query/JSqlParserQueryEnhancerBenchmarks.java b/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/repository/query/JSqlParserQueryEnhancerBenchmarks.java index 724a417353..845282e319 100644 --- a/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/repository/query/JSqlParserQueryEnhancerBenchmarks.java +++ b/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/repository/query/JSqlParserQueryEnhancerBenchmarks.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 the original author or authors. + * Copyright 2024-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/convert/QueryByExamplePredicateBuilder.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/convert/QueryByExamplePredicateBuilder.java index e24aeded0e..993f42f3b2 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/convert/QueryByExamplePredicateBuilder.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/convert/QueryByExamplePredicateBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2024 the original author or authors. + * Copyright 2016-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/convert/threeten/Jsr310JpaConverters.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/convert/threeten/Jsr310JpaConverters.java index 8f19eb580f..87aeb9353e 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/convert/threeten/Jsr310JpaConverters.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/convert/threeten/Jsr310JpaConverters.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/AbstractAuditable.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/AbstractAuditable.java index 6cc365619f..c2653a2e89 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/AbstractAuditable.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/AbstractAuditable.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/AbstractPersistable.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/AbstractPersistable.java index 63fa8307e6..245418357d 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/AbstractPersistable.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/AbstractPersistable.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/JpaSort.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/JpaSort.java index a28bf8a390..f930564173 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/JpaSort.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/JpaSort.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/Specification.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/Specification.java index 32c84faae9..ea626af591 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/Specification.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/Specification.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/SpecificationComposition.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/SpecificationComposition.java index 9b0654bd76..ad78749e39 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/SpecificationComposition.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/SpecificationComposition.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2024 the original author or authors. + * Copyright 2018-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/support/AuditingBeanFactoryPostProcessor.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/support/AuditingBeanFactoryPostProcessor.java index 4d77cb4070..1b669e0854 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/support/AuditingBeanFactoryPostProcessor.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/support/AuditingBeanFactoryPostProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/support/AuditingEntityListener.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/support/AuditingEntityListener.java index 84de19a961..9dc73af957 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/support/AuditingEntityListener.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/support/AuditingEntityListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/mapping/JpaMetamodelMappingContext.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/mapping/JpaMetamodelMappingContext.java index ee663c687a..bc5a71c25c 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/mapping/JpaMetamodelMappingContext.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/mapping/JpaMetamodelMappingContext.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/mapping/JpaPersistentEntity.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/mapping/JpaPersistentEntity.java index daf8c5ab74..90ca19aa71 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/mapping/JpaPersistentEntity.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/mapping/JpaPersistentEntity.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/mapping/JpaPersistentEntityImpl.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/mapping/JpaPersistentEntityImpl.java index fa8eebd38d..761a1600d0 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/mapping/JpaPersistentEntityImpl.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/mapping/JpaPersistentEntityImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/mapping/JpaPersistentProperty.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/mapping/JpaPersistentProperty.java index 111e4cc0b6..63a9cf3515 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/mapping/JpaPersistentProperty.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/mapping/JpaPersistentProperty.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/mapping/JpaPersistentPropertyImpl.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/mapping/JpaPersistentPropertyImpl.java index 501d3a6444..da773247e1 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/mapping/JpaPersistentPropertyImpl.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/mapping/JpaPersistentPropertyImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/projection/CollectionAwareProjectionFactory.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/projection/CollectionAwareProjectionFactory.java index eea31872ff..9b602fc65b 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/projection/CollectionAwareProjectionFactory.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/projection/CollectionAwareProjectionFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2024 the original author or authors. + * Copyright 2017-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/provider/HibernateUtils.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/provider/HibernateUtils.java index f99e6fdb0e..862cb5a1fb 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/provider/HibernateUtils.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/provider/HibernateUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2024 the original author or authors. + * Copyright 2016-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/provider/JpaClassUtils.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/provider/JpaClassUtils.java index c0e3324659..f00f4b849d 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/provider/JpaClassUtils.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/provider/JpaClassUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/provider/PersistenceProvider.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/provider/PersistenceProvider.java index 84ca80baeb..2b5e0abbeb 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/provider/PersistenceProvider.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/provider/PersistenceProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/provider/ProxyIdAccessor.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/provider/ProxyIdAccessor.java index 3d1dcdb86d..d999d7490b 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/provider/ProxyIdAccessor.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/provider/ProxyIdAccessor.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/provider/QueryComment.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/provider/QueryComment.java index 8fdabf0959..aa39144da4 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/provider/QueryComment.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/provider/QueryComment.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/provider/QueryExtractor.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/provider/QueryExtractor.java index 2d84633bf1..6bd6f4bace 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/provider/QueryExtractor.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/provider/QueryExtractor.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/EntityGraph.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/EntityGraph.java index 0a40faa247..a6fd6367c4 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/EntityGraph.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/EntityGraph.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/JpaContext.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/JpaContext.java index 3b889e30ac..13eff2d386 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/JpaContext.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/JpaContext.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2024 the original author or authors. + * Copyright 2015-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/JpaRepository.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/JpaRepository.java index 6be4294d94..a3541460f9 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/JpaRepository.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/JpaRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/JpaSpecificationExecutor.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/JpaSpecificationExecutor.java index 0d38cc580d..3abd83b2bf 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/JpaSpecificationExecutor.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/JpaSpecificationExecutor.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/Lock.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/Lock.java index 219756b6ef..a8d1fc7775 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/Lock.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/Lock.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/Meta.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/Meta.java index 55225de082..2ba8a0a9ea 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/Meta.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/Meta.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/Modifying.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/Modifying.java index 48ef4ce55b..612bb4092a 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/Modifying.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/Modifying.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/NativeQuery.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/NativeQuery.java index 47ed58c61a..d10c90b68c 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/NativeQuery.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/NativeQuery.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 the original author or authors. + * Copyright 2024-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/Query.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/Query.java index e43157b40e..12ff41bb71 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/Query.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/Query.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/QueryHints.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/QueryHints.java index 86b482db80..996b8a2933 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/QueryHints.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/QueryHints.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/QueryRewriter.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/QueryRewriter.java index d55d9a31a6..d34101046f 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/QueryRewriter.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/QueryRewriter.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/Temporal.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/Temporal.java index 7668ccd33f..e7492ab305 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/Temporal.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/Temporal.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/aot/JpaRuntimeHints.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/aot/JpaRuntimeHints.java index 276bcbdfd8..80b67fd896 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/aot/JpaRuntimeHints.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/aot/JpaRuntimeHints.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/cdi/BeanManagerQueryRewriterProvider.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/cdi/BeanManagerQueryRewriterProvider.java index e1ef5f475c..4aa304ec04 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/cdi/BeanManagerQueryRewriterProvider.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/cdi/BeanManagerQueryRewriterProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/cdi/JpaRepositoryBean.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/cdi/JpaRepositoryBean.java index e0bcb27c97..8cb39d7d49 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/cdi/JpaRepositoryBean.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/cdi/JpaRepositoryBean.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/cdi/JpaRepositoryExtension.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/cdi/JpaRepositoryExtension.java index 8b8088c0c9..a10d005a1b 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/cdi/JpaRepositoryExtension.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/cdi/JpaRepositoryExtension.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/AuditingBeanDefinitionParser.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/AuditingBeanDefinitionParser.java index b7a90e128e..8625119632 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/AuditingBeanDefinitionParser.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/AuditingBeanDefinitionParser.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/BeanDefinitionNames.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/BeanDefinitionNames.java index 2304e4b239..55cd78b091 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/BeanDefinitionNames.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/BeanDefinitionNames.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/EnableJpaAuditing.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/EnableJpaAuditing.java index 48304dbac1..6a6577fbbc 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/EnableJpaAuditing.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/EnableJpaAuditing.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/EnableJpaRepositories.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/EnableJpaRepositories.java index 87bb9d5551..3ff333ea7c 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/EnableJpaRepositories.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/EnableJpaRepositories.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/InspectionClassLoader.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/InspectionClassLoader.java index 7611ba3986..a95eb1db86 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/InspectionClassLoader.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/InspectionClassLoader.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2024 the original author or authors. + * Copyright 2018-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/JpaAuditingRegistrar.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/JpaAuditingRegistrar.java index bafc70f0aa..88e4dbbd0c 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/JpaAuditingRegistrar.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/JpaAuditingRegistrar.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/JpaMetamodelMappingContextFactoryBean.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/JpaMetamodelMappingContextFactoryBean.java index b0a7851d42..2bd8cd5ec8 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/JpaMetamodelMappingContextFactoryBean.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/JpaMetamodelMappingContextFactoryBean.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2024 the original author or authors. + * Copyright 2017-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/JpaRepositoriesRegistrar.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/JpaRepositoriesRegistrar.java index 9e8d640da9..6c6e803576 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/JpaRepositoriesRegistrar.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/JpaRepositoriesRegistrar.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/JpaRepositoryConfigExtension.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/JpaRepositoryConfigExtension.java index 7010542f45..1bcf8073a8 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/JpaRepositoryConfigExtension.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/JpaRepositoryConfigExtension.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/JpaRepositoryNameSpaceHandler.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/JpaRepositoryNameSpaceHandler.java index a0de895722..951e4132cd 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/JpaRepositoryNameSpaceHandler.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/JpaRepositoryNameSpaceHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/AbstractJpaQuery.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/AbstractJpaQuery.java index bbde6d9414..2696ef4cc5 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/AbstractJpaQuery.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/AbstractJpaQuery.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/AbstractStringBasedJpaQuery.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/AbstractStringBasedJpaQuery.java index 0d257fe5a2..c101aa7454 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/AbstractStringBasedJpaQuery.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/AbstractStringBasedJpaQuery.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/BadJpqlGrammarErrorListener.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/BadJpqlGrammarErrorListener.java index b629bd6179..66b64a0314 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/BadJpqlGrammarErrorListener.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/BadJpqlGrammarErrorListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/BadJpqlGrammarException.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/BadJpqlGrammarException.java index 56dae97430..6cc24630ef 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/BadJpqlGrammarException.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/BadJpqlGrammarException.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/BeanFactoryQueryRewriterProvider.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/BeanFactoryQueryRewriterProvider.java index 552cca806c..ee50c94696 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/BeanFactoryQueryRewriterProvider.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/BeanFactoryQueryRewriterProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/CollectionUtils.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/CollectionUtils.java index 632125c566..6352836f98 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/CollectionUtils.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/CollectionUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2024 the original author or authors. + * Copyright 2023-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/DeclaredQuery.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/DeclaredQuery.java index 4e54424404..70bc5c829b 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/DeclaredQuery.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/DeclaredQuery.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2024 the original author or authors. + * Copyright 2018-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/DefaultJpaEntityMetadata.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/DefaultJpaEntityMetadata.java index 78105e7eb0..daa30cbb87 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/DefaultJpaEntityMetadata.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/DefaultJpaEntityMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/DefaultJpaQueryMethodFactory.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/DefaultJpaQueryMethodFactory.java index 03bcb52b83..80539f2fac 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/DefaultJpaQueryMethodFactory.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/DefaultJpaQueryMethodFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2024 the original author or authors. + * Copyright 2019-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/DefaultQueryEnhancer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/DefaultQueryEnhancer.java index d8c5bb4a50..2abd312a91 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/DefaultQueryEnhancer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/DefaultQueryEnhancer.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/DelegatingQueryRewriter.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/DelegatingQueryRewriter.java index e171a49413..8cba903a94 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/DelegatingQueryRewriter.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/DelegatingQueryRewriter.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EmptyDeclaredQuery.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EmptyDeclaredQuery.java index 67f9f9b3e6..850c0919a3 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EmptyDeclaredQuery.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EmptyDeclaredQuery.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2024 the original author or authors. + * Copyright 2018-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EmptyQueryTokenStream.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EmptyQueryTokenStream.java index dd1dd6dc82..db498281fc 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EmptyQueryTokenStream.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EmptyQueryTokenStream.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 the original author or authors. + * Copyright 2024-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlCountQueryTransformer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlCountQueryTransformer.java index aec9763fa0..498a499ad8 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlCountQueryTransformer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlCountQueryTransformer.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2024 the original author or authors. + * Copyright 2023-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlQueryIntrospector.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlQueryIntrospector.java index 9a678b4511..d9a558540c 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlQueryIntrospector.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlQueryIntrospector.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 the original author or authors. + * Copyright 2024-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlQueryRenderer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlQueryRenderer.java index 17e6e51a55..ce5d2fb1c6 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlQueryRenderer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlQueryRenderer.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2024 the original author or authors. + * Copyright 2023-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlSortedQueryTransformer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlSortedQueryTransformer.java index ed14e9afdf..1bd0635150 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlSortedQueryTransformer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlSortedQueryTransformer.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2024 the original author or authors. + * Copyright 2023-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EscapeCharacter.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EscapeCharacter.java index b9897832f6..d73680ff62 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EscapeCharacter.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EscapeCharacter.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2024 the original author or authors. + * Copyright 2019-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ExpressionBasedStringQuery.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ExpressionBasedStringQuery.java index 8066504ca3..3007f494ca 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ExpressionBasedStringQuery.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ExpressionBasedStringQuery.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HibernateJpaParametersParameterAccessor.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HibernateJpaParametersParameterAccessor.java index 53291a0ea0..37b06f0744 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HibernateJpaParametersParameterAccessor.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HibernateJpaParametersParameterAccessor.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlCountQueryTransformer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlCountQueryTransformer.java index 735bdae29c..31a2dd7808 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlCountQueryTransformer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlCountQueryTransformer.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryIntrospector.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryIntrospector.java index 259556e542..ebec68efb2 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryIntrospector.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryIntrospector.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 the original author or authors. + * Copyright 2024-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryRenderer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryRenderer.java index 311fdce1d3..ee47787b0d 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryRenderer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryRenderer.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlSortedQueryTransformer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlSortedQueryTransformer.java index b6b8853f93..718a813d38 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlSortedQueryTransformer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlSortedQueryTransformer.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/InvalidJpaQueryMethodException.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/InvalidJpaQueryMethodException.java index 5662d7d091..14cdf678d1 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/InvalidJpaQueryMethodException.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/InvalidJpaQueryMethodException.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JSqlParserQueryEnhancer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JSqlParserQueryEnhancer.java index 1686148603..08defcb9f3 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JSqlParserQueryEnhancer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JSqlParserQueryEnhancer.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JSqlParserUtils.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JSqlParserUtils.java index 5b5cdeb9dd..7c557b5c22 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JSqlParserUtils.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JSqlParserUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/Jpa21Utils.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/Jpa21Utils.java index 8605786fc3..4530aac26b 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/Jpa21Utils.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/Jpa21Utils.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaCountQueryCreator.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaCountQueryCreator.java index 851a867214..60c4f072ab 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaCountQueryCreator.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaCountQueryCreator.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaEntityGraph.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaEntityGraph.java index 32d86e503d..521532b6ff 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaEntityGraph.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaEntityGraph.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaEntityMetadata.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaEntityMetadata.java index 3652a84551..f7cc6cc9a0 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaEntityMetadata.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaEntityMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaKeysetScrollQueryCreator.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaKeysetScrollQueryCreator.java index 25e7c25ca9..46908bdd2f 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaKeysetScrollQueryCreator.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaKeysetScrollQueryCreator.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2024 the original author or authors. + * Copyright 2023-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaParameters.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaParameters.java index 220a285d8f..b3fc5526f5 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaParameters.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaParameters.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaParametersParameterAccessor.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaParametersParameterAccessor.java index 6d760d5a3a..e222439a22 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaParametersParameterAccessor.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaParametersParameterAccessor.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2024 the original author or authors. + * Copyright 2017-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryCreator.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryCreator.java index 255ac86dc3..d86880372b 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryCreator.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryCreator.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryEnhancer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryEnhancer.java index c677b2efcc..9719cbc6ae 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryEnhancer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryEnhancer.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryExecution.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryExecution.java index 82482cd99c..35a680c8fe 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryExecution.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryExecution.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryFactory.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryFactory.java index a998e1a086..82babfb9e4 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryFactory.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryLookupStrategy.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryLookupStrategy.java index 136a16b271..d8daf8a6a4 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryLookupStrategy.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryLookupStrategy.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryMethod.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryMethod.java index ab2cd777ef..97b6390d22 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryMethod.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryMethod.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryMethodFactory.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryMethodFactory.java index 24326fe0ae..a5b5213127 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryMethodFactory.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryMethodFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaResultConverters.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaResultConverters.java index 03c9d82adb..06382e5e9b 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaResultConverters.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaResultConverters.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpqlCountQueryTransformer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpqlCountQueryTransformer.java index 2adac83e9b..e83059b1c6 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpqlCountQueryTransformer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpqlCountQueryTransformer.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpqlQueryIntrospector.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpqlQueryIntrospector.java index 20551ff366..52162e791c 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpqlQueryIntrospector.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpqlQueryIntrospector.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 the original author or authors. + * Copyright 2024-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpqlQueryRenderer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpqlQueryRenderer.java index f743d50669..105ef169b7 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpqlQueryRenderer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpqlQueryRenderer.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpqlSortedQueryTransformer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpqlSortedQueryTransformer.java index a545171bbf..2b65552fd1 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpqlSortedQueryTransformer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpqlSortedQueryTransformer.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/KeysetScrollDelegate.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/KeysetScrollDelegate.java index 2942fa0bce..7fb9f3659c 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/KeysetScrollDelegate.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/KeysetScrollDelegate.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2024 the original author or authors. + * Copyright 2023-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/KeysetScrollSpecification.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/KeysetScrollSpecification.java index 6047c164ca..40aa051983 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/KeysetScrollSpecification.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/KeysetScrollSpecification.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2024 the original author or authors. + * Copyright 2023-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/Meta.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/Meta.java index 79b6d7e0bd..53790bcf4f 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/Meta.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/Meta.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/NamedQuery.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/NamedQuery.java index bfa635b413..1e4c5fb8f4 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/NamedQuery.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/NamedQuery.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/NativeJpaQuery.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/NativeJpaQuery.java index c664af9f11..9221cc3807 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/NativeJpaQuery.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/NativeJpaQuery.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ParameterBinder.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ParameterBinder.java index 78fc9531ee..7a49f584a1 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ParameterBinder.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ParameterBinder.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ParameterBinderFactory.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ParameterBinderFactory.java index e5122e93d3..21a715e07f 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ParameterBinderFactory.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ParameterBinderFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2024 the original author or authors. + * Copyright 2017-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ParameterBinding.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ParameterBinding.java index 493f474f6f..65fa814d42 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ParameterBinding.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ParameterBinding.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2024 the original author or authors. + * Copyright 2023-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ParameterMetadataProvider.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ParameterMetadataProvider.java index 213e641a5c..b99f1b93f9 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ParameterMetadataProvider.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ParameterMetadataProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ParsedQueryIntrospector.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ParsedQueryIntrospector.java index fc34eb9b6f..cab53a6e9f 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ParsedQueryIntrospector.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ParsedQueryIntrospector.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 the original author or authors. + * Copyright 2024-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/PartTreeJpaQuery.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/PartTreeJpaQuery.java index 1d0923f26d..a1246ac056 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/PartTreeJpaQuery.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/PartTreeJpaQuery.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/Procedure.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/Procedure.java index 6e6a825259..9ebbe5f2a8 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/Procedure.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/Procedure.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ProcedureParameter.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ProcedureParameter.java index e86a59151a..0cef0b0a0f 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ProcedureParameter.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ProcedureParameter.java @@ -1,5 +1,5 @@ /* - * Copyright 2021-2024 the original author or authors. + * Copyright 2021-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryEnhancer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryEnhancer.java index 55c168a4f5..1367fa6cad 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryEnhancer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryEnhancer.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryEnhancerFactory.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryEnhancerFactory.java index c40ab11f66..5a2853cb1a 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryEnhancerFactory.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryEnhancerFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryParameterSetter.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryParameterSetter.java index a05a34052b..727f61cc81 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryParameterSetter.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryParameterSetter.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2024 the original author or authors. + * Copyright 2017-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryParameterSetterFactory.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryParameterSetterFactory.java index 38247f92db..cd6ff2d62c 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryParameterSetterFactory.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryParameterSetterFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2024 the original author or authors. + * Copyright 2017-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryRenderer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryRenderer.java index 87fe53e050..3039ef735a 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryRenderer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryRenderer.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 the original author or authors. + * Copyright 2024-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryRewriterProvider.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryRewriterProvider.java index b3abe97552..85e6d34aa2 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryRewriterProvider.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryRewriterProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryToken.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryToken.java index 9b3c798f15..ac67b8bf0d 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryToken.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryToken.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 the original author or authors. + * Copyright 2024-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryTokenStream.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryTokenStream.java index 233711d797..c91fddb0e4 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryTokenStream.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryTokenStream.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 the original author or authors. + * Copyright 2024-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryTokens.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryTokens.java index 80df0b3300..7ce75f78d2 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryTokens.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryTokens.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 the original author or authors. + * Copyright 2024-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryTransformers.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryTransformers.java index 46bdc36003..bcc939f4d8 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryTransformers.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryTransformers.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 the original author or authors. + * Copyright 2024-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryUtils.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryUtils.java index 3c06c7079b..73b34bffd2 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryUtils.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ScrollDelegate.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ScrollDelegate.java index 359dfb6ea2..7fbe146bb4 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ScrollDelegate.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ScrollDelegate.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2024 the original author or authors. + * Copyright 2023-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/SimpleJpaQuery.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/SimpleJpaQuery.java index 16fa3c30e0..c9a80e4a38 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/SimpleJpaQuery.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/SimpleJpaQuery.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/StoredProcedureAttributeSource.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/StoredProcedureAttributeSource.java index 770c946f64..2616c3d796 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/StoredProcedureAttributeSource.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/StoredProcedureAttributeSource.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/StoredProcedureAttributes.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/StoredProcedureAttributes.java index 2acc5f83c1..e7ef76a3eb 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/StoredProcedureAttributes.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/StoredProcedureAttributes.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/StoredProcedureJpaQuery.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/StoredProcedureJpaQuery.java index 54d6b0b24a..8ff29f4ba2 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/StoredProcedureJpaQuery.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/StoredProcedureJpaQuery.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/StringQuery.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/StringQuery.java index 471ede0403..0424d5ff60 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/StringQuery.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/StringQuery.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/CrudMethodMetadata.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/CrudMethodMetadata.java index ae738974b1..4b0b7bacaf 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/CrudMethodMetadata.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/CrudMethodMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/CrudMethodMetadataPostProcessor.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/CrudMethodMetadataPostProcessor.java index 246e82dcd6..135d3c6e44 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/CrudMethodMetadataPostProcessor.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/CrudMethodMetadataPostProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/DefaultJpaContext.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/DefaultJpaContext.java index e6e51b991d..220ac48587 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/DefaultJpaContext.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/DefaultJpaContext.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2024 the original author or authors. + * Copyright 2015-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/DefaultQueryHints.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/DefaultQueryHints.java index f5ff87be63..228251d4f2 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/DefaultQueryHints.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/DefaultQueryHints.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2024 the original author or authors. + * Copyright 2017-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/EntityGraphFactory.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/EntityGraphFactory.java index 97bf993818..5308fa64b8 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/EntityGraphFactory.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/EntityGraphFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2021-2024 the original author or authors. + * Copyright 2021-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/EntityManagerBeanDefinitionRegistrarPostProcessor.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/EntityManagerBeanDefinitionRegistrarPostProcessor.java index a3344c2c94..4d84dfc0d4 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/EntityManagerBeanDefinitionRegistrarPostProcessor.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/EntityManagerBeanDefinitionRegistrarPostProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/FetchableFluentQueryByPredicate.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/FetchableFluentQueryByPredicate.java index 9ed0a0ce3e..fdc3bb28ae 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/FetchableFluentQueryByPredicate.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/FetchableFluentQueryByPredicate.java @@ -1,5 +1,5 @@ /* - * Copyright 2021-2024 the original author or authors. + * Copyright 2021-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/FetchableFluentQueryBySpecification.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/FetchableFluentQueryBySpecification.java index 08659af984..534cd61330 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/FetchableFluentQueryBySpecification.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/FetchableFluentQueryBySpecification.java @@ -1,5 +1,5 @@ /* - * Copyright 2021-2024 the original author or authors. + * Copyright 2021-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/FluentQuerySupport.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/FluentQuerySupport.java index 5917a119f5..253610e78b 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/FluentQuerySupport.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/FluentQuerySupport.java @@ -1,5 +1,5 @@ /* - * Copyright 2021-2024 the original author or authors. + * Copyright 2021-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaEntityInformation.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaEntityInformation.java index 096bd77d21..98828424ab 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaEntityInformation.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaEntityInformation.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaEntityInformationSupport.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaEntityInformationSupport.java index 00c9f7f27d..6d8c0ba8dc 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaEntityInformationSupport.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaEntityInformationSupport.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaEvaluationContextExtension.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaEvaluationContextExtension.java index 79b7b10de0..f635a221a4 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaEvaluationContextExtension.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaEvaluationContextExtension.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2024 the original author or authors. + * Copyright 2019-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaMetamodelEntityInformation.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaMetamodelEntityInformation.java index 9979fc773b..9293454649 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaMetamodelEntityInformation.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaMetamodelEntityInformation.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaPersistableEntityInformation.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaPersistableEntityInformation.java index ed0b4644ec..aaaff2050c 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaPersistableEntityInformation.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaPersistableEntityInformation.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaRepositoryConfigurationAware.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaRepositoryConfigurationAware.java index d5b497f9a2..b8d6e2a587 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaRepositoryConfigurationAware.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaRepositoryConfigurationAware.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 the original author or authors. + * Copyright 2024-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaRepositoryFactory.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaRepositoryFactory.java index 7ecd163244..e14658773b 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaRepositoryFactory.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaRepositoryFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaRepositoryFactoryBean.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaRepositoryFactoryBean.java index f75f45a8d1..86f2f14d6c 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaRepositoryFactoryBean.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaRepositoryFactoryBean.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaRepositoryImplementation.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaRepositoryImplementation.java index d3a5b1c5fe..006b39a689 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaRepositoryImplementation.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaRepositoryImplementation.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2024 the original author or authors. + * Copyright 2017-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/MutableQueryHints.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/MutableQueryHints.java index 4a1e7443b6..46b7a7c77d 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/MutableQueryHints.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/MutableQueryHints.java @@ -1,5 +1,5 @@ /* - * Copyright 2020-2024 the original author or authors. + * Copyright 2020-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/QueryHintValue.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/QueryHintValue.java index c32b40f767..0d01e738a8 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/QueryHintValue.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/QueryHintValue.java @@ -1,5 +1,5 @@ /* - * Copyright 2020-2024 the original author or authors. + * Copyright 2020-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/QueryHints.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/QueryHints.java index 17e6d01725..8afea10892 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/QueryHints.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/QueryHints.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2024 the original author or authors. + * Copyright 2017-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/Querydsl.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/Querydsl.java index 0ade24f133..cd3945bd14 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/Querydsl.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/Querydsl.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/QuerydslJpaPredicateExecutor.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/QuerydslJpaPredicateExecutor.java index 08f3b7ab07..ad0762f78d 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/QuerydslJpaPredicateExecutor.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/QuerydslJpaPredicateExecutor.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/QuerydslJpaRepository.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/QuerydslJpaRepository.java index 0f32999b14..129d56f6e9 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/QuerydslJpaRepository.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/QuerydslJpaRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/QuerydslRepositorySupport.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/QuerydslRepositorySupport.java index a140b734b0..09c43e198b 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/QuerydslRepositorySupport.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/QuerydslRepositorySupport.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java index 1036ce24dd..ba5daeea09 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/support/ClasspathScanningPersistenceUnitPostProcessor.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/support/ClasspathScanningPersistenceUnitPostProcessor.java index 8415d67959..324c37f327 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/support/ClasspathScanningPersistenceUnitPostProcessor.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/support/ClasspathScanningPersistenceUnitPostProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/support/MergingPersistenceUnitManager.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/support/MergingPersistenceUnitManager.java index e2703107cc..c3c7fc384f 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/support/MergingPersistenceUnitManager.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/support/MergingPersistenceUnitManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/support/PageableUtils.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/support/PageableUtils.java index c50a8f98aa..fab11c139a 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/support/PageableUtils.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/support/PageableUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/util/BeanDefinitionUtils.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/util/BeanDefinitionUtils.java index 80403737d5..a5c181ee0b 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/util/BeanDefinitionUtils.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/util/BeanDefinitionUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/util/HibernateProxyDetector.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/util/HibernateProxyDetector.java index 6969cfb4a5..149742c0b7 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/util/HibernateProxyDetector.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/util/HibernateProxyDetector.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2024 the original author or authors. + * Copyright 2018-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/util/JpaMetamodel.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/util/JpaMetamodel.java index f10b69c61a..fc2cb71ae2 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/util/JpaMetamodel.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/util/JpaMetamodel.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2024 the original author or authors. + * Copyright 2016-2025 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. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/util/JpaMetamodelCacheCleanup.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/util/JpaMetamodelCacheCleanup.java index df17d56ade..c9c3e70447 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/util/JpaMetamodelCacheCleanup.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/util/JpaMetamodelCacheCleanup.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2024 the original author or authors. + * Copyright 2018-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/AntlrVersionTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/AntlrVersionTests.java index c694587167..7c18f5d466 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/AntlrVersionTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/AntlrVersionTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2024 the original author or authors. + * Copyright 2023-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/convert/QueryByExamplePredicateBuilderUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/convert/QueryByExamplePredicateBuilderUnitTests.java index 0cd7169d04..db43691aa5 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/convert/QueryByExamplePredicateBuilderUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/convert/QueryByExamplePredicateBuilderUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2024 the original author or authors. + * Copyright 2016-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/convert/threeten/DateTimeSample.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/convert/threeten/DateTimeSample.java index 7743c9868c..579c430b83 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/convert/threeten/DateTimeSample.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/convert/threeten/DateTimeSample.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/convert/threeten/Jsr310JpaConvertersIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/convert/threeten/Jsr310JpaConvertersIntegrationTests.java index 5ef388138e..ff76fbd718 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/convert/threeten/Jsr310JpaConvertersIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/convert/threeten/Jsr310JpaConvertersIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/convert/threeten/Jsr310JpaConvertersUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/convert/threeten/Jsr310JpaConvertersUnitTests.java index 92a31cec4a..a1daf39d27 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/convert/threeten/Jsr310JpaConvertersUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/convert/threeten/Jsr310JpaConvertersUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2024 the original author or authors. + * Copyright 2017-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/JpaSortTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/JpaSortTests.java index 53d3d0df21..dac929f40d 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/JpaSortTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/JpaSortTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/SpecificationUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/SpecificationUnitTests.java index aeb0c819ea..96f193b425 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/SpecificationUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/SpecificationUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AbstractAnnotatedAuditable.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AbstractAnnotatedAuditable.java index 82adedca45..e3e2ee3472 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AbstractAnnotatedAuditable.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AbstractAnnotatedAuditable.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AbstractMappedType.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AbstractMappedType.java index 60a37337b0..801b3fd9c9 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AbstractMappedType.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AbstractMappedType.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Account.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Account.java index 856611e95f..787c4bd64f 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Account.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Account.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Address.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Address.java index 468a3ba193..e5db7bfddf 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Address.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Address.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AnnotatedAuditableUser.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AnnotatedAuditableUser.java index cbb435fbc2..44bcc91e6f 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AnnotatedAuditableUser.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AnnotatedAuditableUser.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AuditableEmbeddable.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AuditableEmbeddable.java index 2cb8553073..40563a3f52 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AuditableEmbeddable.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AuditableEmbeddable.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AuditableEntity.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AuditableEntity.java index 8cb2b861c8..730fe36d20 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AuditableEntity.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AuditableEntity.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AuditableRole.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AuditableRole.java index 9fa9442b30..bfc17a68d2 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AuditableRole.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AuditableRole.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AuditableUser.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AuditableUser.java index e69864c553..65d4e6e2ad 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AuditableUser.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AuditableUser.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AuditorAwareStub.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AuditorAwareStub.java index 2ef54a1ff6..00124d98db 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AuditorAwareStub.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AuditorAwareStub.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Book.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Book.java index e66c26ffab..e30fd93869 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Book.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Book.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Child.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Child.java index 05673e35b0..f3df1a4fe2 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Child.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Child.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/ConcreteType1.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/ConcreteType1.java index 90be74aeb7..28fb4e588f 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/ConcreteType1.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/ConcreteType1.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/ConcreteType2.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/ConcreteType2.java index 356cc35d52..a30d7b4140 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/ConcreteType2.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/ConcreteType2.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/CustomAbstractPersistable.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/CustomAbstractPersistable.java index aa136318aa..dd3fd70449 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/CustomAbstractPersistable.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/CustomAbstractPersistable.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Customer.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Customer.java index 72d01a6267..f8442a9ae4 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Customer.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Customer.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Dummy.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Dummy.java index e30afcd084..bb8bfe638a 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Dummy.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Dummy.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2024 the original author or authors. + * Copyright 2015-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/EmbeddedIdExampleDepartment.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/EmbeddedIdExampleDepartment.java index 043457222a..a7aa1b9dfc 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/EmbeddedIdExampleDepartment.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/EmbeddedIdExampleDepartment.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/EmbeddedIdExampleEmployee.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/EmbeddedIdExampleEmployee.java index 0368411310..218c1f6e01 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/EmbeddedIdExampleEmployee.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/EmbeddedIdExampleEmployee.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/EmbeddedIdExampleEmployeePK.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/EmbeddedIdExampleEmployeePK.java index 1b5e49bef7..393bb6b668 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/EmbeddedIdExampleEmployeePK.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/EmbeddedIdExampleEmployeePK.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/EmployeeWithName.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/EmployeeWithName.java index ee4f273f10..4668ed04de 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/EmployeeWithName.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/EmployeeWithName.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/EntityWithAssignedId.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/EntityWithAssignedId.java index 3204f31995..4226b8bb67 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/EntityWithAssignedId.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/EntityWithAssignedId.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2024 the original author or authors. + * Copyright 2019-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/IdClassExampleDepartment.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/IdClassExampleDepartment.java index 2539184afb..7db4bf3486 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/IdClassExampleDepartment.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/IdClassExampleDepartment.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/IdClassExampleEmployee.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/IdClassExampleEmployee.java index 18df94dcec..6ad0aeb024 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/IdClassExampleEmployee.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/IdClassExampleEmployee.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/IdClassExampleEmployeePK.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/IdClassExampleEmployeePK.java index 142c75b5f9..fd730da59d 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/IdClassExampleEmployeePK.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/IdClassExampleEmployeePK.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Invoice.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Invoice.java index 2f5381f494..a0458759f6 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Invoice.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Invoice.java @@ -1,5 +1,5 @@ /* - * Copyright 2020-2024 the original author or authors. + * Copyright 2020-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/InvoiceItem.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/InvoiceItem.java index 1ff39954df..c791359af3 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/InvoiceItem.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/InvoiceItem.java @@ -1,5 +1,5 @@ /* - * Copyright 2020-2024 the original author or authors. + * Copyright 2020-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Item.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Item.java index 1625c2a794..7a01bdf620 100755 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Item.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Item.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2024 the original author or authors. + * Copyright 2016-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/ItemId.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/ItemId.java index 774c609c97..b58f92d049 100755 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/ItemId.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/ItemId.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2024 the original author or authors. + * Copyright 2016-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/ItemSite.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/ItemSite.java index b5da989a14..f5ad83e344 100755 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/ItemSite.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/ItemSite.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2024 the original author or authors. + * Copyright 2016-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/ItemSiteId.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/ItemSiteId.java index c691ac8f50..4d838de5e6 100755 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/ItemSiteId.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/ItemSiteId.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2024 the original author or authors. + * Copyright 2016-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/MailMessage.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/MailMessage.java index 08d5975559..065e9ec59b 100755 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/MailMessage.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/MailMessage.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/MailSender.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/MailSender.java index a15de9c1f1..00fffaa244 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/MailSender.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/MailSender.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/MailUser.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/MailUser.java index 49911d316a..16d5b2dbcd 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/MailUser.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/MailUser.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Order.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Order.java index c9146c1bf6..2c544945b7 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Order.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Order.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/OrmXmlEntity.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/OrmXmlEntity.java index b18eb9f18b..48ba2cdeb2 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/OrmXmlEntity.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/OrmXmlEntity.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2024 the original author or authors. + * Copyright 2015-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Owner.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Owner.java index 7661f038a1..820fc189fd 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Owner.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Owner.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/OwnerContainer.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/OwnerContainer.java index 177b8b48ba..f726ca86c1 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/OwnerContainer.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/OwnerContainer.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Parent.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Parent.java index b0a00f0ace..4b9e57c4fe 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Parent.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Parent.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/PersistableWithIdClass.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/PersistableWithIdClass.java index 5b6d1277d9..08a31a09bf 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/PersistableWithIdClass.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/PersistableWithIdClass.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/PersistableWithIdClassPK.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/PersistableWithIdClassPK.java index 5f7a6ffa43..0dcef9e938 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/PersistableWithIdClassPK.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/PersistableWithIdClassPK.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/PersistableWithSingleIdClass.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/PersistableWithSingleIdClass.java index 38305b4b90..cefd449fc9 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/PersistableWithSingleIdClass.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/PersistableWithSingleIdClass.java @@ -1,5 +1,5 @@ /* - * Copyright 2021-2024 the original author or authors. + * Copyright 2021-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/PersistableWithSingleIdClassPK.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/PersistableWithSingleIdClassPK.java index e405b3c4ba..6466fd1dd8 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/PersistableWithSingleIdClassPK.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/PersistableWithSingleIdClassPK.java @@ -1,5 +1,5 @@ /* - * Copyright 2021-2024 the original author or authors. + * Copyright 2021-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/PrimitiveVersionProperty.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/PrimitiveVersionProperty.java index c3531adacc..694f896df8 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/PrimitiveVersionProperty.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/PrimitiveVersionProperty.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Role.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Role.java index f9518a8fbc..101a784ee2 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Role.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Role.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/SampleEntity.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/SampleEntity.java index 8fe586d843..3fafe176f1 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/SampleEntity.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/SampleEntity.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/SampleEntityPK.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/SampleEntityPK.java index c46143f81d..2ad2f36f3f 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/SampleEntityPK.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/SampleEntityPK.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/SampleWithPrimitiveId.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/SampleWithPrimitiveId.java index a84c1409f5..f1047f1d4f 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/SampleWithPrimitiveId.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/SampleWithPrimitiveId.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/SampleWithTimestampVersion.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/SampleWithTimestampVersion.java index 7dc7d4ab59..3b17fb3a59 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/SampleWithTimestampVersion.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/SampleWithTimestampVersion.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Site.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Site.java index 996561cdf4..591f4da96e 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Site.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Site.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2024 the original author or authors. + * Copyright 2016-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/User.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/User.java index b3e1b4dea2..fafd6fca4a 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/User.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/User.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/UserSpecifications.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/UserSpecifications.java index 3b4d0cbbcd..304dcb5607 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/UserSpecifications.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/UserSpecifications.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/UserWithOptionalField.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/UserWithOptionalField.java index b4029f4717..cdfb9a3bfc 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/UserWithOptionalField.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/UserWithOptionalField.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/UserWithOptionalFieldRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/UserWithOptionalFieldRepository.java index 348b4433c6..c2ead4cdf7 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/UserWithOptionalFieldRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/UserWithOptionalFieldRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/VersionedUser.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/VersionedUser.java index 5e5927e1e4..58ff336205 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/VersionedUser.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/VersionedUser.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/support/AbstractAttributeConverterIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/support/AbstractAttributeConverterIntegrationTests.java index c5a088ddec..34fb8b1bf4 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/support/AbstractAttributeConverterIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/support/AbstractAttributeConverterIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2024 the original author or authors. + * Copyright 2015-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/support/AnnotationAuditingBeanFactoryPostProcessorUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/support/AnnotationAuditingBeanFactoryPostProcessorUnitTests.java index 39160aee50..94702362a0 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/support/AnnotationAuditingBeanFactoryPostProcessorUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/support/AnnotationAuditingBeanFactoryPostProcessorUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/support/AuditingBeanFactoryPostProcessorUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/support/AuditingBeanFactoryPostProcessorUnitTests.java index e34cec061d..c5ed0d79df 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/support/AuditingBeanFactoryPostProcessorUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/support/AuditingBeanFactoryPostProcessorUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/support/AuditingEntityListenerTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/support/AuditingEntityListenerTests.java index e95c8b0542..674fef7bf9 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/support/AuditingEntityListenerTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/support/AuditingEntityListenerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/support/AuditingEntityWithEmbeddableListenerTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/support/AuditingEntityWithEmbeddableListenerTests.java index 2887bb4dd3..6701ddc4b9 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/support/AuditingEntityWithEmbeddableListenerTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/support/AuditingEntityWithEmbeddableListenerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/support/AuditingNamespaceUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/support/AuditingNamespaceUnitTests.java index 2835201104..510793ad72 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/support/AuditingNamespaceUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/support/AuditingNamespaceUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/support/QueryByExampleWithOptionalEmptyTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/support/QueryByExampleWithOptionalEmptyTests.java index d5711367ef..21c04b3145 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/support/QueryByExampleWithOptionalEmptyTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/support/QueryByExampleWithOptionalEmptyTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/infrastructure/EclipseLinkMetamodelIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/infrastructure/EclipseLinkMetamodelIntegrationTests.java index 93ff873092..e3cf795046 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/infrastructure/EclipseLinkMetamodelIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/infrastructure/EclipseLinkMetamodelIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/infrastructure/HibernateMetamodelIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/infrastructure/HibernateMetamodelIntegrationTests.java index 284287c990..6ecaceccbc 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/infrastructure/HibernateMetamodelIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/infrastructure/HibernateMetamodelIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2024 the original author or authors. + * Copyright 2015-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/infrastructure/HibernateTestUtils.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/infrastructure/HibernateTestUtils.java index 82efcfadd3..02d29a7673 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/infrastructure/HibernateTestUtils.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/infrastructure/HibernateTestUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2024 the original author or authors. + * Copyright 2016-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/infrastructure/MetamodelIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/infrastructure/MetamodelIntegrationTests.java index 2f48b244b4..c821dd76a5 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/infrastructure/MetamodelIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/infrastructure/MetamodelIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/infrastructure/OpenJpaMetamodelIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/infrastructure/OpenJpaMetamodelIntegrationTests.java index 8e437f6473..16983f0f88 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/infrastructure/OpenJpaMetamodelIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/infrastructure/OpenJpaMetamodelIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/mapping/JpaMetamodelMappingContextIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/mapping/JpaMetamodelMappingContextIntegrationTests.java index 3ed9eaf357..4e2d3c32ea 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/mapping/JpaMetamodelMappingContextIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/mapping/JpaMetamodelMappingContextIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/mapping/JpaMetamodelMappingContextUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/mapping/JpaMetamodelMappingContextUnitTests.java index ff83c9672e..03962c2aa6 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/mapping/JpaMetamodelMappingContextUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/mapping/JpaMetamodelMappingContextUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2024 the original author or authors. + * Copyright 2015-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/mapping/JpaPersistentPropertyImplUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/mapping/JpaPersistentPropertyImplUnitTests.java index e7d42e9e76..ef3af850a1 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/mapping/JpaPersistentPropertyImplUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/mapping/JpaPersistentPropertyImplUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/provider/PersistenceProviderIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/provider/PersistenceProviderIntegrationTests.java index b28943e2d5..0f27bd1422 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/provider/PersistenceProviderIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/provider/PersistenceProviderIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/provider/PersistenceProviderUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/provider/PersistenceProviderUnitTests.java index bcb9582bc6..ba7c3abed7 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/provider/PersistenceProviderUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/provider/PersistenceProviderUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/AbstractPersistableIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/AbstractPersistableIntegrationTests.java index 67ce3cfa50..bad12168d4 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/AbstractPersistableIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/AbstractPersistableIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/CrudMethodMetadataUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/CrudMethodMetadataUnitTests.java index 76c7e95662..52e217bb71 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/CrudMethodMetadataUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/CrudMethodMetadataUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/CustomAbstractPersistableIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/CustomAbstractPersistableIntegrationTests.java index 46353534a1..a5ac1bd413 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/CustomAbstractPersistableIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/CustomAbstractPersistableIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/CustomEclipseLinkJpaVendorAdapter.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/CustomEclipseLinkJpaVendorAdapter.java index 124fff7adb..6919ba545d 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/CustomEclipseLinkJpaVendorAdapter.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/CustomEclipseLinkJpaVendorAdapter.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2024 the original author or authors. + * Copyright 2015-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/CustomHsqlHibernateJpaVendorAdaptor.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/CustomHsqlHibernateJpaVendorAdaptor.java index 2957ab2e87..359bda9b5e 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/CustomHsqlHibernateJpaVendorAdaptor.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/CustomHsqlHibernateJpaVendorAdaptor.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EclipseLinkEntityGraphRepositoryMethodsIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EclipseLinkEntityGraphRepositoryMethodsIntegrationTests.java index e0d21dc716..74820a58a2 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EclipseLinkEntityGraphRepositoryMethodsIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EclipseLinkEntityGraphRepositoryMethodsIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EclipseLinkNamespaceUserRepositoryTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EclipseLinkNamespaceUserRepositoryTests.java index a93fb5336b..ad61aa2f55 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EclipseLinkNamespaceUserRepositoryTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EclipseLinkNamespaceUserRepositoryTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EclipseLinkParentRepositoryIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EclipseLinkParentRepositoryIntegrationTests.java index 06d1575fd5..796e14be8a 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EclipseLinkParentRepositoryIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EclipseLinkParentRepositoryIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EclipseLinkQueryByExampleIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EclipseLinkQueryByExampleIntegrationTests.java index afea59666d..1f0e5e1300 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EclipseLinkQueryByExampleIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EclipseLinkQueryByExampleIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EclipseLinkRepositoryWithCompositeKeyIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EclipseLinkRepositoryWithCompositeKeyIntegrationTests.java index 82ca0c59a9..a2f1bbb5db 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EclipseLinkRepositoryWithCompositeKeyIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EclipseLinkRepositoryWithCompositeKeyIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2024 the original author or authors. + * Copyright 2016-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EclipseLinkStoredProcedureIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EclipseLinkStoredProcedureIntegrationTests.java index e3ff3d5c07..71a583ebc1 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EclipseLinkStoredProcedureIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EclipseLinkStoredProcedureIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EclipseLinkUserRepositoryFinderTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EclipseLinkUserRepositoryFinderTests.java index 99343adb99..75cfa39d82 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EclipseLinkUserRepositoryFinderTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EclipseLinkUserRepositoryFinderTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EntityGraphRepositoryMethodsIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EntityGraphRepositoryMethodsIntegrationTests.java index 1086577a21..7191b85a4d 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EntityGraphRepositoryMethodsIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EntityGraphRepositoryMethodsIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EntityWithAssignedIdIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EntityWithAssignedIdIntegrationTests.java index 10a84ed886..05e6714895 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EntityWithAssignedIdIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EntityWithAssignedIdIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2024 the original author or authors. + * Copyright 2019-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/GreetingsFrom.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/GreetingsFrom.java index 247944ccd0..3e31f95ffb 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/GreetingsFrom.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/GreetingsFrom.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 the original author or authors. + * Copyright 2024-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/JavaConfigUserRepositoryTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/JavaConfigUserRepositoryTests.java index b1aeb29c3a..d87b9e152c 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/JavaConfigUserRepositoryTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/JavaConfigUserRepositoryTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/MappedTypeRepositoryIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/MappedTypeRepositoryIntegrationTests.java index 1a33ab4bc2..42428a19f2 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/MappedTypeRepositoryIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/MappedTypeRepositoryIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/NamespaceUserRepositoryTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/NamespaceUserRepositoryTests.java index a37117e848..5c99719d12 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/NamespaceUserRepositoryTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/NamespaceUserRepositoryTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/ORMInfrastructureTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/ORMInfrastructureTests.java index 98bd534a78..5cbb6a96bb 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/ORMInfrastructureTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/ORMInfrastructureTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/OpenJpaEntityGraphRepositoryMethodsIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/OpenJpaEntityGraphRepositoryMethodsIntegrationTests.java index 22390b7682..c42ae99579 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/OpenJpaEntityGraphRepositoryMethodsIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/OpenJpaEntityGraphRepositoryMethodsIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/OpenJpaNamespaceUserRepositoryTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/OpenJpaNamespaceUserRepositoryTests.java index cfe023d9c6..a69fb9e35c 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/OpenJpaNamespaceUserRepositoryTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/OpenJpaNamespaceUserRepositoryTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/OpenJpaParentRepositoryIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/OpenJpaParentRepositoryIntegrationTests.java index 5cf9bc4917..d94ed598c0 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/OpenJpaParentRepositoryIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/OpenJpaParentRepositoryIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/OpenJpaRepositoryWithCompositeKeyIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/OpenJpaRepositoryWithCompositeKeyIntegrationTests.java index e3c8eeb334..c6acc17b33 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/OpenJpaRepositoryWithCompositeKeyIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/OpenJpaRepositoryWithCompositeKeyIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2024 the original author or authors. + * Copyright 2016-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/OpenJpaStoredProcedureIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/OpenJpaStoredProcedureIntegrationTests.java index 993cb32a04..6984b99e27 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/OpenJpaStoredProcedureIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/OpenJpaStoredProcedureIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2024 the original author or authors. + * Copyright 2015-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/OpenJpaUserRepositoryFinderTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/OpenJpaUserRepositoryFinderTests.java index d53d6bd531..d1e1b01f66 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/OpenJpaUserRepositoryFinderTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/OpenJpaUserRepositoryFinderTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/ParentRepositoryIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/ParentRepositoryIntegrationTests.java index 6b85895950..7b53e6669b 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/ParentRepositoryIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/ParentRepositoryIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/QueryByExampleIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/QueryByExampleIntegrationTests.java index a5302d9506..458954f3e1 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/QueryByExampleIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/QueryByExampleIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/RedeclaringRepositoryMethodsTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/RedeclaringRepositoryMethodsTests.java index b8b1f54511..c4f5c4e30d 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/RedeclaringRepositoryMethodsTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/RedeclaringRepositoryMethodsTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/RepositoryWithCompositeKeyTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/RepositoryWithCompositeKeyTests.java index 64b51acb1c..20613cc1d6 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/RepositoryWithCompositeKeyTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/RepositoryWithCompositeKeyTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/RepositoryWithIdClassKeyTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/RepositoryWithIdClassKeyTests.java index b0cbec6b44..5cc0f45ce0 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/RepositoryWithIdClassKeyTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/RepositoryWithIdClassKeyTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2024 the original author or authors. + * Copyright 2016-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/RoleRepositoryIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/RoleRepositoryIntegrationTests.java index 2a8f849823..5fc3573d64 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/RoleRepositoryIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/RoleRepositoryIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/SPR8954Tests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/SPR8954Tests.java index f731ca2c66..f2a0042a32 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/SPR8954Tests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/SPR8954Tests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/SimpleJpaParameterBindingTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/SimpleJpaParameterBindingTests.java index bc11790d8e..efe754ad7b 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/SimpleJpaParameterBindingTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/SimpleJpaParameterBindingTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/StoredProcedureIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/StoredProcedureIntegrationTests.java index 93615637f5..8cc377e059 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/StoredProcedureIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/StoredProcedureIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2024 the original author or authors. + * Copyright 2015-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/UserRepositoryFinderTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/UserRepositoryFinderTests.java index 259420a09a..7d8f721c5c 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/UserRepositoryFinderTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/UserRepositoryFinderTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/UserRepositoryStoredProcedureIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/UserRepositoryStoredProcedureIntegrationTests.java index de57832f7a..1f158fa4fd 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/UserRepositoryStoredProcedureIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/UserRepositoryStoredProcedureIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/UserRepositoryTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/UserRepositoryTests.java index 02a89c3677..1c365cfb1e 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/UserRepositoryTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/UserRepositoryTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/aot/JpaRuntimeHintsUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/aot/JpaRuntimeHintsUnitTests.java index bce5b13fcd..9f7f6b5f0e 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/aot/JpaRuntimeHintsUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/aot/JpaRuntimeHintsUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/CdiExtensionIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/CdiExtensionIntegrationTests.java index 1d44e9bf86..e04c20790e 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/CdiExtensionIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/CdiExtensionIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/EntityManagerFactoryProducer.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/EntityManagerFactoryProducer.java index a00c0d43b5..d293674d49 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/EntityManagerFactoryProducer.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/EntityManagerFactoryProducer.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/JpaQueryRewriterWithCdiIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/JpaQueryRewriterWithCdiIntegrationTests.java index 30d6a7b85d..92994cfef3 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/JpaQueryRewriterWithCdiIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/JpaQueryRewriterWithCdiIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/JpaRepositoryExtensionUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/JpaRepositoryExtensionUnitTests.java index 3b76bc9a05..7c8b6c8d94 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/JpaRepositoryExtensionUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/JpaRepositoryExtensionUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/Person.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/Person.java index a889375381..007de3b9c9 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/Person.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/Person.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/PersonDB.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/PersonDB.java index c91f3f97bb..abb7b5e6fd 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/PersonDB.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/PersonDB.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/PersonRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/PersonRepository.java index 72b4956aba..eb8468db45 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/PersonRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/PersonRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedCustomizedCdiConfiguration.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedCustomizedCdiConfiguration.java index 67e387afbb..ad47eda044 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedCustomizedCdiConfiguration.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedCustomizedCdiConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedCustomizedUserRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedCustomizedUserRepository.java index 2d41f76bf6..d43704a813 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedCustomizedUserRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedCustomizedUserRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedCustomizedUserRepositoryBean.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedCustomizedUserRepositoryBean.java index 779fa370ea..7a34f07fb4 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedCustomizedUserRepositoryBean.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedCustomizedUserRepositoryBean.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedCustomizedUserRepositoryCustom.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedCustomizedUserRepositoryCustom.java index e4d49f78a0..ed789c32ca 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedCustomizedUserRepositoryCustom.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedCustomizedUserRepositoryCustom.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedEntityManagerProducer.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedEntityManagerProducer.java index 5a2a045bb1..093b5afc16 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedEntityManagerProducer.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedEntityManagerProducer.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedFragment.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedFragment.java index f379d09c1b..4702152d9b 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedFragment.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedFragment.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2024 the original author or authors. + * Copyright 2018-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedFragmentBean.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedFragmentBean.java index 6ff85427b4..54ce392031 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedFragmentBean.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedFragmentBean.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2024 the original author or authors. + * Copyright 2018-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedPersonRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedPersonRepository.java index a9fc2fe9a3..487121fc7a 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedPersonRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedPersonRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/RepositoryConsumer.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/RepositoryConsumer.java index f9ff0fa711..2833ea63b0 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/RepositoryConsumer.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/RepositoryConsumer.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/SamplePersonRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/SamplePersonRepository.java index 5e99a709a4..559370d8fe 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/SamplePersonRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/SamplePersonRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/SamplePersonRepositoryCustom.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/SamplePersonRepositoryCustom.java index 072332f0fb..66a910a882 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/SamplePersonRepositoryCustom.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/SamplePersonRepositoryCustom.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/SamplePersonRepositoryImpl.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/SamplePersonRepositoryImpl.java index 4e14a00ea4..ed7ef43cdd 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/SamplePersonRepositoryImpl.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/SamplePersonRepositoryImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/Transactional.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/Transactional.java index ddc35d77bc..d50e810b25 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/Transactional.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/Transactional.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/TransactionalInterceptor.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/TransactionalInterceptor.java index 1e9813df95..51d2bc3b29 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/TransactionalInterceptor.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/TransactionalInterceptor.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/UnqualifiedEntityManagerProducer.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/UnqualifiedEntityManagerProducer.java index d18edec881..43eded0a81 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/UnqualifiedEntityManagerProducer.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/UnqualifiedEntityManagerProducer.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/UnqualifiedPersonRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/UnqualifiedPersonRepository.java index 47677d70ac..fb7a4dd096 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/UnqualifiedPersonRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/UnqualifiedPersonRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/UserDB.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/UserDB.java index d89737beb0..93f14563c7 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/UserDB.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/UserDB.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/AbstractAuditingViaJavaConfigRepositoriesTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/AbstractAuditingViaJavaConfigRepositoriesTests.java index 7a5fb05c0d..5285ed2e3e 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/AbstractAuditingViaJavaConfigRepositoriesTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/AbstractAuditingViaJavaConfigRepositoriesTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/AbstractRepositoryConfigTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/AbstractRepositoryConfigTests.java index 8d6baca3e3..64da44a6a0 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/AbstractRepositoryConfigTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/AbstractRepositoryConfigTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/AllowNestedRepositoriesRepositoryConfigTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/AllowNestedRepositoriesRepositoryConfigTests.java index 6110e02b1c..edae851478 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/AllowNestedRepositoriesRepositoryConfigTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/AllowNestedRepositoriesRepositoryConfigTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/AuditingBeanDefinitionParserTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/AuditingBeanDefinitionParserTests.java index 14edf2c213..b739493a23 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/AuditingBeanDefinitionParserTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/AuditingBeanDefinitionParserTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/CustomRepositoryFactoryConfigTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/CustomRepositoryFactoryConfigTests.java index 9dc0b3d0fc..02f2f2a1fe 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/CustomRepositoryFactoryConfigTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/CustomRepositoryFactoryConfigTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/DefaultAuditingViaJavaConfigRepositoriesTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/DefaultAuditingViaJavaConfigRepositoriesTests.java index 69206bb28e..5e40224732 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/DefaultAuditingViaJavaConfigRepositoriesTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/DefaultAuditingViaJavaConfigRepositoriesTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/ExplicitAuditingViaJavaConfigRepositoriesTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/ExplicitAuditingViaJavaConfigRepositoriesTests.java index cc3ff4e612..d0c5fd06f4 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/ExplicitAuditingViaJavaConfigRepositoriesTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/ExplicitAuditingViaJavaConfigRepositoriesTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/InfrastructureConfig.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/InfrastructureConfig.java index 8542911649..4fdaad1022 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/InfrastructureConfig.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/InfrastructureConfig.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/InspectionClassLoaderUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/InspectionClassLoaderUnitTests.java index beb61ed5ad..0b3da373e5 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/InspectionClassLoaderUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/InspectionClassLoaderUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2024 the original author or authors. + * Copyright 2018-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/JpaAuditingRegistrarUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/JpaAuditingRegistrarUnitTests.java index 623f3d5249..504ac40d24 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/JpaAuditingRegistrarUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/JpaAuditingRegistrarUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/JpaRepositoriesRegistrarIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/JpaRepositoriesRegistrarIntegrationTests.java index d6b550f0ea..8d4a11955e 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/JpaRepositoriesRegistrarIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/JpaRepositoriesRegistrarIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/JpaRepositoriesRegistrarUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/JpaRepositoriesRegistrarUnitTests.java index 3c293e245b..3b68b30365 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/JpaRepositoriesRegistrarUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/JpaRepositoriesRegistrarUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/JpaRepositoryConfigDefinitionParserTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/JpaRepositoryConfigDefinitionParserTests.java index 09751277d3..2cbadc8275 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/JpaRepositoryConfigDefinitionParserTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/JpaRepositoryConfigDefinitionParserTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/JpaRepositoryConfigExtensionUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/JpaRepositoryConfigExtensionUnitTests.java index 54ca71d9f7..df4e2097e5 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/JpaRepositoryConfigExtensionUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/JpaRepositoryConfigExtensionUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/JpaRepositoryRegistrationAotProcessorUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/JpaRepositoryRegistrationAotProcessorUnitTests.java index ef9011e437..714abc2afa 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/JpaRepositoryRegistrationAotProcessorUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/JpaRepositoryRegistrationAotProcessorUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/NestedRepositoriesJavaConfigTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/NestedRepositoriesJavaConfigTests.java index 2cf100c402..7384a64cb6 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/NestedRepositoriesJavaConfigTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/NestedRepositoriesJavaConfigTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/QueryLookupStrategyTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/QueryLookupStrategyTests.java index 7ea61726f6..22cb434931 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/QueryLookupStrategyTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/QueryLookupStrategyTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/RepositoriesJavaConfigTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/RepositoriesJavaConfigTests.java index 688e5471a8..bb40ccfc01 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/RepositoriesJavaConfigTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/RepositoriesJavaConfigTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/RepositoryAutoConfigTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/RepositoryAutoConfigTests.java index a6eada978a..f08f7bb2ee 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/RepositoryAutoConfigTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/RepositoryAutoConfigTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/RepositoryConfigTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/RepositoryConfigTests.java index 10977363f9..722e137690 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/RepositoryConfigTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/RepositoryConfigTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/TypeFilterConfigTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/TypeFilterConfigTests.java index b8e35ce52b..56b449f9b6 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/TypeFilterConfigTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/TypeFilterConfigTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/custom/CustomGenericJpaRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/custom/CustomGenericJpaRepository.java index e9c53f287a..00fe7c6aa1 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/custom/CustomGenericJpaRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/custom/CustomGenericJpaRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/custom/CustomGenericJpaRepositoryFactory.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/custom/CustomGenericJpaRepositoryFactory.java index ab6b76002b..d898522b32 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/custom/CustomGenericJpaRepositoryFactory.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/custom/CustomGenericJpaRepositoryFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/custom/CustomGenericJpaRepositoryFactoryBean.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/custom/CustomGenericJpaRepositoryFactoryBean.java index 09a702b6f0..b2c13f48dc 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/custom/CustomGenericJpaRepositoryFactoryBean.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/custom/CustomGenericJpaRepositoryFactoryBean.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/custom/CustomGenericRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/custom/CustomGenericRepository.java index b39c31c296..b5d8b10b8e 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/custom/CustomGenericRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/custom/CustomGenericRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/custom/UserCustomExtendedRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/custom/UserCustomExtendedRepository.java index dd537e7155..1606e832f8 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/custom/UserCustomExtendedRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/custom/UserCustomExtendedRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/generics/EclipseLinkGenericsIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/generics/EclipseLinkGenericsIntegrationTests.java index e7725e53e6..9c3019106f 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/generics/EclipseLinkGenericsIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/generics/EclipseLinkGenericsIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/generics/GenericsIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/generics/GenericsIntegrationTests.java index 364bcbfa7f..ce40a725bc 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/generics/GenericsIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/generics/GenericsIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/MySqlStoredProcedureIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/MySqlStoredProcedureIntegrationTests.java index b248e809f6..5366736fc9 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/MySqlStoredProcedureIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/MySqlStoredProcedureIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2024 the original author or authors. + * Copyright 2015-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/PostgresStoredProcedureIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/PostgresStoredProcedureIntegrationTests.java index b3c76d25b1..af07eb0013 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/PostgresStoredProcedureIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/PostgresStoredProcedureIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2024 the original author or authors. + * Copyright 2015-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/PostgresStoredProcedureNullHandlingIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/PostgresStoredProcedureNullHandlingIntegrationTests.java index 98783a9c28..c5fba7eff7 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/PostgresStoredProcedureNullHandlingIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/PostgresStoredProcedureNullHandlingIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2024 the original author or authors. + * Copyright 2015-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/StoredProcedureConfigSupport.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/StoredProcedureConfigSupport.java index 0b8ef1f9cd..998245126b 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/StoredProcedureConfigSupport.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/StoredProcedureConfigSupport.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 the original author or authors. + * Copyright 2024-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/projections/ProjectionJoinIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/projections/ProjectionJoinIntegrationTests.java index 1c952765e6..d0bdce94bd 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/projections/ProjectionJoinIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/projections/ProjectionJoinIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2024 the original author or authors. + * Copyright 2018-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/projections/ProjectionsIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/projections/ProjectionsIntegrationTests.java index f744dd540d..9abc3716e0 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/projections/ProjectionsIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/projections/ProjectionsIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2024 the original author or authors. + * Copyright 2017-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/AbstractJpaQueryTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/AbstractJpaQueryTests.java index 1f7db3cc42..8728e03229 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/AbstractJpaQueryTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/AbstractJpaQueryTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/AbstractStringBasedJpaQueryIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/AbstractStringBasedJpaQueryIntegrationTests.java index 9cb74dcaa0..6590db4022 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/AbstractStringBasedJpaQueryIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/AbstractStringBasedJpaQueryIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2024 the original author or authors. + * Copyright 2016-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/AbstractStringBasedJpaQueryUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/AbstractStringBasedJpaQueryUnitTests.java index b2e6ba4fce..d9073be331 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/AbstractStringBasedJpaQueryUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/AbstractStringBasedJpaQueryUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 the original author or authors. + * Copyright 2024-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/CollectionUtilsUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/CollectionUtilsUnitTests.java index dd488b1ac5..9ab7aa87da 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/CollectionUtilsUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/CollectionUtilsUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2024 the original author or authors. + * Copyright 2023-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/CustomNonBindableJpaParametersIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/CustomNonBindableJpaParametersIntegrationTests.java index 724f0e1bf7..50ca107e95 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/CustomNonBindableJpaParametersIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/CustomNonBindableJpaParametersIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2024 the original author or authors. + * Copyright 2019-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/DefaultQueryEnhancerUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/DefaultQueryEnhancerUnitTests.java index da2bb066ac..43a87c8282 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/DefaultQueryEnhancerUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/DefaultQueryEnhancerUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2024 the original author or authors. + * Copyright 2023-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/DefaultQueryUtilsUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/DefaultQueryUtilsUnitTests.java index cf3eb4867c..0e6b4a577c 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/DefaultQueryUtilsUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/DefaultQueryUtilsUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EclipseLinkJpa21UtilsTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EclipseLinkJpa21UtilsTests.java index bd97fbb600..19a2701e0e 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EclipseLinkJpa21UtilsTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EclipseLinkJpa21UtilsTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2024 the original author or authors. + * Copyright 2017-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EclipseLinkMetaAnnotatedQueryMethodIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EclipseLinkMetaAnnotatedQueryMethodIntegrationTests.java index df7b27f9d9..bf8e408d52 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EclipseLinkMetaAnnotatedQueryMethodIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EclipseLinkMetaAnnotatedQueryMethodIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EclipseLinkParameterMetadataProviderIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EclipseLinkParameterMetadataProviderIntegrationTests.java index c89f75309f..1e253c5acb 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EclipseLinkParameterMetadataProviderIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EclipseLinkParameterMetadataProviderIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2024 the original author or authors. + * Copyright 2015-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EclipseLinkQueryUtilsIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EclipseLinkQueryUtilsIntegrationTests.java index f70c7186f7..e607648544 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EclipseLinkQueryUtilsIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EclipseLinkQueryUtilsIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlComplianceTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlComplianceTests.java index bbfbffe1ab..1336b9f3a2 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlComplianceTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlComplianceTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2024 the original author or authors. + * Copyright 2023-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlParserQueryEnhancerUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlParserQueryEnhancerUnitTests.java index 241a5310b5..8895fc4c19 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlParserQueryEnhancerUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlParserQueryEnhancerUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2024 the original author or authors. + * Copyright 2023-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlQueryRendererTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlQueryRendererTests.java index 91a4bb761e..b86fc5bda3 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlQueryRendererTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlQueryRendererTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2024 the original author or authors. + * Copyright 2023-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlQueryTransformerTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlQueryTransformerTests.java index a85214f43d..3c1fec2ed3 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlQueryTransformerTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlQueryTransformerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2024 the original author or authors. + * Copyright 2023-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlSpecificationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlSpecificationTests.java index b6ed4fc8b8..5bd15b1961 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlSpecificationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlSpecificationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2024 the original author or authors. + * Copyright 2023-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EscapeCharacterUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EscapeCharacterUnitTests.java index 418fbff3e0..ca16538f7d 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EscapeCharacterUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EscapeCharacterUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2024 the original author or authors. + * Copyright 2019-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ExpressionBasedStringQueryUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ExpressionBasedStringQueryUnitTests.java index d651db1393..1df1abde12 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ExpressionBasedStringQueryUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ExpressionBasedStringQueryUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlParserQueryEnhancerUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlParserQueryEnhancerUnitTests.java index 7d57ed37ad..ef7b269115 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlParserQueryEnhancerUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlParserQueryEnhancerUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2024 the original author or authors. + * Copyright 2023-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlParserUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlParserUnitTests.java index 62f194ea66..fb56b657f3 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlParserUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlParserUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2024 the original author or authors. + * Copyright 2023-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryRendererTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryRendererTests.java index 067a3adbe4..6cde039b62 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryRendererTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryRendererTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryTransformerTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryTransformerTests.java index 2ee28f804a..fab16a9e0f 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryTransformerTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryTransformerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlSpecificationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlSpecificationTests.java index 80483a05b9..4214b99801 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlSpecificationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlSpecificationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JSqlParserQueryEnhancerUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JSqlParserQueryEnhancerUnitTests.java index 7ed0a804c8..dee9d10d66 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JSqlParserQueryEnhancerUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JSqlParserQueryEnhancerUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2024 the original author or authors. + * Copyright 2023-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/Jpa21UtilsTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/Jpa21UtilsTests.java index 64c015ca49..aebad09360 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/Jpa21UtilsTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/Jpa21UtilsTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2024 the original author or authors. + * Copyright 2017-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/Jpa21UtilsUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/Jpa21UtilsUnitTests.java index 4885869be9..fab642d505 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/Jpa21UtilsUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/Jpa21UtilsUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2024 the original author or authors. + * Copyright 2015-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpaCountQueryCreatorIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpaCountQueryCreatorIntegrationTests.java index 3835426aba..9afcf27d56 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpaCountQueryCreatorIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpaCountQueryCreatorIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2024 the original author or authors. + * Copyright 2017-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpaParametersUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpaParametersUnitTests.java index ea851bb4fe..c798acd8ac 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpaParametersUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpaParametersUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpaQueryExecutionUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpaQueryExecutionUnitTests.java index da57f6a899..6d93f6ae9f 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpaQueryExecutionUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpaQueryExecutionUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpaQueryLookupStrategyUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpaQueryLookupStrategyUnitTests.java index cff7fc83c6..a8205cea35 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpaQueryLookupStrategyUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpaQueryLookupStrategyUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpaQueryMethodUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpaQueryMethodUnitTests.java index 4d54b1950d..93f01a109c 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpaQueryMethodUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpaQueryMethodUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpaQueryRewriteIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpaQueryRewriteIntegrationTests.java index 4c504e8cc9..9738c7843a 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpaQueryRewriteIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpaQueryRewriteIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlComplianceTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlComplianceTests.java index aadf2c2589..1c412fcf8a 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlComplianceTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlComplianceTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 the original author or authors. + * Copyright 2024-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlParserQueryEnhancerUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlParserQueryEnhancerUnitTests.java index b867aba845..8b6385e65d 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlParserQueryEnhancerUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlParserQueryEnhancerUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2024 the original author or authors. + * Copyright 2023-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlQueryRendererTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlQueryRendererTests.java index c50f07c596..4446a5195a 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlQueryRendererTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlQueryRendererTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlQueryTransformerTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlQueryTransformerTests.java index c2de2ca015..147477fc2f 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlQueryTransformerTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlQueryTransformerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlSpecificationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlSpecificationTests.java index f32a9d1c75..b3c7ea1a8e 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlSpecificationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlSpecificationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/KeysetScrollSpecificationUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/KeysetScrollSpecificationUnitTests.java index 39a43cb1d5..9d8c92a18a 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/KeysetScrollSpecificationUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/KeysetScrollSpecificationUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2024 the original author or authors. + * Copyright 2023-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/LikeBindingUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/LikeBindingUnitTests.java index c67b1ce836..3000455292 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/LikeBindingUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/LikeBindingUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/MetaAnnotatedQueryMethodIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/MetaAnnotatedQueryMethodIntegrationTests.java index 8947bda883..ae76cb023a 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/MetaAnnotatedQueryMethodIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/MetaAnnotatedQueryMethodIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/MetaAnnotatedQueryMethodUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/MetaAnnotatedQueryMethodUnitTests.java index b9e899121f..29e50b85b6 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/MetaAnnotatedQueryMethodUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/MetaAnnotatedQueryMethodUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/NamedOrIndexedQueryParameterSetterUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/NamedOrIndexedQueryParameterSetterUnitTests.java index 844ae69e01..6f1692142d 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/NamedOrIndexedQueryParameterSetterUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/NamedOrIndexedQueryParameterSetterUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2024 the original author or authors. + * Copyright 2017-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/NamedQueryUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/NamedQueryUnitTests.java index ebdd2a8395..dadfd1083d 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/NamedQueryUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/NamedQueryUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/NativeJpaQueryUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/NativeJpaQueryUnitTests.java index 7a9cf35d1f..40a0279903 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/NativeJpaQueryUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/NativeJpaQueryUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 the original author or authors. + * Copyright 2024-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/OpenJpaJpa21UtilsTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/OpenJpaJpa21UtilsTests.java index b8299fa9a1..4c5cac42e1 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/OpenJpaJpa21UtilsTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/OpenJpaJpa21UtilsTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2024 the original author or authors. + * Copyright 2017-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/OpenJpaParameterMetadataProviderIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/OpenJpaParameterMetadataProviderIntegrationTests.java index a2013af402..7517a2a7e1 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/OpenJpaParameterMetadataProviderIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/OpenJpaParameterMetadataProviderIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2024 the original author or authors. + * Copyright 2015-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/OpenJpaQueryUtilsIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/OpenJpaQueryUtilsIntegrationTests.java index 2363f429d5..fd8f1cb634 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/OpenJpaQueryUtilsIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/OpenJpaQueryUtilsIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ParameterBinderUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ParameterBinderUnitTests.java index 4f90c40c71..e80d9a8692 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ParameterBinderUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ParameterBinderUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ParameterBindingParserUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ParameterBindingParserUnitTests.java index b4bd22d9ad..edcaf0e4ea 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ParameterBindingParserUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ParameterBindingParserUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2024 the original author or authors. + * Copyright 2017-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ParameterExpressionProviderTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ParameterExpressionProviderTests.java index 6d1d5393b9..b706551305 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ParameterExpressionProviderTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ParameterExpressionProviderTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2024 the original author or authors. + * Copyright 2017-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ParameterMetadataProviderIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ParameterMetadataProviderIntegrationTests.java index 6dc7b84b1c..c0f86397d3 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ParameterMetadataProviderIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ParameterMetadataProviderIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2024 the original author or authors. + * Copyright 2015-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ParameterMetadataProviderUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ParameterMetadataProviderUnitTests.java index c62b6e8b09..86a4de3ab2 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ParameterMetadataProviderUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ParameterMetadataProviderUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2024 the original author or authors. + * Copyright 2017-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/PartTreeJpaQueryIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/PartTreeJpaQueryIntegrationTests.java index ddd71dbfa7..4bd5f9c2dd 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/PartTreeJpaQueryIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/PartTreeJpaQueryIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License import org.springframework.aop.framework.Advised; diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryEnhancerFactoryUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryEnhancerFactoryUnitTests.java index 30645398b2..99b8a7a730 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryEnhancerFactoryUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryEnhancerFactoryUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryEnhancerTckTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryEnhancerTckTests.java index 3e3465e3d3..cd5982a1ca 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryEnhancerTckTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryEnhancerTckTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2024 the original author or authors. + * Copyright 2023-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryEnhancerUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryEnhancerUnitTests.java index d476c445b2..3113627c8e 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryEnhancerUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryEnhancerUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryParameterSetterFactoryUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryParameterSetterFactoryUnitTests.java index 51fb6d8d37..0b35d49b04 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryParameterSetterFactoryUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryParameterSetterFactoryUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2024 the original author or authors. + * Copyright 2017-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryUtilsIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryUtilsIntegrationTests.java index 59eb5f8667..d2bf333dec 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryUtilsIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryUtilsIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryUtilsUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryUtilsUnitTests.java index b2b2c4acd6..647d4dfa2b 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryUtilsUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryUtilsUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryWithNullLikeIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryWithNullLikeIntegrationTests.java index 59f418aa61..9f7e2da8ea 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryWithNullLikeIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryWithNullLikeIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/SimpleJpaQueryUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/SimpleJpaQueryUnitTests.java index e5a6b04334..5d2beb3d9b 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/SimpleJpaQueryUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/SimpleJpaQueryUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/StoredProcedureAttributeSourceUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/StoredProcedureAttributeSourceUnitTests.java index bcfc8bf9ad..9e0363671d 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/StoredProcedureAttributeSourceUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/StoredProcedureAttributeSourceUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/StoredProcedureAttributesUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/StoredProcedureAttributesUnitTests.java index 919f12d1a9..b9c495778d 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/StoredProcedureAttributesUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/StoredProcedureAttributesUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2024 the original author or authors. + * Copyright 2015-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/StringQueryUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/StringQueryUnitTests.java index b7cb49db74..4db398991d 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/StringQueryUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/StringQueryUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/TupleConverterUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/TupleConverterUnitTests.java index 13dc550fb0..6d3e3a73b4 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/TupleConverterUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/TupleConverterUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2024 the original author or authors. + * Copyright 2016-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/AnnotatedAuditableUserRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/AnnotatedAuditableUserRepository.java index 36748415e5..cf549ad521 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/AnnotatedAuditableUserRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/AnnotatedAuditableUserRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/AuditableEntityRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/AuditableEntityRepository.java index 321fdbf179..216d448d84 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/AuditableEntityRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/AuditableEntityRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/AuditableUserRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/AuditableUserRepository.java index 127c237fbf..b3d39afc9b 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/AuditableUserRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/AuditableUserRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/BookRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/BookRepository.java index dd4af2f2d6..c5a89ebf0f 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/BookRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/BookRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/CategoryRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/CategoryRepository.java index 601c4647ae..676a095567 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/CategoryRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/CategoryRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/ClassWithNestedRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/ClassWithNestedRepository.java index 303910c50b..17089b7e60 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/ClassWithNestedRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/ClassWithNestedRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/ConcreteRepository1.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/ConcreteRepository1.java index 52ff1ee123..78ee0efe1d 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/ConcreteRepository1.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/ConcreteRepository1.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/ConcreteRepository2.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/ConcreteRepository2.java index 5137c87da7..55fef12d72 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/ConcreteRepository2.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/ConcreteRepository2.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/CustomAbstractPersistableRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/CustomAbstractPersistableRepository.java index 12dcbeed5e..d59a163db7 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/CustomAbstractPersistableRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/CustomAbstractPersistableRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/DummyRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/DummyRepository.java index 07a00c4424..34aef70172 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/DummyRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/DummyRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2024 the original author or authors. + * Copyright 2015-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/EmployeeRepositoryWithEmbeddedId.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/EmployeeRepositoryWithEmbeddedId.java index c52e42343a..ea1bc60f56 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/EmployeeRepositoryWithEmbeddedId.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/EmployeeRepositoryWithEmbeddedId.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/EmployeeRepositoryWithIdClass.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/EmployeeRepositoryWithIdClass.java index 703501f0d6..e3413fed97 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/EmployeeRepositoryWithIdClass.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/EmployeeRepositoryWithIdClass.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/EntityWithAssignedIdRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/EntityWithAssignedIdRepository.java index 505c658d44..fc6f4714bc 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/EntityWithAssignedIdRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/EntityWithAssignedIdRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2024 the original author or authors. + * Copyright 2019-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/ItemRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/ItemRepository.java index 9335ce52d9..a82370752c 100755 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/ItemRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/ItemRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2024 the original author or authors. + * Copyright 2016-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/ItemSiteRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/ItemSiteRepository.java index 0151618d4b..dd6ba72176 100755 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/ItemSiteRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/ItemSiteRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2024 the original author or authors. + * Copyright 2016-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/MailMessageRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/MailMessageRepository.java index 11ecbd0d61..62ad9525e4 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/MailMessageRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/MailMessageRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/MappedTypeRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/MappedTypeRepository.java index 12c1041ef4..a2ce8ab9b1 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/MappedTypeRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/MappedTypeRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/NameOnlyDto.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/NameOnlyDto.java index f27d201137..13ee35f497 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/NameOnlyDto.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/NameOnlyDto.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2024 the original author or authors. + * Copyright 2018-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/NameOnlyRecord.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/NameOnlyRecord.java index d8dd5fa1b3..b72c448345 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/NameOnlyRecord.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/NameOnlyRecord.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2024 the original author or authors. + * Copyright 2018-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/ParentRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/ParentRepository.java index 4ab5675004..71f665c311 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/ParentRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/ParentRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/ProductRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/ProductRepository.java index 3d34f051ea..2de721721e 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/ProductRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/ProductRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/RedeclaringRepositoryMethodsRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/RedeclaringRepositoryMethodsRepository.java index dd9343fff3..a5012f6d2b 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/RedeclaringRepositoryMethodsRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/RedeclaringRepositoryMethodsRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/RepositoryMethodsWithEntityGraphConfigRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/RepositoryMethodsWithEntityGraphConfigRepository.java index eee395794b..fe8e0dd4b6 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/RepositoryMethodsWithEntityGraphConfigRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/RepositoryMethodsWithEntityGraphConfigRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/RoleRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/RoleRepository.java index 1895ce863a..083e6f03fb 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/RoleRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/RoleRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/RoleRepositoryWithMeta.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/RoleRepositoryWithMeta.java index 9258d62457..2fc75192e6 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/RoleRepositoryWithMeta.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/RoleRepositoryWithMeta.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/SampleConfig.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/SampleConfig.java index 7f9ac2aab4..a319360651 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/SampleConfig.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/SampleConfig.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/SampleEvaluationContextExtension.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/SampleEvaluationContextExtension.java index 274ba7e601..a1deba7c24 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/SampleEvaluationContextExtension.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/SampleEvaluationContextExtension.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/SiteRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/SiteRepository.java index 3bbd36c434..ff5ae98e4c 100755 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/SiteRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/SiteRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2024 the original author or authors. + * Copyright 2016-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/UserRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/UserRepository.java index 060710fead..a382fa70a3 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/UserRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/UserRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/UserRepositoryCustom.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/UserRepositoryCustom.java index 485f71b8d4..86f454c0de 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/UserRepositoryCustom.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/UserRepositoryCustom.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/UserRepositoryImpl.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/UserRepositoryImpl.java index f27d136730..965834876f 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/UserRepositoryImpl.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/UserRepositoryImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/CrudMethodMetadataPopulatingMethodInterceptorUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/CrudMethodMetadataPopulatingMethodInterceptorUnitTests.java index c9bcee59a3..723c34a693 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/CrudMethodMetadataPopulatingMethodInterceptorUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/CrudMethodMetadataPopulatingMethodInterceptorUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/DefaultJpaContextIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/DefaultJpaContextIntegrationTests.java index 6b88b69bf4..6018de0c11 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/DefaultJpaContextIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/DefaultJpaContextIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2024 the original author or authors. + * Copyright 2015-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/DefaultJpaContextUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/DefaultJpaContextUnitTests.java index 1ea6993ce2..899cbd406d 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/DefaultJpaContextUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/DefaultJpaContextUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2024 the original author or authors. + * Copyright 2015-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/DefaultJpaEntityMetadataUnitTest.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/DefaultJpaEntityMetadataUnitTest.java index d874935ddb..042ffdd982 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/DefaultJpaEntityMetadataUnitTest.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/DefaultJpaEntityMetadataUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/DefaultQueryHintsTest.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/DefaultQueryHintsTest.java index fea4d697b6..c0b69d22e9 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/DefaultQueryHintsTest.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/DefaultQueryHintsTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2024 the original author or authors. + * Copyright 2018-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/DefaultTransactionDisablingIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/DefaultTransactionDisablingIntegrationTests.java index 1a8e34d1f5..f27993c8e2 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/DefaultTransactionDisablingIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/DefaultTransactionDisablingIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2024 the original author or authors. + * Copyright 2015-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EclipseLinkJpaMetamodelEntityInformationIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EclipseLinkJpaMetamodelEntityInformationIntegrationTests.java index 4922461995..c18afd1320 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EclipseLinkJpaMetamodelEntityInformationIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EclipseLinkJpaMetamodelEntityInformationIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EclipseLinkJpaRepositoryTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EclipseLinkJpaRepositoryTests.java index 34c38daa48..4892d568c1 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EclipseLinkJpaRepositoryTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EclipseLinkJpaRepositoryTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EclipseLinkProxyIdAccessorTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EclipseLinkProxyIdAccessorTests.java index eb619200c7..c7259a5b17 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EclipseLinkProxyIdAccessorTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EclipseLinkProxyIdAccessorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EntityGraphFactoryUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EntityGraphFactoryUnitTests.java index 647896ffbb..c2039fcd60 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EntityGraphFactoryUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EntityGraphFactoryUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2021-2024 the original author or authors. + * Copyright 2021-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EntityManagerBeanDefinitionRegistrarPostProcessorIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EntityManagerBeanDefinitionRegistrarPostProcessorIntegrationTests.java index a1d020423d..bf2fa3070e 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EntityManagerBeanDefinitionRegistrarPostProcessorIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EntityManagerBeanDefinitionRegistrarPostProcessorIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EntityManagerBeanDefinitionRegistrarPostProcessorUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EntityManagerBeanDefinitionRegistrarPostProcessorUnitTests.java index 8a6725a615..a34fc121fa 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EntityManagerBeanDefinitionRegistrarPostProcessorUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EntityManagerBeanDefinitionRegistrarPostProcessorUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EntityManagerFactoryRefTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EntityManagerFactoryRefTests.java index e5848bfef9..50380485a6 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EntityManagerFactoryRefTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EntityManagerFactoryRefTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EntityManagerFactoryRefUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EntityManagerFactoryRefUnitTests.java index b25682e9a8..a9ea88ad00 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EntityManagerFactoryRefUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EntityManagerFactoryRefUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/FetchableFluentQueryByPredicateUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/FetchableFluentQueryByPredicateUnitTests.java index f2c5e9f00c..295ed287c9 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/FetchableFluentQueryByPredicateUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/FetchableFluentQueryByPredicateUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/HibernateJpaMetamodelEntityInformationIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/HibernateJpaMetamodelEntityInformationIntegrationTests.java index 82824c084b..deffda2a29 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/HibernateJpaMetamodelEntityInformationIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/HibernateJpaMetamodelEntityInformationIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JavaConfigDefaultTransactionDisablingIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JavaConfigDefaultTransactionDisablingIntegrationTests.java index 0a5e0d9199..7d985c050d 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JavaConfigDefaultTransactionDisablingIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JavaConfigDefaultTransactionDisablingIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2024 the original author or authors. + * Copyright 2015-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaEntityInformationSupportUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaEntityInformationSupportUnitTests.java index e66e624b12..6b36813294 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaEntityInformationSupportUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaEntityInformationSupportUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaMetamodelEntityInformationIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaMetamodelEntityInformationIntegrationTests.java index 0f5c9ab3a7..a04a0ee1c4 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaMetamodelEntityInformationIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaMetamodelEntityInformationIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaMetamodelEntityInformationUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaMetamodelEntityInformationUnitTests.java index 1bed3b7fdf..476957a8d2 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaMetamodelEntityInformationUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaMetamodelEntityInformationUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaPersistableEntityInformationUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaPersistableEntityInformationUnitTests.java index 37050ffe89..03e8b764bb 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaPersistableEntityInformationUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaPersistableEntityInformationUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaRepositoryFactoryBeanEntityPathResolverIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaRepositoryFactoryBeanEntityPathResolverIntegrationTests.java index 73a3c76ce3..d5f1f891af 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaRepositoryFactoryBeanEntityPathResolverIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaRepositoryFactoryBeanEntityPathResolverIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2024 the original author or authors. + * Copyright 2017-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaRepositoryFactoryBeanUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaRepositoryFactoryBeanUnitTests.java index bfbbe561cb..dad06c1f9d 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaRepositoryFactoryBeanUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaRepositoryFactoryBeanUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaRepositoryFactoryUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaRepositoryFactoryUnitTests.java index 983c7c2195..4b5ad4cf3e 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaRepositoryFactoryUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaRepositoryFactoryUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaRepositoryTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaRepositoryTests.java index 27daa255a8..563c0c7a67 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaRepositoryTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaRepositoryTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/MailMessageRepositoryIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/MailMessageRepositoryIntegrationTests.java index b813ae8714..3688699d61 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/MailMessageRepositoryIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/MailMessageRepositoryIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/MutableQueryHintsUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/MutableQueryHintsUnitTests.java index e4c0c3c7c0..c47f5c5c75 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/MutableQueryHintsUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/MutableQueryHintsUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2020-2024 the original author or authors. + * Copyright 2020-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/OpenJpaJpaRepositoryTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/OpenJpaJpaRepositoryTests.java index 10440974b2..dd8a85fce2 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/OpenJpaJpaRepositoryTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/OpenJpaJpaRepositoryTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/OpenJpaMetamodelEntityInformationIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/OpenJpaMetamodelEntityInformationIntegrationTests.java index 70a8e8ed87..5c0a0600dd 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/OpenJpaMetamodelEntityInformationIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/OpenJpaMetamodelEntityInformationIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/OpenJpaProxyIdAccessorTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/OpenJpaProxyIdAccessorTests.java index 6162daab39..54372525c8 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/OpenJpaProxyIdAccessorTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/OpenJpaProxyIdAccessorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/QSimpleEntityPathResolverUnitTests_Sample.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/QSimpleEntityPathResolverUnitTests_Sample.java index 2f33aaafd0..773d82abbe 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/QSimpleEntityPathResolverUnitTests_Sample.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/QSimpleEntityPathResolverUnitTests_Sample.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/QuerydslIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/QuerydslIntegrationTests.java index 2c71c33483..4a59ea90a4 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/QuerydslIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/QuerydslIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/QuerydslJpaPredicateExecutorUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/QuerydslJpaPredicateExecutorUnitTests.java index 7962695b6a..559bc0f2af 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/QuerydslJpaPredicateExecutorUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/QuerydslJpaPredicateExecutorUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/QuerydslJpaRepositoryTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/QuerydslJpaRepositoryTests.java index 7e4778d531..ece657841b 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/QuerydslJpaRepositoryTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/QuerydslJpaRepositoryTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/QuerydslRepositorySupportIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/QuerydslRepositorySupportIntegrationTests.java index 6c400a05c4..eb411ddce3 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/QuerydslRepositorySupportIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/QuerydslRepositorySupportIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/QuerydslRepositorySupportTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/QuerydslRepositorySupportTests.java index 1eb68aa08b..4e1e1d650a 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/QuerydslRepositorySupportTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/QuerydslRepositorySupportTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/SimpleJpaRepositoryUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/SimpleJpaRepositoryUnitTests.java index 5b83077bbb..24e43d24cb 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/SimpleJpaRepositoryUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/SimpleJpaRepositoryUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/TransactionalRepositoryTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/TransactionalRepositoryTests.java index 5a29269c82..be195c947c 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/TransactionalRepositoryTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/TransactionalRepositoryTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/XmlConfigDefaultTransactionDisablingIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/XmlConfigDefaultTransactionDisablingIntegrationTests.java index df684286e9..839293c009 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/XmlConfigDefaultTransactionDisablingIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/XmlConfigDefaultTransactionDisablingIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2024 the original author or authors. + * Copyright 2015-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/support/ClasspathScanningPersistenceUnitPostProcessorUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/support/ClasspathScanningPersistenceUnitPostProcessorUnitTests.java index 9e60043821..e60565e8c8 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/support/ClasspathScanningPersistenceUnitPostProcessorUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/support/ClasspathScanningPersistenceUnitPostProcessorUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/support/EntityManagerTestUtils.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/support/EntityManagerTestUtils.java index 013857d487..479c69c015 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/support/EntityManagerTestUtils.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/support/EntityManagerTestUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/support/MergingPersistenceUnitManagerUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/support/MergingPersistenceUnitManagerUnitTests.java index 495c89d71f..4233d685fb 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/support/MergingPersistenceUnitManagerUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/support/MergingPersistenceUnitManagerUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/support/ProxyImageNameSubstitutor.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/support/ProxyImageNameSubstitutor.java index 24fde9888a..89e64a3024 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/support/ProxyImageNameSubstitutor.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/support/ProxyImageNameSubstitutor.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2024 the original author or authors. + * Copyright 2015-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/BooleanExecutionCondition.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/BooleanExecutionCondition.java index bd617cb557..590d92d4d0 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/BooleanExecutionCondition.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/BooleanExecutionCondition.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 the original author or authors. + * Copyright 2024-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/ClassPathExclusions.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/ClassPathExclusions.java index aa25c22739..f53d4d6ce4 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/ClassPathExclusions.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/ClassPathExclusions.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 the original author or authors. + * Copyright 2024-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/ClassPathExclusionsExtension.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/ClassPathExclusionsExtension.java index 46dcd05fb5..b8d76f9285 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/ClassPathExclusionsExtension.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/ClassPathExclusionsExtension.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 the original author or authors. + * Copyright 2024-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/DisabledOnHibernate.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/DisabledOnHibernate.java index 0ee4e25989..cdae0ff329 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/DisabledOnHibernate.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/DisabledOnHibernate.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2024 the original author or authors. + * Copyright 2015-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/DisabledOnHibernateCondition.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/DisabledOnHibernateCondition.java index 804309544f..21e2c87b2d 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/DisabledOnHibernateCondition.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/DisabledOnHibernateCondition.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 the original author or authors. + * Copyright 2024-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/DisabledOnHibernateConditionTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/DisabledOnHibernateConditionTests.java index 15a977cb5f..80750aeb5d 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/DisabledOnHibernateConditionTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/DisabledOnHibernateConditionTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 the original author or authors. + * Copyright 2024-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/FixedDate.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/FixedDate.java index 377874e48c..a6e2800784 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/FixedDate.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/FixedDate.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2024 the original author or authors. + * Copyright 2015-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/HidingClassLoader.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/HidingClassLoader.java index ce60e381e2..2ed67c83f1 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/HidingClassLoader.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/HidingClassLoader.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2024 the original author or authors. + * Copyright 2017-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/JpaMetamodelCacheCleanupIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/JpaMetamodelCacheCleanupIntegrationTests.java index 19f03a9225..65cb8ea1ad 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/JpaMetamodelCacheCleanupIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/JpaMetamodelCacheCleanupIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2024 the original author or authors. + * Copyright 2018-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/JpaMetamodelUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/JpaMetamodelUnitTests.java index a4cd6592bf..73102d6d03 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/JpaMetamodelUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/JpaMetamodelUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2024 the original author or authors. + * Copyright 2018-2025 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. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/PackageExcludingClassLoader.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/PackageExcludingClassLoader.java index b768c90fd4..b5c8ed5216 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/PackageExcludingClassLoader.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/PackageExcludingClassLoader.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 the original author or authors. + * Copyright 2024-2025 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. diff --git a/src/main/antora/modules/ROOT/pages/index.adoc b/src/main/antora/modules/ROOT/pages/index.adoc index 83a6f4ac77..4f9d18adce 100644 --- a/src/main/antora/modules/ROOT/pages/index.adoc +++ b/src/main/antora/modules/ROOT/pages/index.adoc @@ -15,7 +15,7 @@ Upgrade Notes, Supported Versions, additional cross-version information. Oliver Gierke, Thomas Darimont, Christoph Strobl, Mark Paluch, Jay Bryant, Greg Turnquist -(C) 2008-2024 VMware, Inc. +(C) 2008-2025 VMware, Inc. Copies of this document may be made for your own use and for distribution to others, provided that you do not charge any fee for such copies and further provided that each copy contains this Copyright Notice, whether distributed in print or electronically. From 9075727338a33cad1365936ed1dca24c05818cf7 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Thu, 9 Jan 2025 12:37:06 +0100 Subject: [PATCH 26/87] Add HQL support for JDBC literals. Closes #3739 --- .../data/jpa/repository/query/Hql.g4 | 192 +++++++- .../repository/query/HqlQueryRenderer.java | 409 ++++++++++++++++-- .../jpa/repository/query/QueryTokens.java | 1 + .../query/HqlQueryRendererTests.java | 30 ++ 4 files changed, 581 insertions(+), 51 deletions(-) diff --git a/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Hql.g4 b/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Hql.g4 index 4b0bb9a14c..2c79fc040b 100644 --- a/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Hql.g4 +++ b/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Hql.g4 @@ -314,8 +314,10 @@ literal | NULL | booleanLiteral | numericLiteral - | dateTimeLiteral | binaryLiteral + | temporalLiteral + | arrayLiteral + | generalizedLiteral ; // https://docs.jboss.org/hibernate/orm/6.1/userguide/html_single/Hibernate_User_Guide.html#hql-boolean-literals @@ -326,30 +328,157 @@ booleanLiteral // https://docs.jboss.org/hibernate/orm/6.1/userguide/html_single/Hibernate_User_Guide.html#hql-numeric-literals numericLiteral - : INTEGER_LITERAL - | LONG_LITERAL - | BIG_INTEGER_LITERAL - | FLOAT_LITERAL - | DOUBLE_LITERAL - | BIG_DECIMAL_LITERAL - | HEX_LITERAL - ; + : INTEGER_LITERAL + | LONG_LITERAL + | BIG_INTEGER_LITERAL + | FLOAT_LITERAL + | DOUBLE_LITERAL + | BIG_DECIMAL_LITERAL + | HEX_LITERAL + ; // https://docs.jboss.org/hibernate/orm/6.1/userguide/html_single/Hibernate_User_Guide.html#hql-datetime-literals +/** + * A literal datetime, in braces, or with the 'datetime' keyword + */ dateTimeLiteral - : LOCAL_DATE - | LOCAL_TIME - | LOCAL_DATETIME - | CURRENT_DATE - | CURRENT_TIME - | CURRENT_TIMESTAMP - | OFFSET_DATETIME - | (LOCAL | CURRENT) DATE - | (LOCAL | CURRENT) TIME - | (LOCAL | CURRENT | OFFSET) DATETIME - | INSTANT + : localDateTimeLiteral + | zonedDateTimeLiteral + | offsetDateTimeLiteral + ; + +localDateTimeLiteral + : '(' localDateTime ')' + | LOCAL? DATETIME localDateTime + ; + +zonedDateTimeLiteral + : '(' zonedDateTime ')' + | ZONED? DATETIME zonedDateTime + ; + +offsetDateTimeLiteral + : '(' offsetDateTime ')' + | OFFSET? DATETIME offsetDateTimeWithMinutes + ; +/** + * A literal date, in braces, or with the 'date' keyword + */ +dateLiteral + : '(' date ')' + | LOCAL? DATE date ; +/** + * A literal time, in braces, or with the 'time' keyword + */ +timeLiteral + : '(' time ')' + | LOCAL? TIME time + ; + +/** + * A literal datetime + */ + dateTime + : localDateTime + | zonedDateTime + | offsetDateTime + ; + +localDateTime + : date time + ; + +zonedDateTime + : date time zoneId + ; + +offsetDateTime + : date time offset + ; + +offsetDateTimeWithMinutes + : date time offsetWithMinutes + ; + +/** + * A JDBC-style timestamp escape, as required by JPQL + */ +jdbcTimestampLiteral + : TIMESTAMP_ESCAPE_START (dateTime | genericTemporalLiteralText) '}' + ; + +/** + * A JDBC-style date escape, as required by JPQL + */ +jdbcDateLiteral + : DATE_ESCAPE_START (date | genericTemporalLiteralText) '}' + ; + +/** + * A JDBC-style time escape, as required by JPQL + */ +jdbcTimeLiteral + : TIME_ESCAPE_START (time | genericTemporalLiteralText) '}' + ; + +genericTemporalLiteralText + : STRING_LITERAL + ; + +/** + * A generic format for specifying literal values of arbitary types + */ +arrayLiteral + : '[' (expression (',' expression)*)? ']' + ; + +/** + * A generic format for specifying literal values of arbitary types + */ +generalizedLiteral + : '(' generalizedLiteralType ':' generalizedLiteralText ')' + ; + +generalizedLiteralType : STRING_LITERAL; +generalizedLiteralText : STRING_LITERAL; + +/** + * A literal date + */ +date + : year '-' month '-' day + ; + +/** + * A literal time + */ +time + : hour ':' minute (':' second)? + ; + +/** + * A literal offset + */ +offset + : (PLUS | MINUS) hour (':' minute)? + ; + +offsetWithMinutes + : (PLUS | MINUS) hour ':' minute + ; + +year: INTEGER_LITERAL; +month: INTEGER_LITERAL; +day: INTEGER_LITERAL; +hour: INTEGER_LITERAL; +minute: INTEGER_LITERAL; +second: INTEGER_LITERAL | DOUBLE_LITERAL; +zoneId + : IDENTIFIER ('/' IDENTIFIER)? + | STRING_LITERAL; + /** * A field that may be extracted from a date, time, or datetime */ @@ -402,8 +531,17 @@ binaryLiteral | '{' HEX_LITERAL (',' HEX_LITERAL)* '}' ; -// https://docs.jboss.org/hibernate/orm/6.1/userguide/html_single/Hibernate_User_Guide.html#hql-enum-literals -// TBD +/** + * A literal date, time, or datetime, in HQL syntax, or as a JDBC-style "escape" syntax + */ +temporalLiteral + : dateTimeLiteral + | dateLiteral + | timeLiteral + | jdbcTimestampLiteral + | jdbcDateLiteral + | jdbcTimeLiteral + ; // https://docs.jboss.org/hibernate/orm/6.1/userguide/html_single/Hibernate_User_Guide.html#hql-java-constants // TBD @@ -1685,6 +1823,16 @@ BINARY_LITERAL : [xX] '\'' HEX_DIGIT+ '\'' | [xX] '"' HEX_DIGIT+ '"' ; +// ESCAPE start tokens +TIMESTAMP_ESCAPE_START : '{ts'; +DATE_ESCAPE_START : '{d'; +TIME_ESCAPE_START : '{t'; + +PLUS : '+'; +MINUS : '-'; + + + fragment LETTER : [a-zA-Z\u0080-\ufffe_$]; diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryRenderer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryRenderer.java index ee47787b0d..26a4b775c8 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryRenderer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryRenderer.java @@ -1038,8 +1038,12 @@ public QueryTokenStream visitLiteral(HqlParser.LiteralContext ctx) { return QueryRendererBuilder.from(QueryTokens.expression(ctx.STRING_LITERAL())); } else if (ctx.numericLiteral() != null) { return visit(ctx.numericLiteral()); - } else if (ctx.dateTimeLiteral() != null) { - return visit(ctx.dateTimeLiteral()); + } else if (ctx.temporalLiteral() != null) { + return visit(ctx.temporalLiteral()); + } else if (ctx.arrayLiteral() != null) { + return visit(ctx.arrayLiteral()); + } else if (ctx.generalizedLiteral() != null) { + return visit(ctx.generalizedLiteral()); } else if (ctx.binaryLiteral() != null) { return visit(ctx.binaryLiteral()); } else { @@ -1084,48 +1088,365 @@ public QueryTokenStream visitNumericLiteral(HqlParser.NumericLiteralContext ctx) @Override public QueryTokenStream visitDateTimeLiteral(HqlParser.DateTimeLiteralContext ctx) { - QueryRendererBuilder builder = QueryRenderer.builder(); + if (ctx.localDateTimeLiteral() != null) { + return visit(ctx.localDateTimeLiteral()); + } - if (ctx.LOCAL_DATE() != null) { - builder.append(QueryTokens.expression(ctx.LOCAL_DATE())); - } else if (ctx.LOCAL_TIME() != null) { - builder.append(QueryTokens.expression(ctx.LOCAL_TIME())); - } else if (ctx.LOCAL_DATETIME() != null) { - builder.append(QueryTokens.expression(ctx.LOCAL_DATETIME())); - } else if (ctx.CURRENT_DATE() != null) { - builder.append(QueryTokens.expression(ctx.CURRENT_DATE())); - } else if (ctx.CURRENT_TIME() != null) { - builder.append(QueryTokens.expression(ctx.CURRENT_TIME())); - } else if (ctx.CURRENT_TIMESTAMP() != null) { - builder.append(QueryTokens.expression(ctx.CURRENT_TIMESTAMP())); - } else if (ctx.OFFSET_DATETIME() != null) { - builder.append(QueryTokens.expression(ctx.OFFSET_DATETIME())); - } else { + if (ctx.offsetDateTimeLiteral() != null) { + return visit(ctx.offsetDateTimeLiteral()); + } + + if (ctx.zonedDateTimeLiteral() != null) { + return visit(ctx.zonedDateTimeLiteral()); + } + return QueryTokenStream.empty(); + } + + @Override + public QueryTokenStream visitLocalDateTimeLiteral(HqlParser.LocalDateTimeLiteralContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + + if (ctx.DATETIME() != null) { if (ctx.LOCAL() != null) { builder.append(QueryTokens.expression(ctx.LOCAL())); - } else if (ctx.CURRENT() != null) { - builder.append(QueryTokens.expression(ctx.CURRENT())); - } else if (ctx.OFFSET() != null) { + } + builder.append(QueryTokens.expression(ctx.DATETIME())); + builder.append(visit(ctx.localDateTime())); + } else { + builder.append(TOKEN_OPEN_PAREN); + builder.append(visit(ctx.localDateTime())); + builder.append(TOKEN_CLOSE_PAREN); + } + + return builder; + } + + @Override + public QueryTokenStream visitZonedDateTimeLiteral(HqlParser.ZonedDateTimeLiteralContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + + if (ctx.DATETIME() != null) { + if (ctx.ZONED() != null) { + builder.append(QueryTokens.expression(ctx.ZONED())); + } + builder.append(QueryTokens.expression(ctx.DATETIME())); + builder.append(visit(ctx.zonedDateTime())); + } else { + builder.append(TOKEN_OPEN_PAREN); + builder.append(visit(ctx.zonedDateTime())); + builder.append(TOKEN_CLOSE_PAREN); + } + + return builder; + } + + @Override + public QueryTokenStream visitOffsetDateTimeLiteral(HqlParser.OffsetDateTimeLiteralContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + + if (ctx.DATETIME() != null) { + if (ctx.OFFSET() != null) { builder.append(QueryTokens.expression(ctx.OFFSET())); } + builder.append(QueryTokens.expression(ctx.DATETIME())); + builder.append(visit(ctx.offsetDateTimeWithMinutes())); + } else { + builder.append(TOKEN_OPEN_PAREN); + builder.append(visit(ctx.offsetDateTime())); + builder.append(TOKEN_CLOSE_PAREN); + } - if (ctx.DATE() != null) { - builder.append(QueryTokens.expression(ctx.DATE())); - } else if (ctx.TIME() != null) { - builder.append(QueryTokens.expression(ctx.TIME())); - } else if (ctx.DATETIME() != null) { - builder.append(QueryTokens.expression(ctx.DATETIME())); + return builder; + } + + @Override + public QueryTokenStream visitDateLiteral(HqlParser.DateLiteralContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + + if (ctx.DATE() != null) { + if (ctx.LOCAL() != null) { + builder.append(QueryTokens.expression(ctx.LOCAL())); } + builder.append(QueryTokens.expression(ctx.DATE())); + builder.append(visit(ctx.date())); + } else { + builder.append(TOKEN_OPEN_PAREN); + builder.append(visit(ctx.date())); + builder.append(TOKEN_CLOSE_PAREN); + } - if (ctx.INSTANT() != null) { - builder.append(QueryTokens.expression(ctx.INSTANT())); + return builder; + } + + @Override + public QueryTokenStream visitTimeLiteral(HqlParser.TimeLiteralContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + + if (ctx.TIME() != null) { + if (ctx.LOCAL() != null) { + builder.append(QueryTokens.expression(ctx.LOCAL())); } + builder.append(QueryTokens.expression(ctx.TIME())); + builder.append(visit(ctx.time())); + } else { + builder.append(TOKEN_OPEN_PAREN); + builder.append(visit(ctx.time())); + builder.append(TOKEN_CLOSE_PAREN); + } + + return builder; + } + + @Override + public QueryTokenStream visitDateTime(HqlParser.DateTimeContext ctx) { + + if (ctx.localDateTime() != null) { + return visit(ctx.localDateTime()); + } + + if (ctx.offsetDateTime() != null) { + return visit(ctx.offsetDateTime()); + } + + if (ctx.zonedDateTime() != null) { + return visit(ctx.zonedDateTime()); + } + + return QueryTokenStream.empty(); + } + + @Override + public QueryTokenStream visitLocalDateTime(HqlParser.LocalDateTimeContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + + builder.appendExpression(visit(ctx.date())); + builder.appendExpression(visit(ctx.time())); + + return builder; + } + + @Override + public QueryTokenStream visitZonedDateTime(HqlParser.ZonedDateTimeContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + + builder.appendExpression(visit(ctx.date())); + builder.appendExpression(visit(ctx.time())); + builder.appendExpression(visit(ctx.zoneId())); + + return builder; + } + + @Override + public QueryTokenStream visitOffsetDateTime(HqlParser.OffsetDateTimeContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + + builder.appendExpression(visit(ctx.date())); + builder.appendInline(visit(ctx.time())); + builder.appendInline(visit(ctx.offset())); + + return builder; + } + + @Override + public QueryTokenStream visitOffsetDateTimeWithMinutes(HqlParser.OffsetDateTimeWithMinutesContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + + builder.appendExpression(visit(ctx.date())); + builder.appendInline(visit(ctx.time())); + builder.appendInline(visit(ctx.offsetWithMinutes())); + + return builder; + } + + @Override + public QueryTokenStream visitJdbcTimestampLiteral(HqlParser.JdbcTimestampLiteralContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + + builder.append(TOKEN_OPEN_BRACE); + builder.append(QueryTokens.token("ts")); + builder.append(visit(ctx.dateTime() != null ? ctx.dateTime() : ctx.genericTemporalLiteralText())); + builder.append(QueryTokens.TOKEN_CLOSE_BRACE); + + return builder; + } + + @Override + public QueryTokenStream visitJdbcDateLiteral(HqlParser.JdbcDateLiteralContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + + builder.append(TOKEN_OPEN_BRACE); + builder.append(QueryTokens.token("d")); + builder.append(visit(ctx.date() != null ? ctx.date() : ctx.genericTemporalLiteralText())); + builder.append(QueryTokens.TOKEN_CLOSE_BRACE); + + return builder; + } + + @Override + public QueryTokenStream visitJdbcTimeLiteral(HqlParser.JdbcTimeLiteralContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + + builder.append(TOKEN_OPEN_BRACE); + builder.append(QueryTokens.token("t")); + builder.append(visit(ctx.time() != null ? ctx.time() : ctx.genericTemporalLiteralText())); + builder.append(QueryTokens.TOKEN_CLOSE_BRACE); + + return builder; + } + + @Override + public QueryTokenStream visitGenericTemporalLiteralText(HqlParser.GenericTemporalLiteralTextContext ctx) { + return QueryRendererBuilder.from(QueryTokens.token(ctx.STRING_LITERAL())); + } + + @Override + public QueryTokenStream visitArrayLiteral(HqlParser.ArrayLiteralContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + builder.append(TOKEN_OPEN_SQUARE_BRACKET); + builder.append(QueryTokenStream.concat(ctx.expression(), this::visit, TOKEN_COMMA)); + builder.append(TOKEN_CLOSE_SQUARE_BRACKET); + + return builder; + } + + @Override + public QueryTokenStream visitGeneralizedLiteral(HqlParser.GeneralizedLiteralContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + builder.append(TOKEN_OPEN_PAREN); + builder.append(visit(ctx.generalizedLiteralType())); + builder.append(TOKEN_COLON); + builder.append(visit(ctx.generalizedLiteralText())); + builder.append(TOKEN_CLOSE_PAREN); + + return builder; + } + + @Override + public QueryTokenStream visitGeneralizedLiteralType(HqlParser.GeneralizedLiteralTypeContext ctx) { + return QueryRendererBuilder.from(QueryTokens.token(ctx.STRING_LITERAL())); + } + + @Override + public QueryTokenStream visitGeneralizedLiteralText(HqlParser.GeneralizedLiteralTextContext ctx) { + return QueryRendererBuilder.from(QueryTokens.token(ctx.STRING_LITERAL())); + } + + @Override + public QueryTokenStream visitDate(HqlParser.DateContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + builder.append(visit(ctx.year())); + builder.append(TOKEN_DASH); + builder.append(visit(ctx.month())); + builder.append(TOKEN_DASH); + builder.append(visit(ctx.day())); + + return builder; + } + + @Override + public QueryTokenStream visitTime(HqlParser.TimeContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + builder.append(visit(ctx.hour())); + builder.append(TOKEN_COLON); + builder.append(visit(ctx.minute())); + + if (ctx.second() != null) { + builder.append(TOKEN_COLON); + builder.append(visit(ctx.second())); + } + + return builder; + } + + @Override + public QueryTokenStream visitOffset(HqlParser.OffsetContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + if (ctx.MINUS() != null) { + builder.append(QueryTokens.token(ctx.MINUS())); + } else if (ctx.PLUS() != null) { + builder.append(QueryTokens.token(ctx.PLUS())); + } + builder.append(visit(ctx.hour())); + + if (ctx.minute() != null) { + builder.append(TOKEN_COLON); + builder.append(visit(ctx.minute())); + } + + return builder; + } + + @Override + public QueryTokenStream visitOffsetWithMinutes(HqlParser.OffsetWithMinutesContext ctx) { + + QueryRendererBuilder builder = QueryRenderer.builder(); + + if (ctx.MINUS() != null) { + builder.append(QueryTokens.token(ctx.MINUS())); + } else if (ctx.PLUS() != null) { + builder.append(QueryTokens.token(ctx.PLUS())); } + builder.append(visit(ctx.hour())); + builder.append(TOKEN_COLON); + builder.append(visit(ctx.minute())); + return builder; } + @Override + public QueryTokenStream visitYear(HqlParser.YearContext ctx) { + return QueryRendererBuilder.from(QueryTokens.token(ctx.INTEGER_LITERAL())); + } + + @Override + public QueryTokenStream visitMonth(HqlParser.MonthContext ctx) { + return QueryRendererBuilder.from(QueryTokens.token(ctx.INTEGER_LITERAL())); + } + + @Override + public QueryTokenStream visitDay(HqlParser.DayContext ctx) { + return QueryRendererBuilder.from(QueryTokens.token(ctx.INTEGER_LITERAL())); + } + + @Override + public QueryTokenStream visitHour(HqlParser.HourContext ctx) { + return QueryRendererBuilder.from(QueryTokens.token(ctx.INTEGER_LITERAL())); + } + + @Override + public QueryTokenStream visitMinute(HqlParser.MinuteContext ctx) { + return QueryRendererBuilder.from(QueryTokens.token(ctx.INTEGER_LITERAL())); + } + + @Override + public QueryTokenStream visitSecond(HqlParser.SecondContext ctx) { + return QueryRendererBuilder.from(QueryTokens.token(ctx.INTEGER_LITERAL())); + } + + @Override + public QueryTokenStream visitZoneId(HqlParser.ZoneIdContext ctx) { + return QueryRendererBuilder.from(QueryTokens.token(ctx.STRING_LITERAL())); + } + @Override public QueryTokenStream visitDatetimeField(HqlParser.DatetimeFieldContext ctx) { @@ -1250,6 +1571,36 @@ public QueryTokenStream visitBinaryLiteral(HqlParser.BinaryLiteralContext ctx) { return builder; } + @Override + public QueryTokenStream visitTemporalLiteral(HqlParser.TemporalLiteralContext ctx) { + + if (ctx.dateTimeLiteral() != null) { + return visit(ctx.dateTimeLiteral()); + } + + if (ctx.dateLiteral() != null) { + return visit(ctx.dateLiteral()); + } + + if (ctx.timeLiteral() != null) { + return visit(ctx.timeLiteral()); + } + + if (ctx.jdbcTimestampLiteral() != null) { + return visit(ctx.jdbcTimestampLiteral()); + } + + if (ctx.jdbcDateLiteral() != null) { + return visit(ctx.jdbcDateLiteral()); + } + + if (ctx.jdbcTimeLiteral() != null) { + return visit(ctx.jdbcTimeLiteral()); + } + + return QueryTokenStream.empty(); + } + @Override public QueryTokenStream visitPlainPrimaryExpression(HqlParser.PlainPrimaryExpressionContext ctx) { return visit(ctx.primaryExpression()); diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryTokens.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryTokens.java index 7ce75f78d2..90295f3776 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryTokens.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryTokens.java @@ -46,6 +46,7 @@ class QueryTokens { static final QueryToken TOKEN_OPEN_SQUARE_BRACKET = token("["); static final QueryToken TOKEN_CLOSE_SQUARE_BRACKET = token("]"); static final QueryToken TOKEN_COLON = token(":"); + static final QueryToken TOKEN_DASH = token("-"); static final QueryToken TOKEN_QUESTION_MARK = token("?"); static final QueryToken TOKEN_OPEN_BRACE = token("{"); static final QueryToken TOKEN_CLOSE_BRACE = token("}"); diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryRendererTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryRendererTests.java index 6cde039b62..725e09950d 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryRendererTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryRendererTests.java @@ -1749,6 +1749,36 @@ void durationLiteralsShouldWork(String dtField) { assertQuery("SELECT ce.id as id, cd.startDate + 5 %s AS summedDate FROM CalendarEvent ce".formatted(dtField)); } + @Test // GH-3739 + void dateTimeLiterals() { + + assertQuery("SELECT e FROM Employee e WHERE e.startDate = {d'2012-01-03'}"); + assertQuery("SELECT e FROM Employee e WHERE e.startTime = {t'09:00:00'}"); + assertQuery("SELECT e FROM Employee e WHERE e.version = {ts'2012-01-03 09:00:00'}"); + assertQuery("SELECT e FROM Employee e WHERE e.version = {ts'something weird'}"); + assertQuery("SELECT e FROM Employee e WHERE e.version = {ts2012-01-03 09:00:00+1}"); + assertQuery("SELECT e FROM Employee e WHERE e.version = {ts2012-01-03 09:00:00-1}"); + assertQuery("SELECT e FROM Employee e WHERE e.version = {ts2012-01-03 09:00:00+1:00}"); + assertQuery("SELECT e FROM Employee e WHERE e.version = {ts2012-01-03 09:00:00-1:00}"); + + assertQuery("SELECT e FROM Employee e WHERE e.version = OFFSET DATETIME 2012-01-03 09:00:00+1:01"); + assertQuery("SELECT e FROM Employee e WHERE e.version = OFFSET DATETIME 2012-01-03 09:00:00-1:01"); + } + + @Test + void literals() { + + assertQuery("SELECT e FROM Employee e WHERE e.name = 'Bob'"); + assertQuery("SELECT e FROM Employee e WHERE e.names = [e.firstName, e.lastName]"); + assertQuery("SELECT e FROM Employee e WHERE e.id = 1234"); + assertQuery("SELECT e FROM Employee e WHERE e.id = 1234L"); + assertQuery("SELECT s FROM Stat s WHERE s.ratio > 3.14F"); + assertQuery("SELECT s FROM Stat s WHERE s.ratio > 3.14e32D"); + assertQuery("SELECT e FROM Employee e WHERE e.active = TRUE"); + assertQuery("SELECT e FROM Employee e WHERE e.gender = org.acme.Gender.MALE"); + assertQuery("UPDATE Employee e SET e.manager = NULL WHERE e.manager = :manager"); + } + @ParameterizedTest // GH-3711 @ValueSource(strings = { "1", "1_000", "1L", "1_000L", "1bi", "1.1f", "2.2d", "2.2bd" }) void numberLiteralsShouldWork(String literal) { From 2a5f2bc2841dc3d73139b816ed294c5af302965c Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Thu, 9 Jan 2025 14:29:35 +0100 Subject: [PATCH 27/87] Polishing. Improve BadJpqlGrammarException by including the underlying grammar. --- .../query/BadJpqlGrammarErrorListener.java | 9 ++++++++- .../repository/query/BadJpqlGrammarException.java | 6 +++++- .../data/jpa/repository/query/JpaQueryEnhancer.java | 12 +++++++++--- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/BadJpqlGrammarErrorListener.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/BadJpqlGrammarErrorListener.java index 66b64a0314..a2edc2d911 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/BadJpqlGrammarErrorListener.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/BadJpqlGrammarErrorListener.java @@ -29,14 +29,21 @@ class BadJpqlGrammarErrorListener extends BaseErrorListener { private final String query; + private final String grammar; + BadJpqlGrammarErrorListener(String query) { + this(query, "JPQL"); + } + + BadJpqlGrammarErrorListener(String query, String grammar) { this.query = query; + this.grammar = grammar; } @Override public void syntaxError(Recognizer recognizer, Object offendingSymbol, int line, int charPositionInLine, String msg, RecognitionException e) { - throw new BadJpqlGrammarException("Line " + line + ":" + charPositionInLine + " " + msg, query, null); + throw new BadJpqlGrammarException("Line " + line + ":" + charPositionInLine + " " + msg, grammar, query, null); } } diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/BadJpqlGrammarException.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/BadJpqlGrammarException.java index 6cc24630ef..ab3b51b7b3 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/BadJpqlGrammarException.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/BadJpqlGrammarException.java @@ -30,7 +30,11 @@ public class BadJpqlGrammarException extends InvalidDataAccessResourceUsageExcep private final String jpql; public BadJpqlGrammarException(String message, String jpql, @Nullable Throwable cause) { - super(message + "; Bad JPQL grammar [" + jpql + "]", cause); + this(message, jpql, "JPQL", cause); + } + + BadJpqlGrammarException(String message, String grammar, String jpql, @Nullable Throwable cause) { + super(message + "; Bad " + grammar + " grammar [" + jpql + "]", cause); this.jpql = jpql; } diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryEnhancer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryEnhancer.java index 9719cbc6ae..09cb56950b 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryEnhancer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryEnhancer.java @@ -71,7 +71,13 @@ static

ParserRuleContext parse(String query, Function ParserRuleContext parse(String query, Function Date: Thu, 9 Jan 2025 13:07:55 +0100 Subject: [PATCH 28/87] Document limitations of non-supported collection attributes in Query By Example Closes #3740 --- .../antora/modules/ROOT/pages/repositories/query-by-example.adoc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/antora/modules/ROOT/pages/repositories/query-by-example.adoc b/src/main/antora/modules/ROOT/pages/repositories/query-by-example.adoc index 513ba122f0..3804f1d6c5 100644 --- a/src/main/antora/modules/ROOT/pages/repositories/query-by-example.adoc +++ b/src/main/antora/modules/ROOT/pages/repositories/query-by-example.adoc @@ -1,3 +1,4 @@ +:support-qbe-collection: false include::{commons}@data-commons::page$query-by-example.adoc[] [[query-by-example.running]] From dbe43acea9b76fa652a7e0e910433b7641447ae7 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 10 Jan 2025 10:34:04 +0100 Subject: [PATCH 29/87] Upgrade to Hibernate 6.6.4.Final. Closes #3742 --- pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 4f937df2d3..aa0fe6b6f8 100755 --- a/pom.xml +++ b/pom.xml @@ -30,9 +30,9 @@ 4.13.0 4.0.4 4.0.5-SNAPSHOT - 6.6.2.Final - 6.2.31.Final - 6.6.3-SNAPSHOT + 6.6.4.Final + 6.2.32.Final + 6.6.5-SNAPSHOT 7.0.0.Beta1 7.0.0-SNAPSHOT 2.7.4 From 3cde3ca12fcbc1bd1efb38dff87817331a37ca11 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 10 Jan 2025 10:36:16 +0100 Subject: [PATCH 30/87] Upgrade to Eclipselink 4.0.5. Closes #3743 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index aa0fe6b6f8..e36013817e 100755 --- a/pom.xml +++ b/pom.xml @@ -28,8 +28,8 @@ 4.13.0 - 4.0.4 - 4.0.5-SNAPSHOT + 4.0.5 + 4.0.6-SNAPSHOT 6.6.4.Final 6.2.32.Final 6.6.5-SNAPSHOT From b79f64da25023ba76e46ce13cf6f99a98fd10882 Mon Sep 17 00:00:00 2001 From: Christoph Strobl Date: Mon, 13 Jan 2025 15:06:24 +0100 Subject: [PATCH 31/87] Use `*` instead of primary alias in count queries with CTE. Closes #3726 Original pull request: #3730 --- .../query/HqlCountQueryTransformer.java | 11 +- .../repository/HibernateRepositoryTests.java | 123 ++++++++++++++++++ .../data/jpa/repository/UserExcerptDto.java | 48 +++++++ .../query/HqlQueryTransformerTests.java | 36 +++-- 4 files changed, 207 insertions(+), 11 deletions(-) create mode 100644 spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/HibernateRepositoryTests.java create mode 100644 spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/UserExcerptDto.java diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlCountQueryTransformer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlCountQueryTransformer.java index 31a2dd7808..0ea8649ef3 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlCountQueryTransformer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlCountQueryTransformer.java @@ -36,6 +36,7 @@ class HqlCountQueryTransformer extends HqlQueryRenderer { private final @Nullable String countProjection; private final @Nullable String primaryFromAlias; + private boolean containsCTE = false; HqlCountQueryTransformer(@Nullable String countProjection, @Nullable String primaryFromAlias) { this.countProjection = countProjection; @@ -66,6 +67,12 @@ public QueryRendererBuilder visitOrderedQuery(HqlParser.OrderedQueryContext ctx) return builder; } + @Override + public QueryTokenStream visitCte(HqlParser.CteContext ctx) { + this.containsCTE = true; + return super.visitCte(ctx); + } + @Override public QueryRendererBuilder visitFromQuery(HqlParser.FromQueryContext ctx) { @@ -189,7 +196,9 @@ public QueryTokenStream visitSelectClause(HqlParser.SelectClauseContext ctx) { nested.append(QueryTokens.expression(ctx.DISTINCT())); nested.append(getDistinctCountSelection(visit(ctx.selectionList()))); } else { - nested.append(QueryTokens.token(primaryFromAlias)); + + // with CTE primary alias fails with hibernate (WITH entities AS (…) SELECT count(c) FROM entities c) + nested.append(containsCTE ? QueryTokens.token("*") : QueryTokens.token(primaryFromAlias)); } } else { builder.append(QueryTokens.token(countProjection)); diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/HibernateRepositoryTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/HibernateRepositoryTests.java new file mode 100644 index 0000000000..5f965f203e --- /dev/null +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/HibernateRepositoryTests.java @@ -0,0 +1,123 @@ +/* + * Copyright 2025 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. + * You may obtain a copy of the License at + * + * https://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, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.data.jpa.repository; + +import static org.assertj.core.api.Assertions.*; +import static org.assertj.core.api.Assumptions.*; + +import jakarta.persistence.EntityManager; + +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.FilterType; +import org.springframework.context.annotation.ImportResource; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageRequest; +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.domain.sample.Role; +import org.springframework.data.jpa.domain.sample.User; +import org.springframework.data.jpa.provider.PersistenceProvider; +import org.springframework.data.jpa.repository.config.EnableJpaRepositories; +import org.springframework.data.jpa.repository.sample.RoleRepository; +import org.springframework.data.jpa.repository.sample.UserRepository; +import org.springframework.data.repository.CrudRepository; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit.jupiter.SpringExtension; +import org.springframework.transaction.annotation.Transactional; + +/** + * Hibernate-specific repository tests. + * + * @author Mark Paluch + */ +@ExtendWith(SpringExtension.class) +@ContextConfiguration() +@Transactional +class HibernateRepositoryTests { + + @Autowired UserRepository userRepository; + @Autowired RoleRepository roleRepository; + @Autowired CteUserRepository cteUserRepository; + @Autowired EntityManager em; + + PersistenceProvider provider; + User dave; + User carter; + User oliver; + Role drummer; + Role guitarist; + Role singer; + + @BeforeEach + void setUp() { + provider = PersistenceProvider.fromEntityManager(em); + + assumeThat(provider).isEqualTo(PersistenceProvider.HIBERNATE); + roleRepository.deleteAll(); + userRepository.deleteAll(); + + drummer = roleRepository.save(new Role("DRUMMER")); + guitarist = roleRepository.save(new Role("GUITARIST")); + singer = roleRepository.save(new Role("SINGER")); + + dave = userRepository.save(new User("Dave", "Matthews", "dave@dmband.com", singer)); + carter = userRepository.save(new User("Carter", "Beauford", "carter@dmband.com", singer, drummer)); + oliver = userRepository.save(new User("Oliver August", "Matthews", "oliver@dmband.com")); + } + + @Test // GH-3726 + void testQueryWithCTE() { + + Page result = cteUserRepository.findWithCTE(PageRequest.of(0, 1)); + assertThat(result.getTotalElements()).isEqualTo(3); + } + + @ImportResource({ "classpath:infrastructure.xml" }) + @Configuration + @EnableJpaRepositories(basePackageClasses = HibernateRepositoryTests.class, considerNestedRepositories = true, + includeFilters = @ComponentScan.Filter( + classes = { CteUserRepository.class, UserRepository.class, RoleRepository.class }, + type = FilterType.ASSIGNABLE_TYPE)) + static class TestConfig {} + + interface CteUserRepository extends CrudRepository { + + /* + WITH entities AS ( + SELECT + e.id as id, + e.number as number + FROM TestEntity e + ) + SELECT new com.example.demo.Result('X', c.id, c.number) + FROM entities c + */ + + @Query(""" + WITH cte_select AS (select u.firstname as firstname, u.lastname as lastname from User u) + SELECT new org.springframework.data.jpa.repository.UserExcerptDto(c.firstname, c.lastname) + FROM cte_select c + """) + Page findWithCTE(Pageable page); + + } + +} diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/UserExcerptDto.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/UserExcerptDto.java new file mode 100644 index 0000000000..dad70a9a2c --- /dev/null +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/UserExcerptDto.java @@ -0,0 +1,48 @@ +/* + * Copyright 2025 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. + * You may obtain a copy of the License at + * + * https://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, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.data.jpa.repository; + +/** + * Hibernate is still a bit picky on records so let's use a class, just in case. + * + * @author Christoph Strobl + */ +public class UserExcerptDto { + + private String firstname; + private String lastname; + + public UserExcerptDto(String firstname, String lastname) { + this.firstname = firstname; + this.lastname = lastname; + } + + public String getFirstname() { + return firstname; + } + + public void setFirstname(String firstname) { + this.firstname = firstname; + } + + public String getLastname() { + return lastname; + } + + public void setLastname(String lastname) { + this.lastname = lastname; + } +} diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryTransformerTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryTransformerTests.java index fab16a9e0f..979fb0fe5d 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryTransformerTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryTransformerTests.java @@ -86,13 +86,11 @@ void nullFirstLastSorting() { assertThat(createQueryFor(original, Sort.unsorted())).isEqualTo(original); - assertThat(createQueryFor(original, Sort.by(Order.desc("lastName").nullsLast()))) - .startsWith(original) - .endsWithIgnoringCase("e.lastName DESC NULLS LAST"); + assertThat(createQueryFor(original, Sort.by(Order.desc("lastName").nullsLast()))).startsWith(original) + .endsWithIgnoringCase("e.lastName DESC NULLS LAST"); - assertThat(createQueryFor(original, Sort.by(Order.desc("lastName").nullsFirst()))) - .startsWith(original) - .endsWithIgnoringCase("e.lastName DESC NULLS FIRST"); + assertThat(createQueryFor(original, Sort.by(Order.desc("lastName").nullsFirst()))).startsWith(original) + .endsWithIgnoringCase("e.lastName DESC NULLS FIRST"); } @Test @@ -151,6 +149,24 @@ void applyCountToAlreadySortedQuery() { assertThat(results).isEqualTo("SELECT count(e) FROM Employee e where e.name = :name"); } + @Test // GH-3726 + void shouldCreateCountQueryForCTE() { + + // given + var original = """ + WITH cte_select AS (select u.firstname as firstname, u.lastname as lastname from User u) + SELECT new org.springframework.data.jpa.repository.sample.UserExcerptDto(c.firstname, c.lastname) + FROM cte_select c + """; + + // when + var results = createCountQueryFor(original); + + // then + assertThat(results).isEqualToIgnoringWhitespace( + "WITH cte_select AS (select u.firstname as firstname, u.lastname as lastname from User u) SELECT count(*) FROM cte_select c"); + } + @Test void multipleAliasesShouldBeGathered() { @@ -539,7 +555,7 @@ WITH maxId AS(select max(sr.snapshot.id) snapshotId from SnapshotReference sr """); assertThat(countQuery).startsWith("WITH maxId AS (select max(sr.snapshot.id) snapshotId from SnapshotReference sr") - .endsWith("select count(m) from maxId m join SnapshotReference sr on sr.snapshot.id = m.snapshotId"); + .endsWith("select count(*) from maxId m join SnapshotReference sr on sr.snapshot.id = m.snapshotId"); } @Test // GH-3504 @@ -1039,8 +1055,7 @@ select max(id), col """, """ delete MyEntity AS mes where mes.col = 'test' - """ - }) // GH-2977, GH-3649 + """ }) // GH-2977, GH-3649 void isSubqueryThrowsException(String query) { assertThat(createQueryFor(query, Sort.unsorted())).isEqualToIgnoringWhitespace(query); } @@ -1101,7 +1116,8 @@ void createsCountQueryUsingAliasCorrectly() { "select count(distinct a, b, sum(amount), d) from Employee AS __ GROUP BY n"); assertCountQuery("select distinct a, count(b) as c from Employee GROUP BY n", "select count(distinct a, count(b)) from Employee AS __ GROUP BY n"); - assertCountQuery("select distinct substring(e.firstname, 1, position('a' in e.lastname)) as x from from Employee", "select count(distinct substring(e.firstname, 1, position('a' in e.lastname))) from from Employee"); + assertCountQuery("select distinct substring(e.firstname, 1, position('a' in e.lastname)) as x from from Employee", + "select count(distinct substring(e.firstname, 1, position('a' in e.lastname))) from from Employee"); } @Test // GH-3427 From b4cb5b55ca61f787834fda6dd56d15fdc2798b58 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Tue, 14 Jan 2025 10:35:26 +0100 Subject: [PATCH 32/87] Retain selection columns on query transformation without entity alias. Closes #3744 --- .../query/HqlCountQueryTransformer.java | 31 +++++++++++++------ .../query/QueryEnhancerTckTests.java | 4 +++ 2 files changed, 26 insertions(+), 9 deletions(-) diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlCountQueryTransformer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlCountQueryTransformer.java index 0ea8649ef3..a19f971af3 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlCountQueryTransformer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlCountQueryTransformer.java @@ -132,11 +132,6 @@ public QueryRendererBuilder visitFromRoot(HqlParser.FromRootContext ctx) { if (ctx.variable() != null) { builder.appendExpression(visit(ctx.variable())); - - } else { - - builder.append(TOKEN_AS); - builder.append(TOKEN_DOUBLE_UNDERSCORE); } } else if (ctx.subquery() != null) { @@ -191,14 +186,26 @@ public QueryTokenStream visitSelectClause(HqlParser.SelectClauseContext ctx) { boolean usesDistinct = ctx.DISTINCT() != null; QueryRendererBuilder nested = QueryRenderer.builder(); if (countProjection == null) { + QueryTokenStream selection = visit(ctx.selectionList()); if (usesDistinct) { nested.append(QueryTokens.expression(ctx.DISTINCT())); - nested.append(getDistinctCountSelection(visit(ctx.selectionList()))); + nested.append(getDistinctCountSelection(selection)); } else { // with CTE primary alias fails with hibernate (WITH entities AS (…) SELECT count(c) FROM entities c) - nested.append(containsCTE ? QueryTokens.token("*") : QueryTokens.token(primaryFromAlias)); + if (containsCTE) { + nested.append(QueryTokens.token("*")); + } else { + + if (selection.size() == 1) { + nested.append(selection); + } else if (primaryFromAlias != null) { + nested.append(QueryTokens.token(primaryFromAlias)); + } else { + nested.append(QueryTokens.token("*")); + } + } } } else { builder.append(QueryTokens.token(countProjection)); @@ -249,6 +256,7 @@ public QueryRendererBuilder visitQueryOrder(HqlParser.QueryOrderContext ctx) { } private QueryRendererBuilder visitSubQuerySelectClause(SelectClauseContext ctx, QueryRendererBuilder builder) { + if (ctx.DISTINCT() != null) { builder.append(QueryTokens.expression(ctx.DISTINCT())); } @@ -263,8 +271,13 @@ private QueryRendererBuilder getDistinctCountSelection(QueryTokenStream selectio CountSelectionTokenStream countSelection = CountSelectionTokenStream.create(selectionListbuilder); if (countSelection.requiresPrimaryAlias()) { - // constructor - nested.append(QueryTokens.token(primaryFromAlias)); + + if (primaryFromAlias != null) { + // constructor + nested.append(QueryTokens.token(primaryFromAlias)); + } else { + nested.append(countSelection.withoutConstructorExpression()); + } } else { // keep all the select items to distinct against nested.append(selectionListbuilder); diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryEnhancerTckTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryEnhancerTckTests.java index cd5982a1ca..077d469177 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryEnhancerTckTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryEnhancerTckTests.java @@ -68,6 +68,10 @@ static Stream nativeCountQueries() { "select u from User as u", // "select count(u) from User as u"), + Arguments.of( // + "SELECT id FROM Person", // + "select count(id) from Person"), + Arguments.of( // "SELECT u FROM User u where u.foo.bar = ?", // "select count(u) FROM User u where u.foo.bar = ?"), From 036342f3294163d970fe5fad9d3a49b33f7f44df Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Tue, 14 Jan 2025 10:36:11 +0100 Subject: [PATCH 33/87] Polishing. Revisit DISTINCT count queries when primary alias isn't set. HQL can handle such queries, JPQL and EQL transformers now fail properly. See #3744 --- .../query/EqlCountQueryTransformer.java | 4 +++ .../query/JpqlCountQueryTransformer.java | 4 +++ .../repository/query/QueryTransformers.java | 36 +++++++++++++++++++ .../query/HqlQueryTransformerTests.java | 24 +++++++++---- 4 files changed, 61 insertions(+), 7 deletions(-) diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlCountQueryTransformer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlCountQueryTransformer.java index 498a499ad8..55ae8b0bd6 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlCountQueryTransformer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlCountQueryTransformer.java @@ -100,6 +100,10 @@ private QueryRendererBuilder getDistinctCountSelection(QueryTokenStream selectio if (countSelection.requiresPrimaryAlias()) { // constructor + if (primaryFromAlias == null) { + throw new IllegalStateException( + "Primary alias must be set for DISTINCT count selection using constructor expressions"); + } nested.append(QueryTokens.token(primaryFromAlias)); } else { // keep all the select items to distinct against diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpqlCountQueryTransformer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpqlCountQueryTransformer.java index e83059b1c6..eaecd6e73d 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpqlCountQueryTransformer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpqlCountQueryTransformer.java @@ -100,6 +100,10 @@ private QueryRendererBuilder getDistinctCountSelection(QueryTokenStream selectio if (countSelection.requiresPrimaryAlias()) { // constructor + if (primaryFromAlias == null) { + throw new IllegalStateException( + "Primary alias must be set for DISTINCT count selection using constructor expressions"); + } nested.append(QueryTokens.token(primaryFromAlias)); } else { // keep all the select items to distinct against diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryTransformers.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryTransformers.java index bcc939f4d8..a76749bc69 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryTransformers.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryTransformers.java @@ -71,6 +71,42 @@ static CountSelectionTokenStream create(QueryTokenStream selection) { return new CountSelectionTokenStream(target, containsNew); } + /** + * Filter constructor expression and return the selection list of the constructor. + * + * @return the selection list of the constructor without {@code NEW}, class name, and the first level of + * parentheses. + * @since 3.5.2 + */ + public CountSelectionTokenStream withoutConstructorExpression() { + + if (!requiresPrimaryAlias()) { + return this; + } + + List target = new ArrayList<>(size()); + int nestingLevel = 0; + + for (QueryToken token : this) { + + if (token.equals(TOKEN_OPEN_PAREN)) { + nestingLevel++; + continue; + } + + if (token.equals(TOKEN_CLOSE_PAREN)) { + nestingLevel--; + continue; + } + + if (nestingLevel > 0) { + target.add(token); + } + } + + return new CountSelectionTokenStream(target, requiresPrimaryAlias()); + } + @Override public Iterator iterator() { return tokens.iterator(); diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryTransformerTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryTransformerTests.java index 979fb0fe5d..867e3f87b2 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryTransformerTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryTransformerTests.java @@ -41,6 +41,7 @@ * * @author Greg Turnquist * @author Christoph Strobl + * @author Mark Paluch */ class HqlQueryTransformerTests { @@ -182,6 +183,12 @@ void multipleAliasesShouldBeGathered() { @Test void createsCountQueryCorrectly() { + + assertCountQuery("SELECT id FROM Person", "SELECT count(id) FROM Person"); + assertCountQuery("SELECT p.id FROM Person p", "SELECT count(p) FROM Person p"); + assertCountQuery("SELECT id FROM Person p", "SELECT count(id) FROM Person p"); + assertCountQuery("SELECT id, name FROM Person", "SELECT count(*) FROM Person"); + assertCountQuery("SELECT id, name FROM Person p", "SELECT count(p) FROM Person p"); assertCountQuery(QUERY, COUNT_QUERY); } @@ -204,6 +211,9 @@ void createsCountQueryForConstructorQueries() { assertCountQuery("select distinct new com.example.User(u.name) from User u where u.foo = ?1", "select count(distinct u) from User u where u.foo = ?1"); + + assertCountQuery("select distinct new com.example.User(name, lastname) from User where foo = ?1", + "select count(distinct name, lastname) from User where foo = ?1"); } @Test @@ -913,7 +923,7 @@ void queryParserPicksCorrectAliasAmidstMultipleAlises() { void countQueryShouldWorkEvenWithoutExplicitAlias() { assertCountQuery("FROM BookError WHERE portal = :portal", - "select count(__) FROM BookError AS __ WHERE portal = :portal"); + "select count(__) FROM BookError WHERE portal = :portal"); assertCountQuery("FROM BookError b WHERE portal = :portal", "select count(b) FROM BookError b WHERE portal = :portal"); @@ -1107,15 +1117,15 @@ void aliasesShouldNotOverlapWithSortProperties() { @Test // GH-3269, GH-3689 void createsCountQueryUsingAliasCorrectly() { - assertCountQuery("select distinct 1 as x from Employee", "select count(distinct 1) from Employee AS __"); - assertCountQuery("SELECT DISTINCT abc AS x FROM T", "SELECT count(DISTINCT abc) FROM T AS __"); - assertCountQuery("select distinct a as x, b as y from Employee", "select count(distinct a, b) from Employee AS __"); + assertCountQuery("select distinct 1 as x from Employee", "select count(distinct 1) from Employee"); + assertCountQuery("SELECT DISTINCT abc AS x FROM T", "SELECT count(DISTINCT abc) FROM T"); + assertCountQuery("select distinct a as x, b as y from Employee", "select count(distinct a, b) from Employee"); assertCountQuery("select distinct sum(amount) as x from Employee GROUP BY n", - "select count(distinct sum(amount)) from Employee AS __ GROUP BY n"); + "select count(distinct sum(amount)) from Employee GROUP BY n"); assertCountQuery("select distinct a, b, sum(amount) as c, d from Employee GROUP BY n", - "select count(distinct a, b, sum(amount), d) from Employee AS __ GROUP BY n"); + "select count(distinct a, b, sum(amount), d) from Employee GROUP BY n"); assertCountQuery("select distinct a, count(b) as c from Employee GROUP BY n", - "select count(distinct a, count(b)) from Employee AS __ GROUP BY n"); + "select count(distinct a, count(b)) from Employee GROUP BY n"); assertCountQuery("select distinct substring(e.firstname, 1, position('a' in e.lastname)) as x from from Employee", "select count(distinct substring(e.firstname, 1, position('a' in e.lastname))) from from Employee"); } From 8117d42bfdd6a1222e386dab9a2f2a0125f99471 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 17 Jan 2025 11:37:18 +0100 Subject: [PATCH 34/87] Prepare 3.4.2 (2024.1.2). See #3713 --- pom.xml | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/pom.xml b/pom.xml index e36013817e..da31df71aa 100755 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.springframework.data.build spring-data-parent - 3.4.2-SNAPSHOT + 3.4.2 @@ -41,7 +41,7 @@ 5.0 9.1.0 42.7.4 - 3.4.2-SNAPSHOT + 3.4.2 0.10.3 org.hibernate @@ -289,20 +289,8 @@ - - spring-snapshot - https://repo.spring.io/snapshot - - true - - - false - - - - spring-milestone - https://repo.spring.io/milestone - + + From 363bae118a19ba71da6c93ffba43528609a01bc7 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 17 Jan 2025 11:37:35 +0100 Subject: [PATCH 35/87] Release version 3.4.2 (2024.1.2). See #3713 --- pom.xml | 2 +- spring-data-envers/pom.xml | 4 ++-- spring-data-jpa-distribution/pom.xml | 2 +- spring-data-jpa/pom.xml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index da31df71aa..5f3ba93b06 100755 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.springframework.data spring-data-jpa-parent - 3.4.2-SNAPSHOT + 3.4.2 pom Spring Data JPA Parent diff --git a/spring-data-envers/pom.xml b/spring-data-envers/pom.xml index 179457d72e..7c52c34d50 100755 --- a/spring-data-envers/pom.xml +++ b/spring-data-envers/pom.xml @@ -5,12 +5,12 @@ org.springframework.data spring-data-envers - 3.4.2-SNAPSHOT + 3.4.2 org.springframework.data spring-data-jpa-parent - 3.4.2-SNAPSHOT + 3.4.2 ../pom.xml diff --git a/spring-data-jpa-distribution/pom.xml b/spring-data-jpa-distribution/pom.xml index 9fe854e7ac..b271c32b7a 100644 --- a/spring-data-jpa-distribution/pom.xml +++ b/spring-data-jpa-distribution/pom.xml @@ -14,7 +14,7 @@ org.springframework.data spring-data-jpa-parent - 3.4.2-SNAPSHOT + 3.4.2 ../pom.xml diff --git a/spring-data-jpa/pom.xml b/spring-data-jpa/pom.xml index b370a46d5e..ed028adefe 100644 --- a/spring-data-jpa/pom.xml +++ b/spring-data-jpa/pom.xml @@ -6,7 +6,7 @@ org.springframework.data spring-data-jpa - 3.4.2-SNAPSHOT + 3.4.2 Spring Data JPA Spring Data module for JPA repositories. @@ -15,7 +15,7 @@ org.springframework.data spring-data-jpa-parent - 3.4.2-SNAPSHOT + 3.4.2 ../pom.xml From 6cfc869326be08c14ddd56ada04f6f60b9729918 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 17 Jan 2025 11:39:58 +0100 Subject: [PATCH 36/87] Prepare next development iteration. See #3713 --- pom.xml | 2 +- spring-data-envers/pom.xml | 4 ++-- spring-data-jpa-distribution/pom.xml | 2 +- spring-data-jpa/pom.xml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index 5f3ba93b06..13963f7505 100755 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.springframework.data spring-data-jpa-parent - 3.4.2 + 3.4.3-SNAPSHOT pom Spring Data JPA Parent diff --git a/spring-data-envers/pom.xml b/spring-data-envers/pom.xml index 7c52c34d50..4e53dc3a26 100755 --- a/spring-data-envers/pom.xml +++ b/spring-data-envers/pom.xml @@ -5,12 +5,12 @@ org.springframework.data spring-data-envers - 3.4.2 + 3.4.3-SNAPSHOT org.springframework.data spring-data-jpa-parent - 3.4.2 + 3.4.3-SNAPSHOT ../pom.xml diff --git a/spring-data-jpa-distribution/pom.xml b/spring-data-jpa-distribution/pom.xml index b271c32b7a..43d568f017 100644 --- a/spring-data-jpa-distribution/pom.xml +++ b/spring-data-jpa-distribution/pom.xml @@ -14,7 +14,7 @@ org.springframework.data spring-data-jpa-parent - 3.4.2 + 3.4.3-SNAPSHOT ../pom.xml diff --git a/spring-data-jpa/pom.xml b/spring-data-jpa/pom.xml index ed028adefe..f3e0155d0e 100644 --- a/spring-data-jpa/pom.xml +++ b/spring-data-jpa/pom.xml @@ -6,7 +6,7 @@ org.springframework.data spring-data-jpa - 3.4.2 + 3.4.3-SNAPSHOT Spring Data JPA Spring Data module for JPA repositories. @@ -15,7 +15,7 @@ org.springframework.data spring-data-jpa-parent - 3.4.2 + 3.4.3-SNAPSHOT ../pom.xml From d0c63eb2088fed2db8fd3d82fa6f5e7277709008 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 17 Jan 2025 11:39:59 +0100 Subject: [PATCH 37/87] After release cleanups. See #3713 --- pom.xml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 13963f7505..8b0c8e9197 100755 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.springframework.data.build spring-data-parent - 3.4.2 + 3.4.3-SNAPSHOT @@ -41,7 +41,7 @@ 5.0 9.1.0 42.7.4 - 3.4.2 + 3.4.3-SNAPSHOT 0.10.3 org.hibernate @@ -289,8 +289,20 @@ - - + + spring-snapshot + https://repo.spring.io/snapshot + + true + + + false + + + + spring-milestone + https://repo.spring.io/milestone + From 9bc7dac2ac01b0b74f31269aca80aa1354847752 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Wed, 22 Jan 2025 14:15:39 +0100 Subject: [PATCH 38/87] =?UTF-8?q?Document=20that=20fluent=20`findBy(?= =?UTF-8?q?=E2=80=A6)`=20queries=20must=20return=20a=20result.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #3294 --- .../repository/JpaSpecificationExecutor.java | 8 +++++++- .../support/QuerydslJpaPredicateExecutor.java | 11 ++++++++++- .../support/SimpleJpaRepository.java | 11 ++++++++++- .../jpa/repository/UserRepositoryTests.java | 19 ++++++++++++++----- 4 files changed, 41 insertions(+), 8 deletions(-) diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/JpaSpecificationExecutor.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/JpaSpecificationExecutor.java index 3abd83b2bf..4d18351a99 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/JpaSpecificationExecutor.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/JpaSpecificationExecutor.java @@ -23,6 +23,7 @@ import java.util.Optional; import java.util.function.Function; +import org.springframework.dao.InvalidDataAccessApiUsageException; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Sort; @@ -122,11 +123,16 @@ public interface JpaSpecificationExecutor { /** * Returns entities matching the given {@link Specification} applying the {@code queryFunction} that defines the query * and its result type. + *

+ * The query object used with {@code queryFunction} is only valid inside the {@code findBy(…)} method call. This + * requires the query function to return a query result and not the {@link FluentQuery} object itself to ensure the + * query is executed inside the {@code findBy(…)} method. * * @param spec must not be null. * @param queryFunction the query function defining projection, sorting, and the result type - * @return all entities matching the given Example. + * @return all entities matching the given specification. * @since 3.0 + * @throws InvalidDataAccessApiUsageException if the query function returns the {@link FluentQuery} instance. */ R findBy(Specification spec, Function, R> queryFunction); diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/QuerydslJpaPredicateExecutor.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/QuerydslJpaPredicateExecutor.java index ad0762f78d..7b31a6ce5c 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/QuerydslJpaPredicateExecutor.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/QuerydslJpaPredicateExecutor.java @@ -24,6 +24,7 @@ import java.util.function.Function; import org.springframework.dao.IncorrectResultSizeDataAccessException; +import org.springframework.dao.InvalidDataAccessApiUsageException; import org.springframework.data.domain.KeysetScrollPosition; import org.springframework.data.domain.OffsetScrollPosition; import org.springframework.data.domain.Page; @@ -41,6 +42,7 @@ import org.springframework.data.querydsl.EntityPathResolver; import org.springframework.data.querydsl.QSort; import org.springframework.data.querydsl.QuerydslPredicateExecutor; +import org.springframework.data.repository.query.FluentQuery; import org.springframework.data.repository.query.FluentQuery.FetchableFluentQuery; import org.springframework.data.support.PageableExecutionUtils; import org.springframework.lang.Nullable; @@ -245,7 +247,14 @@ public R findBy(Predicate predicate, Function) fluentQuery); + R result = queryFunction.apply((FetchableFluentQuery) fluentQuery); + + if (result instanceof FluentQuery) { + throw new InvalidDataAccessApiUsageException( + "findBy(…) queries must result a query result and not the FluentQuery object to ensure that queries are executed within the scope of the findBy(…) method"); + } + + return result; } @Override diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java index ba5daeea09..759752f128 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java @@ -42,6 +42,7 @@ import java.util.function.BiConsumer; import java.util.function.Function; +import org.springframework.dao.InvalidDataAccessApiUsageException; import org.springframework.data.domain.Example; import org.springframework.data.domain.KeysetScrollPosition; import org.springframework.data.domain.OffsetScrollPosition; @@ -62,6 +63,7 @@ import org.springframework.data.jpa.support.PageableUtils; import org.springframework.data.projection.ProjectionFactory; import org.springframework.data.projection.SpelAwareProxyProjectionFactory; +import org.springframework.data.repository.query.FluentQuery; import org.springframework.data.repository.query.FluentQuery.FetchableFluentQuery; import org.springframework.data.support.PageableExecutionUtils; import org.springframework.data.util.ProxyUtils; @@ -534,7 +536,14 @@ private R doFindBy(Specification spec, Class domainClass, FetchableFluentQueryBySpecification fluentQuery = new FetchableFluentQueryBySpecification<>(spec, domainClass, finder, scrollDelegate, this::count, this::exists, this.entityManager, getProjectionFactory()); - return queryFunction.apply((FetchableFluentQuery) fluentQuery); + R result = queryFunction.apply((FetchableFluentQuery) fluentQuery); + + if (result instanceof FluentQuery) { + throw new InvalidDataAccessApiUsageException( + "findBy(…) queries must result a query result and not the FluentQuery object to ensure that queries are executed within the scope of the findBy(…) method"); + } + + return result; } @Override diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/UserRepositoryTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/UserRepositoryTests.java index 1c365cfb1e..b4df229da5 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/UserRepositoryTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/UserRepositoryTests.java @@ -42,6 +42,7 @@ import java.util.Map; import java.util.Optional; import java.util.Set; +import java.util.function.Function; import java.util.stream.IntStream; import java.util.stream.Stream; @@ -2355,6 +2356,14 @@ void findByFluentExampleWithSorting() { assertThat(users).containsExactly(thirdUser, firstUser, fourthUser); } + @Test // GH-3294 + void findByFluentFailsReturningFluentQuery() { + + User prototype = new User(); + assertThatExceptionOfType(InvalidDataAccessApiUsageException.class) + .isThrownBy(() -> repository.findBy(of(prototype), Function.identity())); + } + @Test // GH-2294 void findByFluentExampleFirstValue() { @@ -2452,13 +2461,13 @@ void findByFluentExampleWithInterfaceBasedProjectionUsingSpEL() { prototype.setFirstname("v"); List users = repository.findBy( - of(prototype, - matching().withIgnorePaths("age", "createdAt", "active").withMatcher("firstname", - GenericPropertyMatcher::contains)), // - q -> q.as(UserProjectionUsingSpEL.class).all()); + of(prototype, + matching().withIgnorePaths("age", "createdAt", "active").withMatcher("firstname", + GenericPropertyMatcher::contains)), // + q -> q.as(UserProjectionUsingSpEL.class).all()); assertThat(users).extracting(UserProjectionUsingSpEL::hello) - .contains(new GreetingsFrom().groot(firstUser.getFirstname())); + .contains(new GreetingsFrom().groot(firstUser.getFirstname())); } @Test // GH-2294 From 76a0f5e409f39e34942009886abc97230e1850fa Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Wed, 29 Jan 2025 15:07:47 +0100 Subject: [PATCH 39/87] Skip parameter lookup for unused query parameters. We now skip binding parameter lookup if the query isn't using named parameters and the parameter is not associated with a name. Also, we check for presence of lookup identifiers to avoid parameter binding that cannot be looked up as they are not used anymore. This can happen when a declared query uses parameters only in the ORDER BY clause that is truncated during count query derivation. Then the query object reports parameters althtough they are not being used. We also refined parameter carryover during count query derivation. Previously, we copied all parameters without introspecting their origin. now, we copy only expression parameters to the derived query as count query derivation doesn't have access to expressions as our query parsers require valid JPQL. Closes #3756 --- .../query/QueryParameterSetterFactory.java | 7 ++- .../jpa/repository/query/StringQuery.java | 42 ++++++++++++---- .../jpa/repository/UserRepositoryTests.java | 36 +++++++++---- .../ExpressionBasedStringQueryUnitTests.java | 6 +-- .../query/StringQueryUnitTests.java | 50 +++++++++++++++++++ .../jpa/repository/sample/UserRepository.java | 45 ++++++++--------- 6 files changed, 135 insertions(+), 51 deletions(-) diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryParameterSetterFactory.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryParameterSetterFactory.java index cd6ff2d62c..c45c3d8aa3 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryParameterSetterFactory.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryParameterSetterFactory.java @@ -240,10 +240,13 @@ public QueryParameterSetter create(ParameterBinding binding, DeclaredQuery decla BindingIdentifier identifier = mia.identifier(); - if (declaredQuery.hasNamedParameter()) { + if (declaredQuery.hasNamedParameter() && identifier.hasName()) { parameter = findParameterForBinding(parameters, identifier.getName()); - } else { + } else if (identifier.hasPosition()) { parameter = findParameterForBinding(parameters, identifier.getPosition() - 1); + } else { + // this can happen when a query uses parameters in ORDER BY and the COUNT query just needs to drop a binding. + parameter = null; } return parameter == null // diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/StringQuery.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/StringQuery.java index 0424d5ff60..8bc8dff0a8 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/StringQuery.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/StringQuery.java @@ -73,6 +73,15 @@ class StringQuery implements DeclaredQuery { * @param query must not be {@literal null} or empty. */ public StringQuery(String query, boolean isNative) { + this(query, isNative, it -> {}); + } + + /** + * Creates a new {@link StringQuery} from the given JPQL query. + * + * @param query must not be {@literal null} or empty. + */ + private StringQuery(String query, boolean isNative, Consumer> parameterPostProcessor) { Assert.hasText(query, "Query must not be null or empty"); @@ -87,6 +96,8 @@ public StringQuery(String query, boolean isNative) { this.usesJdbcStyleParameters = queryMeta.usesJdbcStyleParameters; this.queryEnhancer = QueryEnhancerFactory.forQuery(this); + parameterPostProcessor.accept(this.bindings); + boolean hasNamedParameters = false; for (ParameterBinding parameterBinding : getParameterBindings()) { if (parameterBinding.getIdentifier().hasName() && parameterBinding.getOrigin().isMethodArgument()) { @@ -117,15 +128,26 @@ public List getParameterBindings() { @Override public DeclaredQuery deriveCountQuery(@Nullable String countQueryProjection) { - StringQuery stringQuery = new StringQuery(this.queryEnhancer.createCountQueryFor(countQueryProjection), // - this.isNative); + // need to copy expression bindings from the declared to the derived query as JPQL query derivation only sees + // JPA parameter markers and not the original expressions anymore. - if (this.hasParameterBindings() && !this.getParameterBindings().equals(stringQuery.getParameterBindings())) { - stringQuery.getParameterBindings().clear(); - stringQuery.getParameterBindings().addAll(this.bindings); - } + return new StringQuery(this.queryEnhancer.createCountQueryFor(countQueryProjection), // + this.isNative, derivedBindings -> { - return stringQuery; + // need to copy expression bindings from the declared to the derived query as JPQL query derivation only sees + // JPA + // parameter markers and not the original expressions anymore. + if (this.hasParameterBindings() && !this.getParameterBindings().equals(derivedBindings)) { + + for (ParameterBinding binding : bindings) { + + if (binding.getOrigin().isExpression() && derivedBindings.removeIf( + it -> !it.getOrigin().isExpression() && it.getIdentifier().equals(binding.getIdentifier()))) { + derivedBindings.add(binding); + } + } + } + }); } @Override @@ -243,8 +265,7 @@ String parseParameterBindingsOfQueryIntoBindingsAndReturnCleanedQuery(String que } ValueExpressionQueryRewriter.ParsedQuery parsedQuery = createSpelExtractor(query, - parametersShouldBeAccessedByIndex, - greatestParameterIndex); + parametersShouldBeAccessedByIndex, greatestParameterIndex); String resultingQuery = parsedQuery.getQueryString(); Matcher matcher = PARAMETER_BINDING_PATTERN.matcher(resultingQuery); @@ -350,8 +371,7 @@ String parseParameterBindingsOfQueryIntoBindingsAndReturnCleanedQuery(String que } private static ValueExpressionQueryRewriter.ParsedQuery createSpelExtractor(String queryWithSpel, - boolean parametersShouldBeAccessedByIndex, - int greatestParameterIndex) { + boolean parametersShouldBeAccessedByIndex, int greatestParameterIndex) { /* * If parameters need to be bound by index, we bind the synthetic expression parameters starting from position of the greatest discovered index parameter in order to diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/UserRepositoryTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/UserRepositoryTests.java index b4df229da5..c433415b90 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/UserRepositoryTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/UserRepositoryTests.java @@ -3069,22 +3069,36 @@ void handlesColonsFollowedByIntegerInStringLiteral() { assertThat(users).extracting(User::getId).containsExactly(expected.getId()); } - @Disabled("ORDER BY CASE appears to be a Hibernate-only feature") - @Test // DATAJPA-1233 + @Test // DATAJPA-1233, GH-3756 void handlesCountQueriesWithLessParametersSingleParam() { - // repository.findAllOrderedBySpecialNameSingleParam("Oliver", PageRequest.of(2, 3)); + + flushTestUsers(); + + Page result = repository.findAllOrderedByNamedParam("Oliver", PageRequest.of(0, 3)); + + assertThat(result.getContent()).containsExactly(firstUser, fourthUser, thirdUser); + assertThat(result.getTotalElements()).isEqualTo(4); + + result = repository.findAllOrderedByIndexedParam("Oliver", PageRequest.of(0, 3)); + + assertThat(result.getContent()).containsExactly(firstUser, fourthUser, thirdUser); + assertThat(result.getTotalElements()).isEqualTo(4); } - @Disabled("ORDER BY CASE appears to be a Hibernate-only feature") - @Test // DATAJPA-1233 + @Test // DATAJPA-1233, GH-3756 void handlesCountQueriesWithLessParametersMoreThanOne() { - // repository.findAllOrderedBySpecialNameMultipleParams("Oliver", "x", PageRequest.of(2, 3)); - } - @Disabled("ORDER BY CASE appears to be a Hibernate-only feature") - @Test // DATAJPA-1233 - void handlesCountQueriesWithLessParametersMoreThanOneIndexed() { - // repository.findAllOrderedBySpecialNameMultipleParamsIndexed("x", "Oliver", PageRequest.of(2, 3)); + flushTestUsers(); + + Page result = repository.findAllOrderedBySpecialNameMultipleParams("Oliver", "x", PageRequest.of(0, 3)); + + assertThat(result.getContent()).containsExactly(firstUser, fourthUser, thirdUser); + assertThat(result.getTotalElements()).isEqualTo(4); + + result = repository.findAllOrderedBySpecialNameMultipleParamsIndexed("x", "Oliver", PageRequest.of(0, 3)); + + assertThat(result.getContent()).containsExactly(firstUser, fourthUser, thirdUser); + assertThat(result.getTotalElements()).isEqualTo(4); } // DATAJPA-928 diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ExpressionBasedStringQueryUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ExpressionBasedStringQueryUnitTests.java index 1df1abde12..2b81871822 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ExpressionBasedStringQueryUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ExpressionBasedStringQueryUnitTests.java @@ -177,7 +177,7 @@ void indexedExpressionsShouldCreateLikeBindings() { } @Test - public void doesTemplatingWhenEntityNameSpelIsPresent() { + void doesTemplatingWhenEntityNameSpelIsPresent() { StringQuery query = new ExpressionBasedStringQuery("select #{#entityName + 'Hallo'} from #{#entityName} u", metadata, PARSER, false); @@ -186,7 +186,7 @@ public void doesTemplatingWhenEntityNameSpelIsPresent() { } @Test - public void doesNoTemplatingWhenEntityNameSpelIsNotPresent() { + void doesNoTemplatingWhenEntityNameSpelIsNotPresent() { StringQuery query = new ExpressionBasedStringQuery("select #{#entityName + 'Hallo'} from User u", metadata, PARSER, false); @@ -195,7 +195,7 @@ public void doesNoTemplatingWhenEntityNameSpelIsNotPresent() { } @Test - public void doesTemplatingWhenEntityNameSpelIsPresentForBindParameter() { + void doesTemplatingWhenEntityNameSpelIsPresentForBindParameter() { StringQuery query = new ExpressionBasedStringQuery("select u from #{#entityName} u where name = :#{#something}", metadata, PARSER, false); diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/StringQueryUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/StringQueryUnitTests.java index 4db398991d..04bf714ae4 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/StringQueryUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/StringQueryUnitTests.java @@ -310,6 +310,56 @@ void allowsReuseOfParameterWithInAndRegularBinding() { assertNamedBinding(InParameterBinding.class, "foo_1", bindings.get(1)); } + @Test // GH-3126 + void countQueryDerivationRetainsNamedExpressionParameters() { + + StringQuery query = new StringQuery( + "select u from User u where foo = :#{bar} ORDER BY CASE WHEN (u.firstname >= :#{name}) THEN 0 ELSE 1 END", + false); + + DeclaredQuery countQuery = query.deriveCountQuery(null); + + assertThat(countQuery.getParameterBindings()).hasSize(1); + assertThat(countQuery.getParameterBindings()).extracting(ParameterBinding::getOrigin) + .extracting(ParameterOrigin::isExpression).isEqualTo(List.of(true)); + + query = new StringQuery( + "select u from User u where foo = :#{bar} and bar = :bar ORDER BY CASE WHEN (u.firstname >= :bar) THEN 0 ELSE 1 END", + false); + + countQuery = query.deriveCountQuery(null); + + assertThat(countQuery.getParameterBindings()).hasSize(2); + assertThat(countQuery.getParameterBindings()) // + .extracting(ParameterBinding::getOrigin) // + .extracting(ParameterOrigin::isExpression).contains(true, false); + } + + @Test // GH-3126 + void countQueryDerivationRetainsIndexedExpressionParameters() { + + StringQuery query = new StringQuery( + "select u from User u where foo = ?#{bar} ORDER BY CASE WHEN (u.firstname >= ?#{name}) THEN 0 ELSE 1 END", + false); + + DeclaredQuery countQuery = query.deriveCountQuery(null); + + assertThat(countQuery.getParameterBindings()).hasSize(1); + assertThat(countQuery.getParameterBindings()).extracting(ParameterBinding::getOrigin) + .extracting(ParameterOrigin::isExpression).isEqualTo(List.of(true)); + + query = new StringQuery( + "select u from User u where foo = ?#{bar} and bar = ?1 ORDER BY CASE WHEN (u.firstname >= ?1) THEN 0 ELSE 1 END", + false); + + countQuery = query.deriveCountQuery(null); + + assertThat(countQuery.getParameterBindings()).hasSize(2); + assertThat(countQuery.getParameterBindings()) // + .extracting(ParameterBinding::getOrigin) // + .extracting(ParameterOrigin::isExpression).contains(true, false); + } + @Test // DATAJPA-461 void detectsMultiplePositionalInParameterBindings() { diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/UserRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/UserRepository.java index a382fa70a3..94b1873d6d 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/UserRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/UserRepository.java @@ -83,9 +83,8 @@ public interface UserRepository extends JpaRepository, JpaSpecifi java.util.Optional findById(Integer primaryKey); /** - * Redeclaration of {@link CrudRepository#deleteById(java.lang.Object)}. to make sure the transaction - * configuration of the original method is considered if the redeclaration does not carry a {@link Transactional} - * annotation. + * Redeclaration of {@link CrudRepository#deleteById(java.lang.Object)}. to make sure the transaction configuration of + * the original method is considered if the redeclaration does not carry a {@link Transactional} annotation. */ @Override void deleteById(Integer id); // DATACMNS-649 @@ -419,7 +418,8 @@ Window findTop3ByFirstnameStartingWithOrderByFirstnameAscEmailAddressAsc(S @Query("select u from User u where u.firstname = ?#{[0]} and u.firstname = ?1 and u.lastname like %?#{[1]}% and u.lastname like %?2%") List findByFirstnameAndLastnameWithSpelExpression(String firstname, String lastname); - @Query(value = "select * from SD_User", countQuery = "select count(1) from SD_User u where u.lastname = :#{#lastname}", nativeQuery = true) + @Query(value = "select * from SD_User", + countQuery = "select count(1) from SD_User u where u.lastname = :#{#lastname}", nativeQuery = true) Page findByWithSpelParameterOnlyUsedForCountQuery(String lastname, Pageable page); // DATAJPA-564 @@ -573,26 +573,23 @@ List findUsersByFirstnameForSpELExpressionWithParameterIndexOnlyWithEntity @Query("SELECT u FROM User u where u.firstname >= ?1 and u.lastname = '000:1'") List queryWithIndexedParameterAndColonFollowedByIntegerInString(String firstname); - /** - * TODO: ORDER BY CASE appears to only with Hibernate. The examples attempting to do this through pure JPQL don't - * appear to work with Hibernate, so we must set them aside until we can implement HQL. - */ - // // DATAJPA-1233 - // @Query(value = "SELECT u FROM User u ORDER BY CASE WHEN (u.firstname >= :name) THEN 0 ELSE 1 END, u.firstname") - // Page findAllOrderedBySpecialNameSingleParam(@Param("name") String name, Pageable page); - // - // // DATAJPA-1233 - // @Query( - // value = "SELECT u FROM User u WHERE :other = 'x' ORDER BY CASE WHEN (u.firstname >= :name) THEN 0 ELSE 1 END, - // u.firstname") - // Page findAllOrderedBySpecialNameMultipleParams(@Param("name") String name, @Param("other") String other, - // Pageable page); - // - // // DATAJPA-1233 - // @Query( - // value = "SELECT u FROM User u WHERE ?2 = 'x' ORDER BY CASE WHEN (u.firstname >= ?1) THEN 0 ELSE 1 END, - // u.firstname") - // Page findAllOrderedBySpecialNameMultipleParamsIndexed(String other, String name, Pageable page); + @Query(value = "SELECT u FROM User u ORDER BY CASE WHEN (u.firstname >= :name) THEN 0 ELSE 1 END, u.firstname") + Page findAllOrderedByNamedParam(@Param("name") String name, Pageable page); + + @Query(value = "SELECT u FROM User u ORDER BY CASE WHEN (u.firstname >= ?1) THEN 0 ELSE 1 END, u.firstname") + Page findAllOrderedByIndexedParam(String name, Pageable page); + + @Query( + value = "SELECT u FROM User u WHERE :other = 'x' ORDER BY CASE WHEN (u.firstname >= :name) THEN 0 ELSE 1 END, u.firstname") + Page findAllOrderedBySpecialNameMultipleParams(@Param("name") String name, @Param("other") String other, + Pageable page); + + // Note that parameters used in the order-by statement are just cut off, so we must declare a query that parameter + // label order remains valid even after truncating the order by part. (i.e. WHERE ?2 = 'x' ORDER BY CASE WHEN + // (u.firstname >= ?1) isn't going to work). + @Query( + value = "SELECT u FROM User u WHERE ?1 = 'x' ORDER BY CASE WHEN (u.firstname >= ?2) THEN 0 ELSE 1 END, u.firstname") + Page findAllOrderedBySpecialNameMultipleParamsIndexed(String other, String name, Pageable page); // DATAJPA-928 Page findByNativeNamedQueryWithPageable(Pageable pageable); From 6038bbad0c9047b4f3e4cba5e2549e08dde20334 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Thu, 30 Jan 2025 16:50:58 +0100 Subject: [PATCH 40/87] Attempt two-pass parsing in SLL prediction and fall back to LL prediction. Due to grammar ambiguities, we fall back to LL prediction considering contextual ambiguity resolution. Closes #3757 --- .../repository/query/JpaQueryEnhancer.java | 42 +++++++++++++++++-- .../repository/query/EqlComplianceTests.java | 12 ++---- .../query/EqlQueryRendererTests.java | 12 ++---- .../query/EqlSpecificationTests.java | 12 ++---- .../query/HqlQueryRendererTests.java | 27 ++++++++---- .../query/HqlSpecificationTests.java | 14 ++----- .../repository/query/JpqlComplianceTests.java | 11 +---- .../query/JpqlQueryRendererTests.java | 12 ++---- .../query/JpqlSpecificationTests.java | 12 ++---- 9 files changed, 77 insertions(+), 77 deletions(-) diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryEnhancer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryEnhancer.java index 09cb56950b..0c675029b6 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryEnhancer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryEnhancer.java @@ -20,6 +20,7 @@ import java.util.function.BiFunction; import java.util.function.Function; +import org.antlr.v4.runtime.BailErrorStrategy; import org.antlr.v4.runtime.CharStream; import org.antlr.v4.runtime.CharStreams; import org.antlr.v4.runtime.CommonTokenStream; @@ -28,7 +29,9 @@ import org.antlr.v4.runtime.ParserRuleContext; import org.antlr.v4.runtime.TokenStream; import org.antlr.v4.runtime.atn.PredictionMode; +import org.antlr.v4.runtime.misc.ParseCancellationException; import org.antlr.v4.runtime.tree.ParseTreeVisitor; + import org.springframework.data.domain.Sort; import org.springframework.lang.Nullable; import org.springframework.util.Assert; @@ -65,9 +68,35 @@ class JpaQueryEnhancer implements QueryEnhancer { this.projection = tokens.isEmpty() ? "" : new QueryRenderer.TokenRenderer(tokens).render(); } + /** + * Parse the query and return the parser context (AST). This method attempts parsing the query using + * {@link PredictionMode#SLL} first to attempt a fast-path parse without using the context. If that fails, it retries + * using {@link PredictionMode#LL} which is much slower, however it allows for contextual ambiguity resolution. + */ static

ParserRuleContext parse(String query, Function lexerFactoryFunction, Function parserFactoryFunction, Function parseFunction) { + P parser = getParser(query, lexerFactoryFunction, parserFactoryFunction); + + parser.getInterpreter().setPredictionMode(PredictionMode.SLL); + parser.setErrorHandler(new BailErrorStrategy()); + + try { + + return parseFunction.apply(parser); + } catch (BadJpqlGrammarException | ParseCancellationException e) { + + parser = getParser(query, lexerFactoryFunction, parserFactoryFunction); + // fall back to LL(*)-based parsing + parser.getInterpreter().setPredictionMode(PredictionMode.LL); + + return parseFunction.apply(parser); + } + } + + private static

P getParser(String query, Function lexerFactoryFunction, + Function parserFactoryFunction) { + Lexer lexer = lexerFactoryFunction.apply(CharStreams.fromString(query)); P parser = parserFactoryFunction.apply(new CommonTokenStream(lexer)); @@ -79,11 +108,11 @@ static

ParserRuleContext parse(String query, Function reservedWords() { diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlSpecificationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlSpecificationTests.java index 5bd15b1961..bff45ec75d 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlSpecificationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlSpecificationTests.java @@ -17,10 +17,9 @@ import static org.assertj.core.api.Assertions.*; -import org.antlr.v4.runtime.CharStreams; -import org.antlr.v4.runtime.CommonTokenStream; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; + import org.springframework.data.jpa.repository.query.QueryRenderer.TokenRenderer; /** @@ -37,14 +36,9 @@ class EqlSpecificationTests { private static String parseWithoutChanges(String query) { - EqlLexer lexer = new EqlLexer(CharStreams.fromString(query)); - EqlParser parser = new EqlParser(new CommonTokenStream(lexer)); - - parser.addErrorListener(new BadJpqlGrammarErrorListener(query)); - - EqlParser.StartContext parsedQuery = parser.start(); + JpaQueryEnhancer.EqlQueryParser parser = JpaQueryEnhancer.EqlQueryParser.parseQuery(query); - return TokenRenderer.render(new EqlQueryRenderer().visit(parsedQuery)); + return TokenRenderer.render(new EqlQueryRenderer().visit(parser.getContext())); } private void assertQuery(String query) { diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryRendererTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryRendererTests.java index 725e09950d..4de4c2b9df 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryRendererTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryRendererTests.java @@ -19,8 +19,6 @@ import java.util.stream.Stream; -import org.antlr.v4.runtime.CharStreams; -import org.antlr.v4.runtime.CommonTokenStream; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; @@ -50,14 +48,9 @@ class HqlQueryRendererTests { */ private static String parseWithoutChanges(String query) { - HqlLexer lexer = new HqlLexer(CharStreams.fromString(query)); - HqlParser parser = new HqlParser(new CommonTokenStream(lexer)); + JpaQueryEnhancer.HqlQueryParser parser = JpaQueryEnhancer.HqlQueryParser.parseQuery(query); - parser.addErrorListener(new BadJpqlGrammarErrorListener(query)); - - HqlParser.StartContext parsedQuery = parser.start(); - - QueryTokenStream tokens = new HqlQueryRenderer().visit(parsedQuery); + QueryTokenStream tokens = new HqlQueryRenderer().visit(parser.getContext()); return QueryRenderer.from(tokens).render(); } @@ -1891,6 +1884,22 @@ group by extract(epoch from departureTime) """); } + @Test // GH-3757 + void arithmeticDate() { + + assertQuery("SELECT a FROM foo a WHERE (cast(a.createdAt as date) - CURRENT_DATE()) BY day - 2 = 0"); + assertQuery("SELECT a FROM foo a WHERE (cast(a.createdAt as date) - CURRENT_DATE()) BY day - 2 = 0"); + assertQuery("SELECT a FROM foo a WHERE (cast(a.createdAt as date)) BY day - 2 = 0"); + + assertQuery("SELECT f.start - 1 minute FROM foo f"); + + assertQuery("SELECT f FROM foo f WHERE (cast(f.start as date) - CURRENT_DATE()) BY day - 2 = 0"); + assertQuery("SELECT 1 week - 1 day FROM foo f"); + assertQuery("SELECT f.birthday - local date day FROM foo f"); + assertQuery("SELECT local datetime - f.birthday FROM foo f"); + assertQuery("SELECT (1 year) by day FROM foo f"); + } + @ParameterizedTest // GH-3342 @ValueSource( strings = { "select 1 from User", "select -1 from User", "select +1 from User", "select +1 * -100 from User", diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlSpecificationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlSpecificationTests.java index 4214b99801..be05e3fceb 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlSpecificationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlSpecificationTests.java @@ -17,12 +17,11 @@ import static org.assertj.core.api.Assertions.*; -import org.antlr.v4.runtime.CharStreams; -import org.antlr.v4.runtime.CommonTokenStream; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.ValueSource; + import org.springframework.data.jpa.repository.query.QueryRenderer.TokenRenderer; /** @@ -43,14 +42,9 @@ class HqlSpecificationTests { private static String parseWithoutChanges(String query) { - HqlLexer lexer = new HqlLexer(CharStreams.fromString(query)); - HqlParser parser = new HqlParser(new CommonTokenStream(lexer)); - - parser.addErrorListener(new BadJpqlGrammarErrorListener(query)); + JpaQueryEnhancer.HqlQueryParser parser = JpaQueryEnhancer.HqlQueryParser.parseQuery(query); - HqlParser.StartContext parsedQuery = parser.start(); - - return TokenRenderer.render(new HqlQueryRenderer().visit(parsedQuery)); + return TokenRenderer.render(new HqlQueryRenderer().visit(parser.getContext())); } private void assertQuery(String query) { @@ -490,7 +484,7 @@ void position() { "from Call c "); assertQuery("select POSITION(c.number IN 'foo') + 1 AS pos " + // - "from Call c "); + "from Call c "); } @Test // GH-3689 diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlComplianceTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlComplianceTests.java index 1c412fcf8a..81722f9b90 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlComplianceTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlComplianceTests.java @@ -17,8 +17,6 @@ import static org.assertj.core.api.Assertions.*; -import org.antlr.v4.runtime.CharStreams; -import org.antlr.v4.runtime.CommonTokenStream; import org.junit.jupiter.api.Test; /** @@ -32,14 +30,9 @@ class JpqlComplianceTests { private static String parseWithoutChanges(String query) { - JpqlLexer lexer = new JpqlLexer(CharStreams.fromString(query)); - JpqlParser parser = new JpqlParser(new CommonTokenStream(lexer)); + JpaQueryEnhancer.JpqlQueryParser parser = JpaQueryEnhancer.JpqlQueryParser.parseQuery(query); - parser.addErrorListener(new BadJpqlGrammarErrorListener(query)); - - JpqlParser.StartContext parsedQuery = parser.start(); - - return QueryRenderer.render(new JpqlQueryRenderer().visit(parsedQuery)); + return QueryRenderer.render(new JpqlQueryRenderer().visit(parser.getContext())); } private void assertQuery(String query) { diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlQueryRendererTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlQueryRendererTests.java index 4446a5195a..1047d4cc12 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlQueryRendererTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlQueryRendererTests.java @@ -19,14 +19,13 @@ import java.util.stream.Stream; -import org.antlr.v4.runtime.CharStreams; -import org.antlr.v4.runtime.CommonTokenStream; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; import org.junit.jupiter.params.provider.ValueSource; + import org.springframework.data.jpa.repository.query.QueryRenderer.TokenRenderer; /** @@ -48,14 +47,9 @@ class JpqlQueryRendererTests { */ private static String parseWithoutChanges(String query) { - JpqlLexer lexer = new JpqlLexer(CharStreams.fromString(query)); - JpqlParser parser = new JpqlParser(new CommonTokenStream(lexer)); - - parser.addErrorListener(new BadJpqlGrammarErrorListener(query)); - - JpqlParser.StartContext parsedQuery = parser.start(); + JpaQueryEnhancer.JpqlQueryParser parser = JpaQueryEnhancer.JpqlQueryParser.parseQuery(query); - return TokenRenderer.render(new JpqlQueryRenderer().visit(parsedQuery)); + return TokenRenderer.render(new JpqlQueryRenderer().visit(parser.getContext())); } static Stream reservedWords() { diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlSpecificationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlSpecificationTests.java index b3c7ea1a8e..289e522455 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlSpecificationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlSpecificationTests.java @@ -17,10 +17,9 @@ import static org.assertj.core.api.Assertions.*; -import org.antlr.v4.runtime.CharStreams; -import org.antlr.v4.runtime.CommonTokenStream; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; + import org.springframework.data.jpa.repository.query.QueryRenderer.TokenRenderer; /** @@ -41,14 +40,9 @@ class JpqlSpecificationTests { */ private static String parseWithoutChanges(String query) { - JpqlLexer lexer = new JpqlLexer(CharStreams.fromString(query)); - JpqlParser parser = new JpqlParser(new CommonTokenStream(lexer)); - - parser.addErrorListener(new BadJpqlGrammarErrorListener(query)); - - JpqlParser.StartContext parsedQuery = parser.start(); + JpaQueryEnhancer.JpqlQueryParser parser = JpaQueryEnhancer.JpqlQueryParser.parseQuery(query); - return TokenRenderer.render(new JpqlQueryRenderer().visit(parsedQuery)); + return TokenRenderer.render(new JpqlQueryRenderer().visit(parser.getContext())); } private void assertQuery(String query) { From 7c9b682bdca45877aff26d64f3f2042dccdf7157 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Thu, 30 Jan 2025 14:16:27 +0100 Subject: [PATCH 41/87] Polishing. Refine HQL rendering for duration expressions. Retain whitespace for error message reconstruction, refine error handling. See #3757 --- .../data/jpa/repository/query/Eql.g4 | 2 +- .../data/jpa/repository/query/Hql.g4 | 2 +- .../data/jpa/repository/query/Jpql.g4 | 2 +- .../query/BadJpqlGrammarErrorListener.java | 50 +++++++++++++++- .../repository/query/HqlQueryRenderer.java | 2 +- .../repository/query/JpaQueryEnhancer.java | 10 +++- .../BadJpqlGrammarExceptionUnitTests.java | 59 +++++++++++++++++++ .../query/HqlQueryRendererTests.java | 1 + 8 files changed, 122 insertions(+), 6 deletions(-) create mode 100644 spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/BadJpqlGrammarExceptionUnitTests.java diff --git a/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Eql.g4 b/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Eql.g4 index 3ed025efb5..9db07f6314 100644 --- a/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Eql.g4 +++ b/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Eql.g4 @@ -837,7 +837,7 @@ reserved_word */ -WS : [ \t\r\n] -> skip ; +WS : [ \t\r\n] -> channel(HIDDEN) ; // Build up case-insentive tokens diff --git a/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Hql.g4 b/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Hql.g4 index 2c79fc040b..da0518d08c 100644 --- a/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Hql.g4 +++ b/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Hql.g4 @@ -1560,7 +1560,7 @@ identifier */ -WS : [ \t\r\n] -> skip ; +WS : [ \t\r\n] -> channel(HIDDEN); // Build up case-insentive tokens diff --git a/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Jpql.g4 b/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Jpql.g4 index e87d523b12..9ddbcadb44 100644 --- a/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Jpql.g4 +++ b/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Jpql.g4 @@ -817,7 +817,7 @@ reserved_word */ -WS : [ \t\r\n] -> skip ; +WS : [ \t\r\n] -> channel(HIDDEN) ; // Build up case-insentive tokens diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/BadJpqlGrammarErrorListener.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/BadJpqlGrammarErrorListener.java index a2edc2d911..dd3eab6412 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/BadJpqlGrammarErrorListener.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/BadJpqlGrammarErrorListener.java @@ -15,10 +15,17 @@ */ package org.springframework.data.jpa.repository.query; +import java.util.List; + import org.antlr.v4.runtime.BaseErrorListener; +import org.antlr.v4.runtime.CommonToken; +import org.antlr.v4.runtime.InputMismatchException; +import org.antlr.v4.runtime.NoViableAltException; import org.antlr.v4.runtime.RecognitionException; import org.antlr.v4.runtime.Recognizer; +import org.springframework.util.ObjectUtils; + /** * A {@link BaseErrorListener} that will throw a {@link BadJpqlGrammarException} if the query is invalid. * @@ -43,7 +50,48 @@ class BadJpqlGrammarErrorListener extends BaseErrorListener { @Override public void syntaxError(Recognizer recognizer, Object offendingSymbol, int line, int charPositionInLine, String msg, RecognitionException e) { - throw new BadJpqlGrammarException("Line " + line + ":" + charPositionInLine + " " + msg, grammar, query, null); + throw new BadJpqlGrammarException(formatMessage(offendingSymbol, line, charPositionInLine, msg, e, query), grammar, + query, null); + } + + /** + * Rewrite the error message. + */ + private static String formatMessage(Object offendingSymbol, int line, int charPositionInLine, String message, + RecognitionException e, String query) { + + String errorText = "At " + line + ":" + charPositionInLine; + + if (offendingSymbol instanceof CommonToken ct) { + + String token = ct.getText(); + if (!ObjectUtils.isEmpty(token)) { + errorText += " and token '" + token + "'"; + } + } + errorText += ", "; + + if (e instanceof NoViableAltException) { + + errorText += message.substring(0, message.indexOf('\'')); + if (query.isEmpty()) { + errorText += "'*' (empty query string)"; + } else { + + List list = query.lines().toList(); + String lineText = list.get(line - 1); + String text = lineText.substring(0, charPositionInLine) + "*" + lineText.substring(charPositionInLine); + errorText += "'" + text + "'"; + } + + } else if (e instanceof InputMismatchException) { + errorText += message.substring(0, message.length() - 1).replace(" expecting {", + ", expecting one of the following tokens: "); + } else { + errorText += message; + } + + return errorText; } } diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryRenderer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryRenderer.java index 26a4b775c8..36f8a2f62f 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryRenderer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryRenderer.java @@ -1752,7 +1752,7 @@ public QueryTokenStream visitFromDurationExpression(HqlParser.FromDurationExpres QueryRendererBuilder builder = QueryRenderer.builder(); - builder.append(visit(ctx.expression())); + builder.appendExpression(visit(ctx.expression())); builder.append(QueryTokens.expression(ctx.BY())); builder.appendExpression(visit(ctx.datetimeField())); diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryEnhancer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryEnhancer.java index 0c675029b6..3383ce1d1c 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryEnhancer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryEnhancer.java @@ -27,6 +27,7 @@ import org.antlr.v4.runtime.Lexer; import org.antlr.v4.runtime.Parser; import org.antlr.v4.runtime.ParserRuleContext; +import org.antlr.v4.runtime.RecognitionException; import org.antlr.v4.runtime.TokenStream; import org.antlr.v4.runtime.atn.PredictionMode; import org.antlr.v4.runtime.misc.ParseCancellationException; @@ -79,7 +80,14 @@ static

ParserRuleContext parse(String query, Function JpaQueryEnhancer.HqlQueryParser + .parseQuery("SELECT e FROM Employee e WHERE FOO(x).bar RESPECTING NULLS")) + .withMessageContaining("no viable alternative") + .withMessageContaining("SELECT e FROM Employee e WHERE FOO(x).bar *RESPECTING NULLS") + .withMessageContaining("Bad HQL grammar [SELECT e FROM Employee e WHERE FOO(x).bar RESPECTING NULLS]"); + } + + @Test // GH-3757 + void shouldReportExtraneousInput() { + + assertThatExceptionOfType(BadJpqlGrammarException.class) + .isThrownBy(() -> JpaQueryEnhancer.HqlQueryParser.parseQuery("select * from User group by name")) + .withMessageContaining("extraneous input '*'") + .withMessageContaining("Bad HQL grammar [select * from User group by name]"); + } + + @Test // GH-3757 + void shouldReportMismatchedInput() { + + assertThatExceptionOfType(BadJpqlGrammarException.class) + .isThrownBy(() -> JpaQueryEnhancer.HqlQueryParser.parseQuery("SELECT AVG(m.price) AS m.avg FROM Magazine m")) + .withMessageContaining("mismatched input '.'").withMessageContaining("expecting one of the following tokens:") + .withMessageContaining("EXCEPT") + .withMessageContaining("Bad HQL grammar [SELECT AVG(m.price) AS m.avg FROM Magazine m]"); + } + +} diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryRendererTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryRendererTests.java index 4de4c2b9df..922c20bc24 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryRendererTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryRendererTests.java @@ -1891,6 +1891,7 @@ void arithmeticDate() { assertQuery("SELECT a FROM foo a WHERE (cast(a.createdAt as date) - CURRENT_DATE()) BY day - 2 = 0"); assertQuery("SELECT a FROM foo a WHERE (cast(a.createdAt as date)) BY day - 2 = 0"); + assertQuery("SELECT f.start BY DAY - 2 FROM foo f"); assertQuery("SELECT f.start - 1 minute FROM foo f"); assertQuery("SELECT f FROM foo f WHERE (cast(f.start as date) - CURRENT_DATE()) BY day - 2 = 0"); From b0d5c2cbeb61ae6140f6f2419827306329814288 Mon Sep 17 00:00:00 2001 From: Yanming Zhou Date: Sun, 28 Apr 2024 09:36:37 +0800 Subject: [PATCH 42/87] Polishing. Add missing `@FunctionalInterface` to Specification interfaces. `SpecificationUnitTests` shouldn't be `Serializable`. Closes #3452 --- .../org/springframework/data/jpa/domain/Specification.java | 1 + .../data/jpa/domain/SpecificationUnitTests.java | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/Specification.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/Specification.java index ea626af591..74cd01f6d2 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/Specification.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/Specification.java @@ -39,6 +39,7 @@ * @author Daniel Shuy * @author Sergey Rukin */ +@FunctionalInterface public interface Specification extends Serializable { @Serial long serialVersionUID = 1L; diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/SpecificationUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/SpecificationUnitTests.java index 96f193b425..11e4a479f2 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/SpecificationUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/SpecificationUnitTests.java @@ -46,10 +46,9 @@ * @author Mark Paluch * @author Daniel Shuy */ -@SuppressWarnings("serial") @ExtendWith(MockitoExtension.class) @MockitoSettings(strictness = Strictness.LENIENT) -class SpecificationUnitTests implements Serializable { +class SpecificationUnitTests { private Specification spec; @Mock(serializable = true) Root root; @@ -163,7 +162,7 @@ void specificationsShouldBeSerializable() { assertThat(specification).isNotNull(); - @SuppressWarnings("unchecked") + @SuppressWarnings({"unchecked", "deprecation"}) Specification transferredSpecification = (Specification) deserialize(serialize(specification)); assertThat(transferredSpecification).isNotNull(); @@ -178,7 +177,7 @@ void complexSpecificationsShouldBeSerializable() { assertThat(specification).isNotNull(); - @SuppressWarnings("unchecked") + @SuppressWarnings({"unchecked", "deprecation"}) Specification transferredSpecification = (Specification) deserialize(serialize(specification)); assertThat(transferredSpecification).isNotNull(); From 70dcc34fb220a2c2c86740e2703110f1e457baba Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 31 Jan 2025 10:06:01 +0100 Subject: [PATCH 43/87] Polishing. Refine deprecation warnings. See #3452 --- .../data/jpa/domain/SpecificationUnitTests.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/SpecificationUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/SpecificationUnitTests.java index 11e4a479f2..368ccc7ff5 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/SpecificationUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/SpecificationUnitTests.java @@ -46,6 +46,7 @@ * @author Mark Paluch * @author Daniel Shuy */ +@SuppressWarnings("removal") @ExtendWith(MockitoExtension.class) @MockitoSettings(strictness = Strictness.LENIENT) class SpecificationUnitTests { @@ -119,7 +120,7 @@ void orConcatenatesNullSpecToSpec() { } @Test // GH-1943 - public void allOfConcatenatesNull() { + void allOfConcatenatesNull() { Specification specification = Specification.allOf(null, spec, null); @@ -128,7 +129,7 @@ public void allOfConcatenatesNull() { } @Test // GH-1943 - public void anyOfConcatenatesNull() { + void anyOfConcatenatesNull() { Specification specification = Specification.anyOf(null, spec, null); @@ -137,7 +138,7 @@ public void anyOfConcatenatesNull() { } @Test // GH-1943 - public void emptyAllOfReturnsEmptySpecification() { + void emptyAllOfReturnsEmptySpecification() { Specification specification = Specification.allOf(); @@ -146,7 +147,7 @@ public void emptyAllOfReturnsEmptySpecification() { } @Test // GH-1943 - public void emptyAnyOfReturnsEmptySpecification() { + void emptyAnyOfReturnsEmptySpecification() { Specification specification = Specification.anyOf(); @@ -162,7 +163,7 @@ void specificationsShouldBeSerializable() { assertThat(specification).isNotNull(); - @SuppressWarnings({"unchecked", "deprecation"}) + @SuppressWarnings({ "unchecked", "deprecation" }) Specification transferredSpecification = (Specification) deserialize(serialize(specification)); assertThat(transferredSpecification).isNotNull(); @@ -177,7 +178,7 @@ void complexSpecificationsShouldBeSerializable() { assertThat(specification).isNotNull(); - @SuppressWarnings({"unchecked", "deprecation"}) + @SuppressWarnings({ "unchecked", "deprecation" }) Specification transferredSpecification = (Specification) deserialize(serialize(specification)); assertThat(transferredSpecification).isNotNull(); From 12798f5701897c5bed76a6773fae0b8bb06ac9d2 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 31 Jan 2025 10:35:51 +0100 Subject: [PATCH 44/87] Remove duplicate plugin setup from parent pom. Closes #3474 --- pom.xml | 116 ---------------------------------------- spring-data-jpa/pom.xml | 49 +++++++++++++++-- 2 files changed, 46 insertions(+), 119 deletions(-) diff --git a/pom.xml b/pom.xml index 8b0c8e9197..b1e34a1e65 100755 --- a/pom.xml +++ b/pom.xml @@ -111,43 +111,6 @@ - - all-dbs - - - - org.apache.maven.plugins - maven-surefire-plugin - - - mysql-test - test - - test - - - - **/MySql*IntegrationTests.java - - - - - postgres-test - test - - test - - - - **/Postgres*IntegrationTests.java - - - - - - - - eclipselink-next @@ -188,85 +151,6 @@ - - - - org.apache.maven.plugins - maven-surefire-plugin - - - org.springframework - spring-instrument - ${spring} - runtime - - - - - - default-test - - - **/* - - - - - unit-test - - test - - test - - - **/*UnitTests.java - - - - - integration-test - - test - - test - - - **/*IntegrationTests.java - **/*Tests.java - - - **/*UnitTests.java - **/OpenJpa* - **/EclipseLink* - **/MySql* - **/Postgres* - - - -javaagent:${settings.localRepository}/org/springframework/spring-instrument/${spring}/spring-instrument-${spring}.jar - - - - - eclipselink-test - - test - - test - - - **/EclipseLink*Tests.java - - - -javaagent:${settings.localRepository}/org/eclipse/persistence/org.eclipse.persistence.jpa/${eclipselink}/org.eclipse.persistence.jpa-${eclipselink}.jar - -javaagent:${settings.localRepository}/org/springframework/spring-instrument/${spring}/spring-instrument-${spring}.jar - - - - - - - - diff --git a/spring-data-jpa/pom.xml b/spring-data-jpa/pom.xml index f3e0155d0e..305b2bb74e 100644 --- a/spring-data-jpa/pom.xml +++ b/spring-data-jpa/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 @@ -336,7 +337,8 @@ generate-sources true - ${project.basedir}/src/main/antlr4 + ${project.basedir}/src/main/antlr4 + @@ -427,4 +429,45 @@ + + + all-dbs + + + + org.apache.maven.plugins + maven-surefire-plugin + + + mysql-test + test + + test + + + + **/MySql*IntegrationTests.java + + + + + postgres-test + test + + test + + + + **/Postgres*IntegrationTests.java + + + + + + + + + + + From 0037b813c93113113f1973dbe326193f614cfe84 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 31 Jan 2025 10:58:58 +0100 Subject: [PATCH 45/87] Refine performance requirements on derived delete queries. Closes #3177 --- src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc b/src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc index 2eb3da8bdd..4673c0a0ac 100644 --- a/src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc +++ b/src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc @@ -629,6 +629,9 @@ To make sure lifecycle queries are actually invoked, an invocation of `deleteByR In fact, a derived delete query is a shortcut for running the query and then calling `CrudRepository.delete(Iterable users)` on the result and keeping behavior in sync with the implementations of other `delete(…)` methods in `CrudRepository`. +NOTE: When deleting a lot of objects you will need to consider the performance implications to ensure sufficient memory availability. +All resulting objects are loaded into memory before being deleted and are held in the session until flushing or completing the transaction. + [[jpa.query-hints]] == Applying Query Hints To apply JPA query hints to the queries declared in your repository interface, you can use the `@QueryHints` annotation. It takes an array of JPA `@QueryHint` annotations plus a boolean flag to potentially disable the hints applied to the additional count query triggered when applying pagination, as shown in the following example: From 412e5eee28e0d7a12b352770117c0a8199128221 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Wed, 5 Feb 2025 08:54:33 +0100 Subject: [PATCH 46/87] Consider sort order for unpaged Pageable in Querydsl. We now apply sorting using Querydsl for Pageable that is sorted but not paged. Closes #3761 --- .../data/jpa/repository/support/Querydsl.java | 9 ++++----- .../data/jpa/repository/support/SimpleJpaRepository.java | 2 -- .../support/QuerydslJpaPredicateExecutorUnitTests.java | 8 +++++++- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/Querydsl.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/Querydsl.java index cd3945bd14..d895d4717a 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/Querydsl.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/Querydsl.java @@ -108,12 +108,11 @@ public JPQLQuery applyPagination(Pageable pageable, JPQLQuery query) { Assert.notNull(pageable, "Pageable must not be null"); Assert.notNull(query, "JPQLQuery must not be null"); - if (pageable.isUnpaged()) { - return query; - } + if (pageable.isPaged()) { - query.offset(pageable.getOffset()); - query.limit(pageable.getPageSize()); + query.offset(pageable.getOffset()); + query.limit(pageable.getPageSize()); + } return applySorting(pageable.getSort(), query); } diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java index 759752f128..3ee2c7736f 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java @@ -723,7 +723,6 @@ protected Page readPage(TypedQuery query, final Class dom * @param pageable must not be {@literal null}. */ protected TypedQuery getQuery(@Nullable Specification spec, Pageable pageable) { - return getQuery(spec, getDomainClass(), pageable.getSort()); } @@ -736,7 +735,6 @@ protected TypedQuery getQuery(@Nullable Specification spec, Pageable pagea */ protected TypedQuery getQuery(@Nullable Specification spec, Class domainClass, Pageable pageable) { - return getQuery(spec, domainClass, pageable.getSort()); } diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/QuerydslJpaPredicateExecutorUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/QuerydslJpaPredicateExecutorUnitTests.java index 559bc0f2af..ef8d1c6c87 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/QuerydslJpaPredicateExecutorUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/QuerydslJpaPredicateExecutorUnitTests.java @@ -282,9 +282,15 @@ void shouldSupportFindAllWithPredicateAndSort() { assertThat(users).contains(carter, dave, oliver); } - @Test // DATAJPA-585 + @Test // DATAJPA-585, 3761 void worksWithUnpagedPageable() { + assertThat(predicateExecutor.findAll(user.dateOfBirth.isNull(), Pageable.unpaged()).getContent()).hasSize(3); + + Page users = predicateExecutor.findAll(user.dateOfBirth.isNull(), + Pageable.unpaged(Sort.by(Direction.ASC, "firstname"))); + + assertThat(users).containsExactly(carter, dave, oliver); } @Test // DATAJPA-912 From baca9e1995d69bc98d92b27a4c085df3d7296509 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Wed, 5 Feb 2025 09:56:24 +0100 Subject: [PATCH 47/87] Consider Sort override from Pageable using Fluent Query API. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We now consider properly a sort value from a given Pageable. Previously, the sort Parameter was not applied from Pageable but from a previous sort(…) call. Also, we apply the given Sort to the resulting Pageable to ensure sort continuity. Closes #3762 --- .../FetchableFluentQueryByPredicate.java | 20 +++++++---- .../FetchableFluentQueryBySpecification.java | 35 ++++++++++++------- .../support/FluentQuerySupport.java | 13 ++++++- .../jpa/repository/UserRepositoryTests.java | 30 ++++++++++++++++ ...QuerydslJpaPredicateExecutorUnitTests.java | 13 +++++++ 5 files changed, 91 insertions(+), 20 deletions(-) diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/FetchableFluentQueryByPredicate.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/FetchableFluentQueryByPredicate.java index fdc3bb28ae..e19e7bf0e2 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/FetchableFluentQueryByPredicate.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/FetchableFluentQueryByPredicate.java @@ -132,7 +132,7 @@ public FetchableFluentQuery project(Collection properties) { @Override public R oneValue() { - List results = createSortedAndProjectedQuery() // + List results = createSortedAndProjectedQuery(this.sort) // .limit(2) // Never need more than 2 values .fetch(); @@ -146,7 +146,7 @@ public R oneValue() { @Override public R firstValue() { - List results = createSortedAndProjectedQuery() // + List results = createSortedAndProjectedQuery(this.sort) // .limit(1) // Never need more than 1 value .fetch(); @@ -155,7 +155,11 @@ public R firstValue() { @Override public List all() { - return convert(createSortedAndProjectedQuery().fetch()); + return all(this.sort); + } + + private List all(Sort sort) { + return convert(createSortedAndProjectedQuery(sort).fetch()); } @Override @@ -168,13 +172,13 @@ public Window scroll(ScrollPosition scrollPosition) { @Override public Page page(Pageable pageable) { - return pageable.isUnpaged() ? new PageImpl<>(all()) : readPage(pageable); + return pageable.isUnpaged() ? new PageImpl<>(all(pageable.getSortOr(this.sort))) : readPage(pageable); } @Override public Stream stream() { - return createSortedAndProjectedQuery() // + return createSortedAndProjectedQuery(this.sort) // .stream() // .map(getConversionFunction()); } @@ -189,7 +193,7 @@ public boolean exists() { return existsOperation.apply(predicate); } - private AbstractJPAQuery createSortedAndProjectedQuery() { + private AbstractJPAQuery createSortedAndProjectedQuery(Sort sort) { AbstractJPAQuery query = finder.apply(sort); @@ -206,6 +210,7 @@ public boolean exists() { private Page readPage(Pageable pageable) { + Sort sort = pageable.getSortOr(this.sort); AbstractJPAQuery query = pagedFinder.apply(sort, pageable); if (!properties.isEmpty()) { @@ -214,7 +219,8 @@ private Page readPage(Pageable pageable) { List paginatedResults = convert(query.fetch()); - return PageableExecutionUtils.getPage(paginatedResults, pageable, () -> countOperation.apply(predicate)); + return PageableExecutionUtils.getPage(paginatedResults, withSort(pageable, sort), + () -> countOperation.apply(predicate)); } private List convert(List resultList) { diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/FetchableFluentQueryBySpecification.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/FetchableFluentQueryBySpecification.java index 534cd61330..4c9f2b501d 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/FetchableFluentQueryBySpecification.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/FetchableFluentQueryBySpecification.java @@ -89,8 +89,14 @@ public FetchableFluentQuery sortBy(Sort sort) { Assert.notNull(sort, "Sort must not be null"); - return new FetchableFluentQueryBySpecification<>(spec, entityType, resultType, this.sort.and(sort), limit, - properties, finder, scroll, countOperation, existsOperation, entityManager, projectionFactory); + Sort sort1 = this.sort.and(sort); + + if (this.sort == sort1) { + return this; + } + + return new FetchableFluentQueryBySpecification<>(spec, entityType, resultType, sort1, limit, properties, finder, + scroll, countOperation, existsOperation, entityManager, projectionFactory); } @Override @@ -98,8 +104,8 @@ public FetchableFluentQuery limit(int limit) { Assert.isTrue(limit >= 0, "Limit must not be negative"); - return new FetchableFluentQueryBySpecification<>(spec, entityType, resultType, sort, limit, - properties, finder, scroll, countOperation, existsOperation, entityManager, projectionFactory); + return new FetchableFluentQueryBySpecification<>(spec, entityType, resultType, sort, limit, properties, finder, + scroll, countOperation, existsOperation, entityManager, projectionFactory); } @Override @@ -124,7 +130,7 @@ public FetchableFluentQuery project(Collection properties) { @Override public R oneValue() { - List results = createSortedAndProjectedQuery() // + List results = createSortedAndProjectedQuery(this.sort) // .setMaxResults(2) // Never need more than 2 values .getResultList(); @@ -138,7 +144,7 @@ public R oneValue() { @Override public R firstValue() { - List results = createSortedAndProjectedQuery() // + List results = createSortedAndProjectedQuery(this.sort) // .setMaxResults(1) // Never need more than 1 value .getResultList(); @@ -147,7 +153,11 @@ public R firstValue() { @Override public List all() { - return convert(createSortedAndProjectedQuery().getResultList()); + return all(this.sort); + } + + private List all(Sort sort) { + return convert(createSortedAndProjectedQuery(sort).getResultList()); } @Override @@ -160,13 +170,13 @@ public Window scroll(ScrollPosition scrollPosition) { @Override public Page page(Pageable pageable) { - return pageable.isUnpaged() ? new PageImpl<>(all()) : readPage(pageable); + return pageable.isUnpaged() ? new PageImpl<>(all(pageable.getSortOr(this.sort))) : readPage(pageable); } @Override public Stream stream() { - return createSortedAndProjectedQuery() // + return createSortedAndProjectedQuery(this.sort) // .getResultStream() // .map(getConversionFunction()); } @@ -181,7 +191,7 @@ public boolean exists() { return existsOperation.apply(spec); } - private TypedQuery createSortedAndProjectedQuery() { + private TypedQuery createSortedAndProjectedQuery(Sort sort) { TypedQuery query = finder.apply(sort); @@ -198,7 +208,8 @@ private TypedQuery createSortedAndProjectedQuery() { private Page readPage(Pageable pageable) { - TypedQuery pagedQuery = createSortedAndProjectedQuery(); + Sort sort = pageable.getSortOr(this.sort); + TypedQuery pagedQuery = createSortedAndProjectedQuery(sort); if (pageable.isPaged()) { pagedQuery.setFirstResult(PageableUtils.getOffsetAsInteger(pageable)); @@ -207,7 +218,7 @@ private Page readPage(Pageable pageable) { List paginatedResults = convert(pagedQuery.getResultList()); - return PageableExecutionUtils.getPage(paginatedResults, pageable, () -> countOperation.apply(spec)); + return PageableExecutionUtils.getPage(paginatedResults, withSort(pageable, sort), () -> countOperation.apply(spec)); } private List convert(List resultList) { diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/FluentQuerySupport.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/FluentQuerySupport.java index 253610e78b..27fd7d6b68 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/FluentQuerySupport.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/FluentQuerySupport.java @@ -24,6 +24,8 @@ import java.util.function.Function; import org.springframework.core.convert.support.DefaultConversionService; +import org.springframework.data.domain.PageRequest; +import org.springframework.data.domain.Pageable; import org.springframework.data.domain.ScrollPosition; import org.springframework.data.domain.Sort; import org.springframework.data.projection.ProjectionFactory; @@ -49,7 +51,7 @@ abstract class FluentQuerySupport { protected final ProjectionFactory projectionFactory; FluentQuerySupport(Class resultType, Sort sort, int limit, @Nullable Collection properties, - Class entityType, ProjectionFactory projectionFactory) { + Class entityType, ProjectionFactory projectionFactory) { this.resultType = resultType; this.sort = sort; @@ -87,6 +89,15 @@ final Function getConversionFunction(Class inputType, Class tar return o -> DefaultConversionService.getSharedInstance().convert(o, targetType); } + Pageable withSort(Pageable pageable, Sort sort) { + + if (pageable instanceof PageRequest pr && pageable.getSort() != sort) { + return pr.withSort(sort); + } + + return pageable; + } + interface ScrollQueryFactory { Query createQuery(Sort sort, ScrollPosition scrollPosition); } diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/UserRepositoryTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/UserRepositoryTests.java index c433415b90..016300697c 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/UserRepositoryTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/UserRepositoryTests.java @@ -2434,6 +2434,24 @@ void findByFluentExamplePage() { assertThat(page1.getContent()).containsExactly(fourthUser); } + @Test // GH-3762 + void findByFluentExamplePageSortOverride() { + + flushTestUsers(); + + User prototype = new User(); + prototype.setFirstname("v"); + + Example userProbe = of(prototype, matching().withIgnorePaths("age", "createdAt", "active") + .withMatcher("firstname", GenericPropertyMatcher::contains)); + + Page page = repository.findBy(userProbe, // + q -> q.sortBy(Sort.by("firstname")).page(PageRequest.of(0, 2, Sort.by(DESC, "firstname")))); + + assertThat(page.getContent()).containsExactly(fourthUser, firstUser); + assertThat(repository.findAll(page.nextPageable())).containsExactly(secondUser, thirdUser); + } + @Test // GH-2294 void findByFluentExampleWithInterfaceBasedProjection() { @@ -2689,6 +2707,18 @@ void findByFluentSpecificationPage() { assertThat(page1.getContent()).containsExactly(fourthUser); } + @Test // GH-3762 + void findByFluentSpecificationSortOverridePage() { + + flushTestUsers(); + + Page page = repository.findBy(userHasFirstnameLike("v"), + q -> q.sortBy(Sort.by("firstname")).page(PageRequest.of(0, 2, Sort.by(DESC, "firstname")))); + + assertThat(page.getContent()).containsExactly(fourthUser, firstUser); + assertThat(repository.findAll(page.nextPageable())).containsExactly(secondUser, thirdUser); + } + @Test // GH-2274 void findByFluentSpecificationWithInterfaceBasedProjection() { diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/QuerydslJpaPredicateExecutorUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/QuerydslJpaPredicateExecutorUnitTests.java index ef8d1c6c87..87c4690190 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/QuerydslJpaPredicateExecutorUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/QuerydslJpaPredicateExecutorUnitTests.java @@ -399,6 +399,19 @@ void findByFluentPredicatePage() { assertThat(page1.getContent()).containsExactly(oliver); } + @Test // GH-3762 + void findByFluentPredicateSortOverridePage() { + + Predicate predicate = user.firstname.contains("v"); + + Page page = predicateExecutor.findBy(predicate, + q -> q.sortBy(Sort.by("firstname")).page(PageRequest.of(0, 1, Sort.by(Direction.DESC, "firstname")))); + + assertThat(page.getContent()).containsOnly(oliver); + assertThat(predicateExecutor.findAll(predicate, page.nextPageable())).containsOnly(dave); + + } + @Test // GH-2294 void findByFluentPredicateWithInterfaceBasedProjection() { From e40f51fcc5cf000f180ff37a417770a39520a254 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Mon, 10 Feb 2025 15:35:58 +0100 Subject: [PATCH 48/87] Upgrade to Hibernate 6.6.7.Final. Closes #3767 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index b1e34a1e65..6c5f875018 100755 --- a/pom.xml +++ b/pom.xml @@ -30,9 +30,9 @@ 4.13.0 4.0.5 4.0.6-SNAPSHOT - 6.6.4.Final + 6.6.7.Final 6.2.32.Final - 6.6.5-SNAPSHOT + 6.6.8-SNAPSHOT 7.0.0.Beta1 7.0.0-SNAPSHOT 2.7.4 From 0a4ad947c7c120e5269fa3091c9c9a07a235bcb8 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Tue, 11 Feb 2025 15:01:40 +0100 Subject: [PATCH 49/87] Bump memory to 4G. See #3767 --- spring-data-jpa/pom.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spring-data-jpa/pom.xml b/spring-data-jpa/pom.xml index 305b2bb74e..7ee72ca9ce 100644 --- a/spring-data-jpa/pom.xml +++ b/spring-data-jpa/pom.xml @@ -302,6 +302,7 @@ **/Postgres* + -Xmx4G -javaagent:${settings.localRepository}/org/springframework/spring-instrument/${spring}/spring-instrument-${spring}.jar @@ -317,6 +318,7 @@ **/EclipseLink*Tests.java + -Xmx4G -javaagent:${settings.localRepository}/org/eclipse/persistence/org.eclipse.persistence.jpa/${eclipselink}/org.eclipse.persistence.jpa-${eclipselink}.jar -javaagent:${settings.localRepository}/org/springframework/spring-instrument/${spring}/spring-instrument-${spring}.jar From b1355b9b86da7dbbf7171dc482ab76bea27ffef3 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Tue, 11 Feb 2025 15:22:44 +0100 Subject: [PATCH 50/87] Update CI Properties. See #3747 --- .mvn/extensions.xml | 2 +- .mvn/jvm.config | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 .mvn/jvm.config diff --git a/.mvn/extensions.xml b/.mvn/extensions.xml index 1e3bb355f5..e0857eaa25 100644 --- a/.mvn/extensions.xml +++ b/.mvn/extensions.xml @@ -3,6 +3,6 @@ io.spring.develocity.conventions develocity-conventions-maven-extension - 0.0.19 + 0.0.22 diff --git a/.mvn/jvm.config b/.mvn/jvm.config new file mode 100644 index 0000000000..32599cefea --- /dev/null +++ b/.mvn/jvm.config @@ -0,0 +1,10 @@ +--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED +--add-opens jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED +--add-opens jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED From 789e4bfadbc521735ddb78436bfbe6539abd89e8 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Thu, 13 Feb 2025 09:48:11 +0100 Subject: [PATCH 51/87] Refine Querydsl documentation. Closes #3774 --- .../pages/repositories/core-extensions.adoc | 88 ++++++++++++++++++- 1 file changed, 87 insertions(+), 1 deletion(-) diff --git a/src/main/antora/modules/ROOT/pages/repositories/core-extensions.adoc b/src/main/antora/modules/ROOT/pages/repositories/core-extensions.adoc index a7c2ff8d3c..251542dbff 100644 --- a/src/main/antora/modules/ROOT/pages/repositories/core-extensions.adoc +++ b/src/main/antora/modules/ROOT/pages/repositories/core-extensions.adoc @@ -1 +1,87 @@ -include::{commons}@data-commons::page$repositories/core-extensions.adoc[] +[[core.extensions]] += Spring Data Extensions + +This section documents a set of Spring Data extensions that enable Spring Data usage in a variety of contexts. +Currently, most of the integration is targeted towards Spring MVC. + +include::{commons}@data-commons::page$repositories/core-extensions-querydsl.adoc[leveloffset=1] + +[[jpa.repositories.queries.type-safe.apt]] +=== Setting up Annotation Processing + +To use Querydsl with Spring Data JPA, you need to set up annotation processing in your build system that generates the `Q` classes. +While you could write the `Q` classes by hand, it is recommended to use the Querydsl annotation processor to generate them for you to keep your `Q` classes in sync with your domain model. + +Most Spring Data users do not use Querydsl, so it does not make sense to require additional mandatory dependencies for projects that would not benefit from Querydsl. +Hence, you need to activate annotation processing in your build system. + +The following example shows how to set up annotation processing by mentioning dependencies and compiler config changes in Maven and Gradle: + +[tabs] +====== +Maven:: ++ +[source,xml,indent=0,subs="verbatim,quotes",role="primary"] +---- + + + com.querydsl + querydsl-jpa + ${querydslVersion} + jakarta + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + + + + com.querydsl + querydsl-apt + ${querydslVersion} + jakarta + + + jakarta.persistence + jakarta.persistence-api + + + + + target/generated-test-sources + target/generated-sources + + + + +---- + +Gradle:: ++ +==== +[source,groovy,indent=0,subs="verbatim,quotes",role="secondary"] +---- +dependencies { + + implementation 'com.querydsl:querydsl-jpa:${querydslVersion}:jakarta' + annotationProcessor 'com.querydsl:querydsl-apt:${querydslVersion}:jakarta' + annotationProcessor 'jakarta.persistence:jakarta.persistence-api' + + testAnnotationProcessor 'com.querydsl:querydsl-apt:${querydslVersion}:jakarta' + testAnnotationProcessor 'jakarta.persistence:jakarta.persistence-api' +} +---- +==== +====== + +Note that the setup above shows the simplemost usage omitting any other options or dependencies that your project might require. + +include::{commons}@data-commons::page$repositories/core-extensions-web.adoc[leveloffset=1] + +include::{commons}@data-commons::page$repositories/core-extensions-populators.adoc[leveloffset=1] From 8c3668f31582a6da754e89f5c144e0fa675c2f29 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 14 Feb 2025 10:39:45 +0100 Subject: [PATCH 52/87] Prepare 3.4.3 (2024.1.3). See #3747 --- pom.xml | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/pom.xml b/pom.xml index 6c5f875018..78d30d9d83 100755 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.springframework.data.build spring-data-parent - 3.4.3-SNAPSHOT + 3.4.3 @@ -41,7 +41,7 @@ 5.0 9.1.0 42.7.4 - 3.4.3-SNAPSHOT + 3.4.3 0.10.3 org.hibernate @@ -173,20 +173,8 @@ - - spring-snapshot - https://repo.spring.io/snapshot - - true - - - false - - - - spring-milestone - https://repo.spring.io/milestone - + + From edbd726c51d5eb14fb17e61f9dfade0351cb5494 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 14 Feb 2025 10:40:04 +0100 Subject: [PATCH 53/87] Release version 3.4.3 (2024.1.3). See #3747 --- pom.xml | 2 +- spring-data-envers/pom.xml | 4 ++-- spring-data-jpa-distribution/pom.xml | 2 +- spring-data-jpa/pom.xml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index 78d30d9d83..378961f298 100755 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.springframework.data spring-data-jpa-parent - 3.4.3-SNAPSHOT + 3.4.3 pom Spring Data JPA Parent diff --git a/spring-data-envers/pom.xml b/spring-data-envers/pom.xml index 4e53dc3a26..b23d048d51 100755 --- a/spring-data-envers/pom.xml +++ b/spring-data-envers/pom.xml @@ -5,12 +5,12 @@ org.springframework.data spring-data-envers - 3.4.3-SNAPSHOT + 3.4.3 org.springframework.data spring-data-jpa-parent - 3.4.3-SNAPSHOT + 3.4.3 ../pom.xml diff --git a/spring-data-jpa-distribution/pom.xml b/spring-data-jpa-distribution/pom.xml index 43d568f017..020be2b075 100644 --- a/spring-data-jpa-distribution/pom.xml +++ b/spring-data-jpa-distribution/pom.xml @@ -14,7 +14,7 @@ org.springframework.data spring-data-jpa-parent - 3.4.3-SNAPSHOT + 3.4.3 ../pom.xml diff --git a/spring-data-jpa/pom.xml b/spring-data-jpa/pom.xml index 7ee72ca9ce..03ebb10b92 100644 --- a/spring-data-jpa/pom.xml +++ b/spring-data-jpa/pom.xml @@ -7,7 +7,7 @@ org.springframework.data spring-data-jpa - 3.4.3-SNAPSHOT + 3.4.3 Spring Data JPA Spring Data module for JPA repositories. @@ -16,7 +16,7 @@ org.springframework.data spring-data-jpa-parent - 3.4.3-SNAPSHOT + 3.4.3 ../pom.xml From e9be8e21cf28e07122ef8f1f6a4218e97e0fdf19 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 14 Feb 2025 10:42:41 +0100 Subject: [PATCH 54/87] Prepare next development iteration. See #3747 --- pom.xml | 2 +- spring-data-envers/pom.xml | 4 ++-- spring-data-jpa-distribution/pom.xml | 2 +- spring-data-jpa/pom.xml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index 378961f298..86417d567c 100755 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.springframework.data spring-data-jpa-parent - 3.4.3 + 3.4.4-SNAPSHOT pom Spring Data JPA Parent diff --git a/spring-data-envers/pom.xml b/spring-data-envers/pom.xml index b23d048d51..4493905df5 100755 --- a/spring-data-envers/pom.xml +++ b/spring-data-envers/pom.xml @@ -5,12 +5,12 @@ org.springframework.data spring-data-envers - 3.4.3 + 3.4.4-SNAPSHOT org.springframework.data spring-data-jpa-parent - 3.4.3 + 3.4.4-SNAPSHOT ../pom.xml diff --git a/spring-data-jpa-distribution/pom.xml b/spring-data-jpa-distribution/pom.xml index 020be2b075..9b1c7af2ca 100644 --- a/spring-data-jpa-distribution/pom.xml +++ b/spring-data-jpa-distribution/pom.xml @@ -14,7 +14,7 @@ org.springframework.data spring-data-jpa-parent - 3.4.3 + 3.4.4-SNAPSHOT ../pom.xml diff --git a/spring-data-jpa/pom.xml b/spring-data-jpa/pom.xml index 03ebb10b92..ebe2fb73b8 100644 --- a/spring-data-jpa/pom.xml +++ b/spring-data-jpa/pom.xml @@ -7,7 +7,7 @@ org.springframework.data spring-data-jpa - 3.4.3 + 3.4.4-SNAPSHOT Spring Data JPA Spring Data module for JPA repositories. @@ -16,7 +16,7 @@ org.springframework.data spring-data-jpa-parent - 3.4.3 + 3.4.4-SNAPSHOT ../pom.xml From 187754a99bc45ad9bc7f4396f220da18e951b199 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 14 Feb 2025 10:42:42 +0100 Subject: [PATCH 55/87] After release cleanups. See #3747 --- pom.xml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 86417d567c..30ae5c981b 100755 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.springframework.data.build spring-data-parent - 3.4.3 + 3.4.4-SNAPSHOT @@ -41,7 +41,7 @@ 5.0 9.1.0 42.7.4 - 3.4.3 + 3.4.4-SNAPSHOT 0.10.3 org.hibernate @@ -173,8 +173,20 @@ - - + + spring-snapshot + https://repo.spring.io/snapshot + + true + + + false + + + + spring-milestone + https://repo.spring.io/milestone + From 7f170ea408e31e94517e7a9db805cabac4041a20 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Mon, 24 Feb 2025 11:57:43 +0100 Subject: [PATCH 56/87] Refine count-query derivation parameter post-processing. We've now expanded parameter post-processing for derived count queries to consider binding types (in, like) and to correctly retain invocation parameter redirects instead of assuming an exact mapping of parameter positions in the final query to the actual invocation argument names/indices. Closes #3784 --- .../repository/query/ParameterBinding.java | 14 +++ .../jpa/repository/query/StringQuery.java | 9 +- .../query/StringQueryUnitTests.java | 102 ++++++++++++++++++ 3 files changed, 123 insertions(+), 2 deletions(-) diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ParameterBinding.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ParameterBinding.java index 65fa814d42..e5cffccaf6 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ParameterBinding.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ParameterBinding.java @@ -156,6 +156,10 @@ public Object prepare(@Nullable Object valueToBind) { */ public boolean bindsTo(ParameterBinding other) { + if (getIdentifier().equals(other.getIdentifier())) { + return true; + } + if (identifier.hasName() && other.identifier.hasName()) { if (identifier.getName().equals(other.identifier.getName())) { return true; @@ -503,6 +507,16 @@ static Expression ofExpression(ValueExpression expression) { return new Expression(expression); } + /** + * Creates a {@link MethodInvocationArgument} object for {@code name} + * + * @param name the parameter name from the method invocation. + * @return {@link MethodInvocationArgument} object for {@code name}. + */ + static MethodInvocationArgument ofParameter(String name) { + return ofParameter(name, null); + } + /** * Creates a {@link MethodInvocationArgument} object for {@code name} and {@code position}. Either the name or the * position must be given. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/StringQuery.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/StringQuery.java index 8bc8dff0a8..4e794dee58 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/StringQuery.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/StringQuery.java @@ -23,6 +23,7 @@ import java.util.function.BiFunction; import java.util.function.Consumer; import java.util.function.Function; +import java.util.function.Predicate; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -141,8 +142,12 @@ public DeclaredQuery deriveCountQuery(@Nullable String countQueryProjection) { for (ParameterBinding binding : bindings) { - if (binding.getOrigin().isExpression() && derivedBindings.removeIf( - it -> !it.getOrigin().isExpression() && it.getIdentifier().equals(binding.getIdentifier()))) { + Predicate identifier = binding::bindsTo; + Predicate notCompatible = Predicate.not(binding::isCompatibleWith); + + // replace incompatible bindings + if ( derivedBindings.removeIf( + it -> identifier.test(it) && notCompatible.test(it))) { derivedBindings.add(binding); } } diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/StringQueryUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/StringQueryUnitTests.java index 04bf714ae4..4c0bd3376a 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/StringQueryUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/StringQueryUnitTests.java @@ -161,6 +161,66 @@ void rewritesNamedLikeToUniqueParametersIfNecessary() { assertThat(((MethodInvocationArgument) parameterBinding.getOrigin()).identifier().getName()).isEqualTo("firstname"); } + @Test // GH-3784 + void rewritesNamedLikeToUniqueParametersRetainingCountQuery() { + + DeclaredQuery query = new StringQuery( + "select u from User u where u.firstname like %:firstname or u.firstname like :firstname% or u.firstname = :firstname", + false).deriveCountQuery(null); + + assertThat(query.getQueryString()) // + .isEqualTo( + "select count(u) from User u where u.firstname like :firstname or u.firstname like :firstname_1 or u.firstname = :firstname_2"); + + List bindings = query.getParameterBindings(); + assertThat(bindings).hasSize(3); + + LikeParameterBinding binding = (LikeParameterBinding) bindings.get(0); + assertThat(binding).isNotNull(); + assertThat(binding.getOrigin()).isEqualTo(ParameterOrigin.ofParameter("firstname")); + assertThat(binding.getName()).isEqualTo("firstname"); + assertThat(binding.getType()).isEqualTo(Type.ENDING_WITH); + + binding = (LikeParameterBinding) bindings.get(1); + assertThat(binding).isNotNull(); + assertThat(binding.getOrigin()).isEqualTo(ParameterOrigin.ofParameter("firstname")); + assertThat(binding.getName()).isEqualTo("firstname_1"); + assertThat(binding.getType()).isEqualTo(Type.STARTING_WITH); + + ParameterBinding parameterBinding = bindings.get(2); + assertThat(parameterBinding).isNotNull(); + assertThat(parameterBinding.getOrigin()).isEqualTo(ParameterOrigin.ofParameter("firstname")); + assertThat(parameterBinding.getName()).isEqualTo("firstname_2"); + assertThat(((MethodInvocationArgument) parameterBinding.getOrigin()).identifier().getName()).isEqualTo("firstname"); + } + + @Test // GH-3784 + void rewritesExpressionsLikeToUniqueParametersRetainingCountQuery() { + + DeclaredQuery query = new StringQuery( + "select u from User u where u.firstname like %:#{firstname} or u.firstname like :#{firstname}%", false) + .deriveCountQuery(null); + + assertThat(query.getQueryString()) // + .isEqualTo( + "select count(u) from User u where u.firstname like :__$synthetic$__1 or u.firstname like :__$synthetic$__2"); + + List bindings = query.getParameterBindings(); + assertThat(bindings).hasSize(2); + + LikeParameterBinding binding = (LikeParameterBinding) bindings.get(0); + assertThat(binding).isNotNull(); + assertThat(binding.getOrigin().isExpression()).isTrue(); + assertThat(binding.getName()).isEqualTo("__$synthetic$__1"); + assertThat(binding.getType()).isEqualTo(Type.ENDING_WITH); + + binding = (LikeParameterBinding) bindings.get(1); + assertThat(binding).isNotNull(); + assertThat(binding.getOrigin().isExpression()).isTrue(); + assertThat(binding.getName()).isEqualTo("__$synthetic$__2"); + assertThat(binding.getType()).isEqualTo(Type.STARTING_WITH); + } + @Test // GH-3041 void rewritesPositionalLikeToUniqueParametersIfNecessary() { @@ -264,6 +324,48 @@ void detectsMultipleNamedInParameterBindings() { assertNamedBinding(ParameterBinding.class, "bar", bindings.get(2)); } + @Test // GH-3784 + void deriveCountQueryWithNamedInRetainsOrigin() { + + String queryString = "select u from User u where (:logins) IS NULL OR LOWER(u.login) IN (:logins)"; + DeclaredQuery query = new StringQuery(queryString, false).deriveCountQuery(null); + + assertThat(query.getQueryString()) + .isEqualTo("select count(u) from User u where (:logins) IS NULL OR LOWER(u.login) IN (:logins_1)"); + + List bindings = query.getParameterBindings(); + assertThat(bindings).hasSize(2); + + assertNamedBinding(ParameterBinding.class, "logins", bindings.get(0)); + assertThat((MethodInvocationArgument) bindings.get(0).getOrigin()).extracting(MethodInvocationArgument::identifier) + .extracting(BindingIdentifier::getName).isEqualTo("logins"); + + assertNamedBinding(InParameterBinding.class, "logins_1", bindings.get(1)); + assertThat((MethodInvocationArgument) bindings.get(1).getOrigin()).extracting(MethodInvocationArgument::identifier) + .extracting(BindingIdentifier::getName).isEqualTo("logins"); + } + + @Test // GH-3784 + void deriveCountQueryWithPositionalInRetainsOrigin() { + + String queryString = "select u from User u where (?1) IS NULL OR LOWER(u.login) IN (?1)"; + DeclaredQuery query = new StringQuery(queryString, false).deriveCountQuery(null); + + assertThat(query.getQueryString()) + .isEqualTo("select count(u) from User u where (?1) IS NULL OR LOWER(u.login) IN (?2)"); + + List bindings = query.getParameterBindings(); + assertThat(bindings).hasSize(2); + + assertPositionalBinding(ParameterBinding.class, 1, bindings.get(0)); + assertThat((MethodInvocationArgument) bindings.get(0).getOrigin()).extracting(MethodInvocationArgument::identifier) + .extracting(BindingIdentifier::getPosition).isEqualTo(1); + + assertPositionalBinding(InParameterBinding.class, 2, bindings.get(1)); + assertThat((MethodInvocationArgument) bindings.get(1).getOrigin()).extracting(MethodInvocationArgument::identifier) + .extracting(BindingIdentifier::getPosition).isEqualTo(1); + } + @Test // DATAJPA-461 void detectsPositionalInParameterBindings() { From d34899a8c54c43af235ab830b660663479fc2778 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Tue, 25 Feb 2025 10:49:48 +0100 Subject: [PATCH 57/87] Reuse existing FETCH JOINs when creating Expressions from PropertyPath. We now consider existing fetch joins for attributes when CriteriaQuery has used a fetch join already. This helps Hibernate to e.g. include mandatory fields in the select list when using DISTINCT using fetch joins. Closes #2756 --- .../data/jpa/repository/query/QueryUtils.java | 9 ++++- ...EclipseLinkQueryUtilsIntegrationTests.java | 35 +++++++++++++++++ .../query/QueryUtilsIntegrationTests.java | 39 +++++++++++++++++++ 3 files changed, 82 insertions(+), 1 deletion(-) diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryUtils.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryUtils.java index 73b34bffd2..3da0fe229c 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryUtils.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryUtils.java @@ -889,7 +889,7 @@ private static T getAnnotationProperty(Attribute attribute, String pro } /** - * Returns an existing join for the given attribute if one already exists or creates a new one if not. + * Returns an existing (fetch) join for the given attribute if one already exists or creates a new one if not. * * @param from the {@link From} to get the current joins from. * @param attribute the {@link Attribute} to look for in the current joins. @@ -898,6 +898,13 @@ private static T getAnnotationProperty(Attribute attribute, String pro */ private static Join getOrCreateJoin(From from, String attribute, JoinType joinType) { + for (Fetch fetch : from.getFetches()) { + + if (fetch instanceof Join join && join.getAttribute().getName().equals(attribute)) { + return join; + } + } + for (Join join : from.getJoins()) { if (join.getAttribute().getName().equals(attribute)) { diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EclipseLinkQueryUtilsIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EclipseLinkQueryUtilsIntegrationTests.java index e607648544..ce1b95d90e 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EclipseLinkQueryUtilsIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EclipseLinkQueryUtilsIntegrationTests.java @@ -15,11 +15,25 @@ */ package org.springframework.data.jpa.repository.query; +import static org.assertj.core.api.Assertions.*; + +import jakarta.persistence.criteria.CriteriaBuilder; +import jakarta.persistence.criteria.CriteriaQuery; +import jakarta.persistence.criteria.Path; +import jakarta.persistence.criteria.Root; + +import org.junit.jupiter.api.Test; + +import org.springframework.data.jpa.domain.sample.User; +import org.springframework.data.mapping.PropertyPath; import org.springframework.test.context.ContextConfiguration; /** + * EclipseLink variant of {@link QueryUtilsIntegrationTests}. + * * @author Oliver Gierke * @author Jens Schauder + * @author Mark Paluch */ @ContextConfiguration("classpath:eclipselink.xml") class EclipseLinkQueryUtilsIntegrationTests extends QueryUtilsIntegrationTests { @@ -28,4 +42,25 @@ int getNumberOfJoinsAfterCreatingAPath() { return 1; } + @Test // GH-2756 + @Override + void prefersFetchOverJoin() { + + CriteriaBuilder builder = em.getCriteriaBuilder(); + CriteriaQuery query = builder.createQuery(User.class); + Root from = query.from(User.class); + from.fetch("manager"); + from.join("manager"); + + PropertyPath managerFirstname = PropertyPath.from("manager.firstname", User.class); + PropertyPath managerLastname = PropertyPath.from("manager.lastname", User.class); + + QueryUtils.toExpressionRecursively(from, managerLastname); + Path expr = (Path) QueryUtils.toExpressionRecursively(from, managerFirstname); + + assertThat(expr.getParentPath()).hasFieldOrPropertyWithValue("isFetch", true); + assertThat(from.getFetches()).hasSize(1); + assertThat(from.getJoins()).hasSize(1); + } + } diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryUtilsIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryUtilsIntegrationTests.java index d2bf333dec..1d4f917a5d 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryUtilsIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryUtilsIntegrationTests.java @@ -32,6 +32,7 @@ import jakarta.persistence.criteria.From; import jakarta.persistence.criteria.Join; import jakarta.persistence.criteria.JoinType; +import jakarta.persistence.criteria.Path; import jakarta.persistence.criteria.Root; import jakarta.persistence.spi.PersistenceProvider; import jakarta.persistence.spi.PersistenceProviderResolver; @@ -91,6 +92,44 @@ void reusesExistingJoinForExpression() { assertThat(from.getJoins()).hasSize(1); } + @Test // GH-2756 + void reusesExistingFetchJoinForExpression() { + + CriteriaBuilder builder = em.getCriteriaBuilder(); + CriteriaQuery query = builder.createQuery(User.class); + Root from = query.from(User.class); + from.fetch("manager"); + + PropertyPath managerFirstname = PropertyPath.from("manager.firstname", User.class); + PropertyPath managerLastname = PropertyPath.from("manager.lastname", User.class); + + QueryUtils.toExpressionRecursively(from, managerLastname); + QueryUtils.toExpressionRecursively(from, managerFirstname); + + assertThat(from.getFetches()).hasSize(1); + assertThat(from.getJoins()).isEmpty(); + } + + @Test // GH-2756 + void prefersFetchOverJoin() { + + CriteriaBuilder builder = em.getCriteriaBuilder(); + CriteriaQuery query = builder.createQuery(User.class); + Root from = query.from(User.class); + from.fetch("manager"); + from.join("manager"); + + PropertyPath managerFirstname = PropertyPath.from("manager.firstname", User.class); + PropertyPath managerLastname = PropertyPath.from("manager.lastname", User.class); + + QueryUtils.toExpressionRecursively(from, managerLastname); + Path expr = (Path) QueryUtils.toExpressionRecursively(from, managerFirstname); + + assertThat(expr.getParentPath()).hasFieldOrPropertyWithValue("fetched", true); + assertThat(from.getFetches()).hasSize(1); + assertThat(from.getJoins()).hasSize(1); + } + @Test // DATAJPA-401, DATAJPA-1238 void createsJoinForNavigationAcrossOptionalAssociation() { From 4cb65185bb3dfc6c42e4470918f54c08e565338f Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Tue, 25 Feb 2025 10:57:40 +0100 Subject: [PATCH 58/87] Upgrade to Hibernate 6.6.9.Final. Closes #3788 --- pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 30ae5c981b..ab3af6a422 100755 --- a/pom.xml +++ b/pom.xml @@ -30,9 +30,9 @@ 4.13.0 4.0.5 4.0.6-SNAPSHOT - 6.6.7.Final - 6.2.32.Final - 6.6.8-SNAPSHOT + 6.6.9.Final + 6.2.33.Final + 6.6.10-SNAPSHOT 7.0.0.Beta1 7.0.0-SNAPSHOT 2.7.4 From 668c335bc7185767d65e1153b0bf86445ff7754f Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Mon, 3 Mar 2025 11:55:55 +0100 Subject: [PATCH 59/87] Refine entity state detection wording using primitive versions. Closes #3798 --- src/main/antora/modules/ROOT/pages/jpa/entity-persistence.adoc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/antora/modules/ROOT/pages/jpa/entity-persistence.adoc b/src/main/antora/modules/ROOT/pages/jpa/entity-persistence.adoc index 0c8392585e..c5f8cb8de5 100644 --- a/src/main/antora/modules/ROOT/pages/jpa/entity-persistence.adoc +++ b/src/main/antora/modules/ROOT/pages/jpa/entity-persistence.adoc @@ -18,6 +18,7 @@ Spring Data JPA offers the following strategies to detect whether an entity is n Without such a Version-property Spring Data JPA inspects the identifier property of the given entity. If the identifier property is `null`, then the entity is assumed to be new. Otherwise, it is assumed to be not new. +In contrast to other Spring Data modules, JPA considers `0` (zero) as the first inserted version of an entity and therefore, a primitive version property cannot be used to determine whether an entity is new or not. 2. Implementing `Persistable`: If an entity implements `Persistable`, Spring Data JPA delegates the new detection to the `isNew(…)` method of the entity. See the link:$$https://docs.spring.io/spring-data/data-commons/docs/current/api/index.html?org/springframework/data/domain/Persistable.html$$[JavaDoc] for details. 3. Implementing `EntityInformation`: You can customize the `EntityInformation` abstraction used in the `SimpleJpaRepository` implementation by creating a subclass of `JpaRepositoryFactory` and overriding the `getEntityInformation(…)` method accordingly. You then have to register the custom implementation of `JpaRepositoryFactory` as a Spring bean. Note that this should be rarely necessary. See the javadoc:org.springframework.data.jpa.repository.support.JpaRepositoryFactory[JavaDoc] for details. From 7ea9391c4357da9a38298cb4c181faff6be6f5ee Mon Sep 17 00:00:00 2001 From: Christoph Strobl Date: Fri, 28 Feb 2025 12:49:11 +0100 Subject: [PATCH 60/87] Fix regression in HQL parsing when primary alias is missing. Original pull request: #3793 Closes #3792 --- .../data/jpa/repository/query/HqlCountQueryTransformer.java | 5 +++++ .../data/jpa/repository/query/HqlQueryTransformerTests.java | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlCountQueryTransformer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlCountQueryTransformer.java index a19f971af3..f310630d70 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlCountQueryTransformer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlCountQueryTransformer.java @@ -100,8 +100,13 @@ public QueryRendererBuilder visitFromQuery(HqlParser.FromQueryContext ctx) { if (ctx.fromClause() != null) { builder.appendExpression(visit(ctx.fromClause())); + if(primaryFromAlias == null) { + builder.append(TOKEN_AS); + builder.append(TOKEN_DOUBLE_UNDERSCORE); + } } + if (ctx.whereClause() != null) { builder.appendExpression(visit(ctx.whereClause())); } diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryTransformerTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryTransformerTests.java index 867e3f87b2..40a8c4dc7a 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryTransformerTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryTransformerTests.java @@ -919,11 +919,11 @@ void queryParserPicksCorrectAliasAmidstMultipleAlises() { assertThat(alias("select u from User as u left join u.roles as r")).isEqualTo("u"); } - @Test // GH-2032 + @Test // GH-2032, GH-3792 void countQueryShouldWorkEvenWithoutExplicitAlias() { assertCountQuery("FROM BookError WHERE portal = :portal", - "select count(__) FROM BookError WHERE portal = :portal"); + "select count(__) FROM BookError AS __ WHERE portal = :portal"); assertCountQuery("FROM BookError b WHERE portal = :portal", "select count(b) FROM BookError b WHERE portal = :portal"); From 99840c9c35fd961cea28731e17bc458d8b396bc3 Mon Sep 17 00:00:00 2001 From: ArnaudLec Date: Fri, 28 Feb 2025 18:17:53 +0100 Subject: [PATCH 61/87] Consider MatchMode when joining associations for QueryByExample. This commit makes sure to use different join types depending on the actual match mode. Closes: #3763 Original Pull Request: #3794 Signed-off-by: ArnaudLec --- .../QueryByExamplePredicateBuilder.java | 15 ++++++++----- ...eryByExamplePredicateBuilderUnitTests.java | 21 +++++++++++++++++++ 2 files changed, 31 insertions(+), 5 deletions(-) diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/convert/QueryByExamplePredicateBuilder.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/convert/QueryByExamplePredicateBuilder.java index 993f42f3b2..9b7cfb818a 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/convert/QueryByExamplePredicateBuilder.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/convert/QueryByExamplePredicateBuilder.java @@ -18,6 +18,7 @@ import jakarta.persistence.criteria.CriteriaBuilder; import jakarta.persistence.criteria.Expression; import jakarta.persistence.criteria.From; +import jakarta.persistence.criteria.JoinType; import jakarta.persistence.criteria.Path; import jakarta.persistence.criteria.Predicate; import jakarta.persistence.criteria.Root; @@ -57,6 +58,7 @@ * @author Oliver Gierke * @author Jens Schauder * @author Greg Turnquist + * @author Arnaud Lecointre * @since 1.10 */ public class QueryByExamplePredicateBuilder { @@ -103,7 +105,8 @@ public static Predicate getPredicate(Root root, CriteriaBuilder cb, Examp ExampleMatcher matcher = example.getMatcher(); List predicates = getPredicates("", cb, root, root.getModel(), example.getProbe(), - example.getProbeType(), new ExampleMatcherAccessor(matcher), new PathNode("root", null, example.getProbe()), + example.getProbeType(), matcher, new ExampleMatcherAccessor(matcher), + new PathNode("root", null, example.getProbe()), escapeCharacter); if (predicates.isEmpty()) { @@ -121,7 +124,7 @@ public static Predicate getPredicate(Root root, CriteriaBuilder cb, Examp @SuppressWarnings({ "rawtypes", "unchecked" }) static List getPredicates(String path, CriteriaBuilder cb, Path from, ManagedType type, Object value, - Class probeType, ExampleMatcherAccessor exampleAccessor, PathNode currentNode, + Class probeType, ExampleMatcher matcher, ExampleMatcherAccessor exampleAccessor, PathNode currentNode, EscapeCharacter escapeCharacter) { List predicates = new ArrayList<>(); @@ -158,7 +161,7 @@ static List getPredicates(String path, CriteriaBuilder cb, Path fr predicates .addAll(getPredicates(currentPath, cb, from.get(attribute.getName()), (ManagedType) attribute.getType(), - attributeValue, probeType, exampleAccessor, currentNode, escapeCharacter)); + attributeValue, probeType, matcher, exampleAccessor, currentNode, escapeCharacter)); continue; } @@ -171,8 +174,10 @@ static List getPredicates(String path, CriteriaBuilder cb, Path fr ClassUtils.getShortName(probeType), node)); } - predicates.addAll(getPredicates(currentPath, cb, ((From) from).join(attribute.getName()), - (ManagedType) attribute.getType(), attributeValue, probeType, exampleAccessor, node, escapeCharacter)); + JoinType joinType = matcher.isAllMatching() ? JoinType.INNER : JoinType.LEFT; + predicates.addAll(getPredicates(currentPath, cb, ((From) from).join(attribute.getName(), joinType), + (ManagedType) attribute.getType(), attributeValue, probeType, matcher, exampleAccessor, node, + escapeCharacter)); continue; } diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/convert/QueryByExamplePredicateBuilderUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/convert/QueryByExamplePredicateBuilderUnitTests.java index db43691aa5..0b80e764e3 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/convert/QueryByExamplePredicateBuilderUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/convert/QueryByExamplePredicateBuilderUnitTests.java @@ -16,6 +16,7 @@ package org.springframework.data.jpa.convert; import static org.assertj.core.api.Assertions.*; +import static org.mockito.ArgumentMatchers.*; import static org.mockito.Mockito.*; import static org.springframework.data.domain.Example.*; @@ -23,6 +24,7 @@ import jakarta.persistence.criteria.CriteriaBuilder; import jakarta.persistence.criteria.Expression; import jakarta.persistence.criteria.Join; +import jakarta.persistence.criteria.JoinType; import jakarta.persistence.criteria.Path; import jakarta.persistence.criteria.Predicate; import jakarta.persistence.criteria.Root; @@ -39,6 +41,8 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.CsvSource; import org.mockito.ArgumentMatchers; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; @@ -47,6 +51,7 @@ import org.springframework.data.domain.Example; import org.springframework.data.domain.ExampleMatcher; import org.springframework.data.domain.ExampleMatcher.GenericPropertyMatcher; +import org.springframework.data.domain.ExampleMatcher.MatchMode; import org.springframework.data.jpa.repository.query.EscapeCharacter; import org.springframework.util.ObjectUtils; @@ -57,6 +62,7 @@ * @author Mark Paluch * @author Oliver Gierke * @author Jens Schauder + * @author Arnaud Lecointre */ @ExtendWith(MockitoExtension.class) @MockitoSettings(strictness = Strictness.LENIENT) @@ -271,6 +277,21 @@ void likePatternsGetEscapedEnding() { verify(cb, times(1)).like(any(Expression.class), eq("%f\\\\o\\_o"), eq('\\')); } + @ParameterizedTest(name = "Matching {0} on association should join using JoinType.{1} ") // DATAJPA-3763 + @CsvSource({ "ALL, INNER", "ANY, LEFT" }) + void matchingAssociationShouldUseTheCorrectJoinType(MatchMode matchMode, JoinType expectedJoinType) { + + Person person = new Person(); + person.father = new Person(); + + ExampleMatcher matcher = matchMode == MatchMode.ALL ? ExampleMatcher.matchingAll() : ExampleMatcher.matchingAny(); + Example example = of(person, matcher); + + QueryByExamplePredicateBuilder.getPredicate(root, cb, example, EscapeCharacter.DEFAULT); + + verify(root, times(1)).join("father", expectedJoinType); + } + @SuppressWarnings("unused") static class Person { From 85429ff0c8f605ecc9a0e6d9dcbb7139de46635a Mon Sep 17 00:00:00 2001 From: Christoph Strobl Date: Thu, 6 Mar 2025 09:08:25 +0100 Subject: [PATCH 62/87] Add integration test for QueryByExample match mode on associations. Original Pull Request: #3794 --- .../QueryByExamplePredicateBuilder.java | 14 ++--- ...eryByExamplePredicateBuilderUnitTests.java | 2 +- .../QueryByExampleIntegrationTests.java | 54 ++++++++++++++++--- 3 files changed, 55 insertions(+), 15 deletions(-) diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/convert/QueryByExamplePredicateBuilder.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/convert/QueryByExamplePredicateBuilder.java index 9b7cfb818a..6b2314a2d0 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/convert/QueryByExamplePredicateBuilder.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/convert/QueryByExamplePredicateBuilder.java @@ -36,6 +36,7 @@ import org.springframework.dao.InvalidDataAccessApiUsageException; import org.springframework.data.domain.Example; import org.springframework.data.domain.ExampleMatcher; +import org.springframework.data.domain.ExampleMatcher.MatchMode; import org.springframework.data.domain.ExampleMatcher.PropertyValueTransformer; import org.springframework.data.jpa.repository.query.EscapeCharacter; import org.springframework.data.support.ExampleMatcherAccessor; @@ -105,9 +106,8 @@ public static Predicate getPredicate(Root root, CriteriaBuilder cb, Examp ExampleMatcher matcher = example.getMatcher(); List predicates = getPredicates("", cb, root, root.getModel(), example.getProbe(), - example.getProbeType(), matcher, new ExampleMatcherAccessor(matcher), - new PathNode("root", null, example.getProbe()), - escapeCharacter); + example.getProbeType(), matcher.getMatchMode(), new ExampleMatcherAccessor(matcher), + new PathNode("root", null, example.getProbe()), escapeCharacter); if (predicates.isEmpty()) { return null; @@ -124,7 +124,7 @@ public static Predicate getPredicate(Root root, CriteriaBuilder cb, Examp @SuppressWarnings({ "rawtypes", "unchecked" }) static List getPredicates(String path, CriteriaBuilder cb, Path from, ManagedType type, Object value, - Class probeType, ExampleMatcher matcher, ExampleMatcherAccessor exampleAccessor, PathNode currentNode, + Class probeType, MatchMode matchMode, ExampleMatcherAccessor exampleAccessor, PathNode currentNode, EscapeCharacter escapeCharacter) { List predicates = new ArrayList<>(); @@ -161,7 +161,7 @@ static List getPredicates(String path, CriteriaBuilder cb, Path fr predicates .addAll(getPredicates(currentPath, cb, from.get(attribute.getName()), (ManagedType) attribute.getType(), - attributeValue, probeType, matcher, exampleAccessor, currentNode, escapeCharacter)); + attributeValue, probeType, matchMode, exampleAccessor, currentNode, escapeCharacter)); continue; } @@ -174,9 +174,9 @@ static List getPredicates(String path, CriteriaBuilder cb, Path fr ClassUtils.getShortName(probeType), node)); } - JoinType joinType = matcher.isAllMatching() ? JoinType.INNER : JoinType.LEFT; + JoinType joinType = matchMode.equals(MatchMode.ALL) ? JoinType.INNER : JoinType.LEFT; predicates.addAll(getPredicates(currentPath, cb, ((From) from).join(attribute.getName(), joinType), - (ManagedType) attribute.getType(), attributeValue, probeType, matcher, exampleAccessor, node, + (ManagedType) attribute.getType(), attributeValue, probeType, matchMode, exampleAccessor, node, escapeCharacter)); continue; diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/convert/QueryByExamplePredicateBuilderUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/convert/QueryByExamplePredicateBuilderUnitTests.java index 0b80e764e3..544644ef81 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/convert/QueryByExamplePredicateBuilderUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/convert/QueryByExamplePredicateBuilderUnitTests.java @@ -277,7 +277,7 @@ void likePatternsGetEscapedEnding() { verify(cb, times(1)).like(any(Expression.class), eq("%f\\\\o\\_o"), eq('\\')); } - @ParameterizedTest(name = "Matching {0} on association should join using JoinType.{1} ") // DATAJPA-3763 + @ParameterizedTest(name = "Matching {0} on association should join using JoinType.{1} ") // GH-3763 @CsvSource({ "ALL, INNER", "ANY, LEFT" }) void matchingAssociationShouldUseTheCorrectJoinType(MatchMode matchMode, JoinType expectedJoinType) { diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/QueryByExampleIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/QueryByExampleIntegrationTests.java index 458954f3e1..fa9de5e26f 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/QueryByExampleIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/QueryByExampleIntegrationTests.java @@ -15,7 +15,7 @@ */ package org.springframework.data.jpa.repository; -import static org.assertj.core.api.Assertions.*; +import static org.assertj.core.api.Assertions.assertThat; import jakarta.persistence.EntityManager; import jakarta.persistence.criteria.CriteriaBuilder; @@ -23,21 +23,27 @@ import jakarta.persistence.criteria.Predicate; import jakarta.persistence.criteria.Root; +import java.util.List; + import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Example; +import org.springframework.data.domain.ExampleMatcher; import org.springframework.data.jpa.convert.QueryByExamplePredicateBuilder; import org.springframework.data.jpa.domain.sample.Role; +import org.springframework.data.jpa.domain.sample.User; import org.springframework.data.jpa.repository.sample.RoleRepository; +import org.springframework.data.jpa.repository.sample.UserRepository; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.transaction.annotation.Transactional; /** * @author Greg Turnquist + * @author Christoph Strobl * @since 3.0 */ @ExtendWith(SpringExtension.class) @@ -45,7 +51,8 @@ @Transactional class QueryByExampleIntegrationTests { - @Autowired RoleRepository repository; + @Autowired RoleRepository roleRepository; + @Autowired UserRepository userRepository; @Autowired EntityManager em; private Role drummer; @@ -55,14 +62,14 @@ class QueryByExampleIntegrationTests { @BeforeEach void setUp() { - drummer = repository.save(new Role("drummer")); - guitarist = repository.save(new Role("guitarist")); - singer = repository.save(new Role("singer")); + drummer = roleRepository.save(new Role("drummer")); + guitarist = roleRepository.save(new Role("guitarist")); + singer = roleRepository.save(new Role("singer")); } @AfterEach void clearUp() { - repository.deleteAll(); + roleRepository.deleteAll(); } @Test // GH-2283 @@ -81,6 +88,39 @@ void queryByExampleWithNoPredicatesShouldHaveNoWhereClause() { // then assertThat(predicate).isNull(); - assertThat(repository.findAll(example)).containsExactlyInAnyOrder(drummer, guitarist, singer); + assertThat(roleRepository.findAll(example)).containsExactlyInAnyOrder(drummer, guitarist, singer); + } + + @Test // GH-3763 + void usesAnyMatchOnJoins() { + + User manager = new User("mighty", "super user", "msu@u.io"); + + userRepository.save(manager); + + User dave = new User(); + dave.setFirstname("dave"); + dave.setLastname("matthews"); + dave.setEmailAddress("d@dmb.com"); + dave.addRole(singer); + + User carter = new User(); + carter.setFirstname("carter"); + carter.setLastname("beaufort"); + carter.setEmailAddress("c@dmb.com"); + carter.addRole(drummer); + carter.addRole(singer); + carter.setManager(manager); + + userRepository.saveAllAndFlush(List.of(dave, carter)); + + User probe = new User(); + probe.setLastname(dave.getLastname()); + probe.setManager(manager); + + Example example = Example.of(probe, + ExampleMatcher.matchingAny().withIgnorePaths("id", "createdAt", "age", "active", "emailAddress", + "secondaryEmailAddress", "colleagues", "address", "binaryData", "attributes", "dateOfBirth")); + assertThat(userRepository.findAll(example)).containsExactly(dave, carter); } } From b35a116707080d04b8918aa9bf194d2576b8c884 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Tue, 11 Mar 2025 09:05:58 +0100 Subject: [PATCH 63/87] Upgrade to Hibernate 6.6.10.Final. Closes #3809 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index ab3af6a422..c753ec9335 100755 --- a/pom.xml +++ b/pom.xml @@ -30,9 +30,9 @@ 4.13.0 4.0.5 4.0.6-SNAPSHOT - 6.6.9.Final + 6.6.10.Final 6.2.33.Final - 6.6.10-SNAPSHOT + 6.6.11-SNAPSHOT 7.0.0.Beta1 7.0.0-SNAPSHOT 2.7.4 From 04a3cd9453a3a7ee323107bff668039045d80171 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 14 Mar 2025 08:17:16 +0100 Subject: [PATCH 64/87] Prepare 3.4.4 (2024.1.4). See #3776 --- pom.xml | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/pom.xml b/pom.xml index c753ec9335..61f37073df 100755 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.springframework.data.build spring-data-parent - 3.4.4-SNAPSHOT + 3.4.4 @@ -41,7 +41,7 @@ 5.0 9.1.0 42.7.4 - 3.4.4-SNAPSHOT + 3.4.4 0.10.3 org.hibernate @@ -173,20 +173,8 @@ - - spring-snapshot - https://repo.spring.io/snapshot - - true - - - false - - - - spring-milestone - https://repo.spring.io/milestone - + + From 3ea732c697cf8c936bb19a26c3cdffd577384367 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 14 Mar 2025 08:17:34 +0100 Subject: [PATCH 65/87] Release version 3.4.4 (2024.1.4). See #3776 --- pom.xml | 2 +- spring-data-envers/pom.xml | 4 ++-- spring-data-jpa-distribution/pom.xml | 2 +- spring-data-jpa/pom.xml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index 61f37073df..b0ef87ee76 100755 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.springframework.data spring-data-jpa-parent - 3.4.4-SNAPSHOT + 3.4.4 pom Spring Data JPA Parent diff --git a/spring-data-envers/pom.xml b/spring-data-envers/pom.xml index 4493905df5..716a815c1b 100755 --- a/spring-data-envers/pom.xml +++ b/spring-data-envers/pom.xml @@ -5,12 +5,12 @@ org.springframework.data spring-data-envers - 3.4.4-SNAPSHOT + 3.4.4 org.springframework.data spring-data-jpa-parent - 3.4.4-SNAPSHOT + 3.4.4 ../pom.xml diff --git a/spring-data-jpa-distribution/pom.xml b/spring-data-jpa-distribution/pom.xml index 9b1c7af2ca..cc59913869 100644 --- a/spring-data-jpa-distribution/pom.xml +++ b/spring-data-jpa-distribution/pom.xml @@ -14,7 +14,7 @@ org.springframework.data spring-data-jpa-parent - 3.4.4-SNAPSHOT + 3.4.4 ../pom.xml diff --git a/spring-data-jpa/pom.xml b/spring-data-jpa/pom.xml index ebe2fb73b8..4acbcb7340 100644 --- a/spring-data-jpa/pom.xml +++ b/spring-data-jpa/pom.xml @@ -7,7 +7,7 @@ org.springframework.data spring-data-jpa - 3.4.4-SNAPSHOT + 3.4.4 Spring Data JPA Spring Data module for JPA repositories. @@ -16,7 +16,7 @@ org.springframework.data spring-data-jpa-parent - 3.4.4-SNAPSHOT + 3.4.4 ../pom.xml From ce88c31c3571fded176bcb64b9560e2137109f02 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 14 Mar 2025 08:20:01 +0100 Subject: [PATCH 66/87] Prepare next development iteration. See #3776 --- pom.xml | 2 +- spring-data-envers/pom.xml | 4 ++-- spring-data-jpa-distribution/pom.xml | 2 +- spring-data-jpa/pom.xml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index b0ef87ee76..4115f1c3e1 100755 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.springframework.data spring-data-jpa-parent - 3.4.4 + 3.4.5-SNAPSHOT pom Spring Data JPA Parent diff --git a/spring-data-envers/pom.xml b/spring-data-envers/pom.xml index 716a815c1b..6989b5753d 100755 --- a/spring-data-envers/pom.xml +++ b/spring-data-envers/pom.xml @@ -5,12 +5,12 @@ org.springframework.data spring-data-envers - 3.4.4 + 3.4.5-SNAPSHOT org.springframework.data spring-data-jpa-parent - 3.4.4 + 3.4.5-SNAPSHOT ../pom.xml diff --git a/spring-data-jpa-distribution/pom.xml b/spring-data-jpa-distribution/pom.xml index cc59913869..1c80c581fd 100644 --- a/spring-data-jpa-distribution/pom.xml +++ b/spring-data-jpa-distribution/pom.xml @@ -14,7 +14,7 @@ org.springframework.data spring-data-jpa-parent - 3.4.4 + 3.4.5-SNAPSHOT ../pom.xml diff --git a/spring-data-jpa/pom.xml b/spring-data-jpa/pom.xml index 4acbcb7340..d3d0411013 100644 --- a/spring-data-jpa/pom.xml +++ b/spring-data-jpa/pom.xml @@ -7,7 +7,7 @@ org.springframework.data spring-data-jpa - 3.4.4 + 3.4.5-SNAPSHOT Spring Data JPA Spring Data module for JPA repositories. @@ -16,7 +16,7 @@ org.springframework.data spring-data-jpa-parent - 3.4.4 + 3.4.5-SNAPSHOT ../pom.xml From b6d443a9cc6b438b0f98315bd3c6cfd2b3505c87 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 14 Mar 2025 08:20:02 +0100 Subject: [PATCH 67/87] After release cleanups. See #3776 --- pom.xml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 4115f1c3e1..704fbb48ed 100755 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.springframework.data.build spring-data-parent - 3.4.4 + 3.4.5-SNAPSHOT @@ -41,7 +41,7 @@ 5.0 9.1.0 42.7.4 - 3.4.4 + 3.4.5-SNAPSHOT 0.10.3 org.hibernate @@ -173,8 +173,20 @@ - - + + spring-snapshot + https://repo.spring.io/snapshot + + true + + + false + + + + spring-milestone + https://repo.spring.io/milestone + From 9a49cf66fb900b0973c470995e0d2f77b9a6ccfc Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Wed, 19 Mar 2025 10:06:27 +0100 Subject: [PATCH 68/87] Apply QueryRewriter to count queries as well. We now use QueryRewriter to post-process count queries as well. Previously, only the actual result query has been processed. Closes #3801 --- .../data/jpa/repository/QueryRewriter.java | 5 ++++ .../query/AbstractStringBasedJpaQuery.java | 13 ++++---- .../query/JpaQueryLookupStrategy.java | 6 ++-- .../data/jpa/repository/query/NamedQuery.java | 30 +++++++++++++++++-- .../JpaQueryRewriteIntegrationTests.java | 22 +++++++++----- .../repository/query/NamedQueryUnitTests.java | 7 +++-- .../modules/ROOT/pages/jpa/query-methods.adoc | 7 +++-- 7 files changed, 66 insertions(+), 24 deletions(-) diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/QueryRewriter.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/QueryRewriter.java index d34101046f..619d6231a9 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/QueryRewriter.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/QueryRewriter.java @@ -26,6 +26,10 @@ * and tools intends to do has been done. You can customize the query to apply final changes. Rewriting can only make * use of already existing contextual data. That is, adding or replacing query text or reuse of bound parameters. Query * rewriting must not add additional bindable parameters as these cannot be materialized. + *

+ * Query rewriting applies to the actual query and, when applicable, to count queries. Count queries are optimized and + * therefore, either not necessary or a count is obtained through other means, such as derived from a Hibernate + * {@code SelectionQuery}. * * @author Greg Turnquist * @author Mark Paluch @@ -71,4 +75,5 @@ public String rewrite(String query, Sort sort) { return query; } } + } diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/AbstractStringBasedJpaQuery.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/AbstractStringBasedJpaQuery.java index c101aa7454..140539fe32 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/AbstractStringBasedJpaQuery.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/AbstractStringBasedJpaQuery.java @@ -148,9 +148,11 @@ protected Query doCreateCountQuery(JpaParametersParameterAccessor accessor) { String queryString = countQuery.get().getQueryString(); EntityManager em = getEntityManager(); + String queryStringToUse = potentiallyRewriteQuery(queryString, accessor.getSort(), accessor.getPageable()); + Query query = getQueryMethod().isNativeQuery() // - ? em.createNativeQuery(queryString) // - : em.createQuery(queryString, Long.class); + ? em.createNativeQuery(queryStringToUse) // + : em.createQuery(queryStringToUse, Long.class); QueryParameterSetter.QueryMetadata metadata = metadataCache.getMetadata(queryString, query); @@ -181,16 +183,17 @@ protected Query createJpaQuery(String queryString, Sort sort, @Nullable Pageable ReturnedType returnedType) { EntityManager em = getEntityManager(); + String queryToUse = potentiallyRewriteQuery(queryString, sort, pageable); if (this.query.hasConstructorExpression() || this.query.isDefaultProjection()) { - return em.createQuery(potentiallyRewriteQuery(queryString, sort, pageable)); + return em.createQuery(queryToUse); } Class typeToRead = getTypeToRead(returnedType); return typeToRead == null // - ? em.createQuery(potentiallyRewriteQuery(queryString, sort, pageable)) // - : em.createQuery(potentiallyRewriteQuery(queryString, sort, pageable), typeToRead); + ? em.createQuery(queryToUse) // + : em.createQuery(queryToUse, typeToRead); } /** diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryLookupStrategy.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryLookupStrategy.java index d8daf8a6a4..6d25af839a 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryLookupStrategy.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryLookupStrategy.java @@ -181,11 +181,9 @@ protected RepositoryQuery resolveQuery(JpaQueryMethod method, QueryRewriter quer getCountQuery(method, namedQueries, em), queryRewriter, valueExpressionDelegate); } - RepositoryQuery query = NamedQuery.lookupFrom(method, em); + RepositoryQuery query = NamedQuery.lookupFrom(method, em, queryRewriter); - return query != null // - ? query // - : NO_QUERY; + return query != null ? query : NO_QUERY; } @Nullable diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/NamedQuery.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/NamedQuery.java index 1e4c5fb8f4..eeed1593fa 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/NamedQuery.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/NamedQuery.java @@ -22,7 +22,11 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; + +import org.springframework.data.domain.Pageable; +import org.springframework.data.domain.Sort; import org.springframework.data.jpa.provider.QueryExtractor; +import org.springframework.data.jpa.repository.QueryRewriter; import org.springframework.data.repository.query.Parameters; import org.springframework.data.repository.query.QueryCreationException; import org.springframework.data.repository.query.RepositoryQuery; @@ -53,11 +57,12 @@ final class NamedQuery extends AbstractJpaQuery { private final boolean namedCountQueryIsPresent; private final Lazy declaredQuery; private final QueryParameterSetter.QueryMetadataCache metadataCache; + private final QueryRewriter queryRewriter; /** * Creates a new {@link NamedQuery}. */ - private NamedQuery(JpaQueryMethod method, EntityManager em) { + private NamedQuery(JpaQueryMethod method, EntityManager em, QueryRewriter queryRewriter) { super(method, em); @@ -65,6 +70,7 @@ private NamedQuery(JpaQueryMethod method, EntityManager em) { this.countQueryName = method.getNamedCountQueryName(); QueryExtractor extractor = method.getQueryExtractor(); this.countProjection = method.getCountQueryProjection(); + this.queryRewriter = queryRewriter; Parameters parameters = method.getParameters(); @@ -127,9 +133,10 @@ static boolean hasNamedQuery(EntityManager em, String queryName) { * * @param method must not be {@literal null}. * @param em must not be {@literal null}. + * @param queryRewriter must not be {@literal null}. */ @Nullable - public static RepositoryQuery lookupFrom(JpaQueryMethod method, EntityManager em) { + public static RepositoryQuery lookupFrom(JpaQueryMethod method, EntityManager em, QueryRewriter queryRewriter) { String queryName = method.getNamedQueryName(); @@ -147,7 +154,7 @@ public static RepositoryQuery lookupFrom(JpaQueryMethod method, EntityManager em method.isNativeQuery() ? "NativeQuery" : "Query")); } - RepositoryQuery query = new NamedQuery(method, em); + RepositoryQuery query = new NamedQuery(method, em, queryRewriter); if (LOG.isDebugEnabled()) { LOG.debug(String.format("Found named query '%s'", queryName)); } @@ -187,6 +194,7 @@ protected TypedQuery doCreateCountQuery(JpaParametersParameterAccessor acc } else { String countQueryString = declaredQuery.get().deriveCountQuery(countProjection).getQueryString(); + countQueryString = potentiallyRewriteQuery(countQueryString, accessor.getSort(), accessor.getPageable()); cacheKey = countQueryString; countQuery = em.createQuery(countQueryString, Long.class); } @@ -222,4 +230,20 @@ protected Class getTypeToRead(ReturnedType returnedType) { ? null // : super.getTypeToRead(returnedType); } + + /** + * Use the {@link QueryRewriter}, potentially rewrite the query, using relevant {@link Sort} and {@link Pageable} + * information. + * + * @param originalQuery + * @param sort + * @param pageable + * @return + */ + private String potentiallyRewriteQuery(String originalQuery, Sort sort, Pageable pageable) { + + return pageable.isPaged() // + ? queryRewriter.rewrite(originalQuery, pageable) // + : queryRewriter.rewrite(originalQuery, sort); + } } diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpaQueryRewriteIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpaQueryRewriteIntegrationTests.java index 9738c7843a..9637785e39 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpaQueryRewriteIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpaQueryRewriteIntegrationTests.java @@ -19,8 +19,10 @@ import static org.assertj.core.api.Assertions.entry; import java.util.HashMap; +import java.util.LinkedHashSet; import java.util.List; import java.util.Map; +import java.util.Set; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -31,6 +33,7 @@ import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.FilterType; import org.springframework.context.annotation.ImportResource; +import org.springframework.data.domain.Page; import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Sort; @@ -44,7 +47,7 @@ import org.springframework.test.context.junit.jupiter.SpringExtension; /** - * Unit tests for repository with {@link Query} and {@link QueryRewrite}. + * Unit tests for repository with {@link Query} and {@link QueryRewriter}. * * @author Greg Turnquist * @author Krzysztof Krason @@ -60,10 +63,12 @@ class JpaQueryRewriteIntegrationTests { static final String REWRITTEN_QUERY = "rewritten query"; static final String SORT = "sort"; static Map results = new HashMap<>(); + static Set queries = new LinkedHashSet<>(); @BeforeEach void setUp() { results.clear(); + repository.deleteAll(); } @Test @@ -77,15 +82,15 @@ void nativeQueryShouldHandleRewrites() { entry(SORT, Sort.unsorted().toString())); } - @Test + @Test // GH-3801 void nonNativeQueryShouldHandleRewrites() { - repository.findByNonNativeQuery("Matthews"); + repository.save(new User("D", "A", "foo@bar")); - assertThat(results).containsExactly( // - entry(ORIGINAL_QUERY, "select original_user_alias from User original_user_alias"), // - entry(REWRITTEN_QUERY, "select rewritten_user_alias from User rewritten_user_alias"), // - entry(SORT, Sort.unsorted().toString())); + repository.findByNonNativeQuery("Matthews", PageRequest.of(0, 1)); + + assertThat(queries).contains("select original_user_alias from User original_user_alias"); + assertThat(queries).contains("select count(original_user_alias) from User original_user_alias"); } @Test @@ -169,7 +174,7 @@ public interface UserRepositoryWithRewriter List findByNativeQuery(String param); @Query(value = "select original_user_alias from User original_user_alias", queryRewriter = TestQueryRewriter.class) - List findByNonNativeQuery(String param); + Page findByNonNativeQuery(String param, PageRequest pageRequest); @Query(value = "select original_user_alias from User original_user_alias", queryRewriter = TestQueryRewriter.class) List findByNonNativeSortedQuery(String param, Sort sort); @@ -214,6 +219,7 @@ private static String replaceAlias(String query, Sort sort) { results.put(ORIGINAL_QUERY, query); results.put(REWRITTEN_QUERY, rewrittenQuery); results.put(SORT, sort.toString()); + queries.add(query); return rewrittenQuery; } diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/NamedQueryUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/NamedQueryUnitTests.java index dadfd1083d..68cae8bc60 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/NamedQueryUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/NamedQueryUnitTests.java @@ -36,6 +36,7 @@ import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.provider.QueryExtractor; +import org.springframework.data.jpa.repository.QueryRewriter; import org.springframework.data.projection.ProjectionFactory; import org.springframework.data.projection.SpelAwareProxyProjectionFactory; import org.springframework.data.repository.core.RepositoryMetadata; @@ -88,7 +89,8 @@ void rejectsPersistenceProviderIfIncapableOfExtractingQueriesAndPagebleBeingUsed JpaQueryMethod queryMethod = new JpaQueryMethod(method, metadata, projectionFactory, extractor); when(em.createNamedQuery(queryMethod.getNamedCountQueryName())).thenThrow(new IllegalArgumentException()); - assertThatExceptionOfType(QueryCreationException.class).isThrownBy(() -> NamedQuery.lookupFrom(queryMethod, em)); + assertThatExceptionOfType(QueryCreationException.class) + .isThrownBy(() -> NamedQuery.lookupFrom(queryMethod, em, QueryRewriter.IdentityQueryRewriter.INSTANCE)); } @Test // DATAJPA-142 @@ -100,7 +102,8 @@ void doesNotRejectPersistenceProviderIfNamedCountQueryIsAvailable() { TypedQuery countQuery = mock(TypedQuery.class); when(em.createNamedQuery(eq(queryMethod.getNamedCountQueryName()), eq(Long.class))).thenReturn(countQuery); - NamedQuery query = (NamedQuery) NamedQuery.lookupFrom(queryMethod, em); + NamedQuery query = (NamedQuery) NamedQuery.lookupFrom(queryMethod, em, + QueryRewriter.IdentityQueryRewriter.INSTANCE); query.doCreateCountQuery(new JpaParametersParameterAccessor(queryMethod.getParameters(), new Object[1])); verify(em, times(1)).createNamedQuery(queryMethod.getNamedCountQueryName(), Long.class); diff --git a/src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc b/src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc index 4673c0a0ac..c4bf8a4620 100644 --- a/src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc +++ b/src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc @@ -176,8 +176,11 @@ public interface UserRepository extends JpaRepository { Sometimes, no matter how many features you try to apply, it seems impossible to get Spring Data JPA to apply every thing you'd like to a query before it is sent to the `EntityManager`. -You have the ability to get your hands on the query, right before it's sent to the `EntityManager` and "rewrite" it. That is, -you can make any alterations at the last moment. +You have the ability to get your hands on the query, right before it's sent to the `EntityManager` and "rewrite" it. +That is, you can make any alterations at the last moment. +Query rewriting applies to the actual query and, when applicable, to count queries. +Count queries are optimized and therefore, either not necessary or a count is obtained through other means, such as derived from a Hibernate `SelectionQuery`. + .Declare a QueryRewriter using `@Query` ==== From 9e9cb22b443108e1af09133ab08dae9c7a6e5172 Mon Sep 17 00:00:00 2001 From: Tran Ngoc Nhan Date: Tue, 24 Sep 2024 19:27:48 +0700 Subject: [PATCH 69/87] Polish diamond operator usage. Closes #3620 --- .../repository/support/EnversRevisionRepositoryImpl.java | 3 ++- .../springframework/data/jpa/domain/AbstractPersistable.java | 3 ++- .../java/org/springframework/data/jpa/domain/JpaSort.java | 5 +++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryImpl.java b/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryImpl.java index 71e5c48cc3..c86573d167 100755 --- a/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryImpl.java +++ b/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryImpl.java @@ -65,6 +65,7 @@ * @author Donghun Shin * @author Greg Turnquist * @author Aref Behboodi + * @author Ngoc Nhan */ @Transactional(readOnly = true) public class EnversRevisionRepositoryImpl> @@ -117,7 +118,7 @@ public Optional> findRevision(ID id, N revisionNumber) { Assert.notNull(id, "Identifier must not be null!"); Assert.notNull(revisionNumber, "Revision number must not be null!"); - List singleResult = (List) createBaseQuery(id) // + List singleResult = createBaseQuery(id) // .add(AuditEntity.revisionNumber().eq(revisionNumber)) // .getResultList(); diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/AbstractPersistable.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/AbstractPersistable.java index 245418357d..989eac2cff 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/AbstractPersistable.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/AbstractPersistable.java @@ -34,6 +34,7 @@ * @author Thomas Darimont * @author Mark Paluch * @author Greg Turnquist + * @author Ngoc Nhan * @param the type of the identifier. */ @MappedSuperclass @@ -89,7 +90,7 @@ public boolean equals(Object obj) { AbstractPersistable that = (AbstractPersistable) obj; - return null == this.getId() ? false : this.getId().equals(that.getId()); + return this.getId() != null && this.getId().equals(that.getId()); } @Override diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/JpaSort.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/JpaSort.java index f930564173..771b5361a6 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/JpaSort.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/JpaSort.java @@ -37,6 +37,7 @@ * @author Christoph Strobl * @author David Madden * @author Jens Schauder + * @author Ngoc Nhan */ public class JpaSort extends Sort { @@ -281,14 +282,14 @@ public , U> Path dot(A attribute) { * @return */ public

, U> Path dot(P attribute) { - return new Path(add(attribute)); + return new Path<>(add(attribute)); } private List> add(Attribute attribute) { Assert.notNull(attribute, "Attribute must not be null"); - List> newAttributes = new ArrayList>(attributes.size() + 1); + List> newAttributes = new ArrayList<>(attributes.size() + 1); newAttributes.addAll(attributes); newAttributes.add(attribute); return newAttributes; From 9ba955120687ff7cb024b2a6f93a6968e20a69b9 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Wed, 19 Mar 2025 10:45:00 +0100 Subject: [PATCH 70/87] Polishing. Reformat code. See #3620 --- .../repository/support/EnversRevisionRepositoryImpl.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryImpl.java b/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryImpl.java index c86573d167..4515a74ed9 100755 --- a/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryImpl.java +++ b/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryImpl.java @@ -78,12 +78,12 @@ public class EnversRevisionRepositoryImpl entityInformation, - RevisionEntityInformation revisionEntityInformation, EntityManager entityManager) { + RevisionEntityInformation revisionEntityInformation, EntityManager entityManager) { Assert.notNull(entityInformation, "JpaEntityInformation must not be null!"); Assert.notNull(entityManager, "EntityManager must not be null!"); @@ -241,7 +241,7 @@ RevisionMetadata createRevisionMetadata() { return metadata instanceof DefaultRevisionEntity defaultRevisionEntity // ? new DefaultRevisionMetadata(defaultRevisionEntity, revisionType) // : new AnnotationRevisionMetadata<>(Hibernate.unproxy(metadata), RevisionNumber.class, RevisionTimestamp.class, - revisionType); + revisionType); } private static RevisionMetadata.RevisionType convertRevisionType(RevisionType datum) { From ee08f8e8a11176c07b47d2168dc4d934e93cf8e8 Mon Sep 17 00:00:00 2001 From: Christoph Strobl Date: Mon, 24 Mar 2025 15:14:55 +0100 Subject: [PATCH 71/87] Upgrade to Hibernate 6.6.11.Final Also bump 7.0 profile to use latest milestone. Closes: #3819 --- pom.xml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 704fbb48ed..e1c20d470f 100755 --- a/pom.xml +++ b/pom.xml @@ -30,10 +30,10 @@ 4.13.0 4.0.5 4.0.6-SNAPSHOT - 6.6.10.Final + 6.6.11.Final 6.2.33.Final - 6.6.11-SNAPSHOT - 7.0.0.Beta1 + 6.6.12-SNAPSHOT + 7.0.0.Beta5 7.0.0-SNAPSHOT 2.7.4

2.3.232

@@ -84,6 +84,7 @@ ${hibernate-70} 3.2.0-M2 + 4.13.2 From 4913bbb0ce35c782648de69b2f3fb83dd1198e31 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Tue, 8 Apr 2025 16:29:10 +0200 Subject: [PATCH 72/87] Support reserved word usage in EQL state field, single and collection-valued fields. Closes #3829 --- .../data/jpa/repository/query/Eql.g4 | 4 ++++ .../repository/query/EqlQueryRenderer.java | 20 +++++++++++++++++++ .../repository/query/EqlComplianceTests.java | 4 ++++ 3 files changed, 28 insertions(+) diff --git a/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Eql.g4 b/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Eql.g4 index 9db07f6314..4dc5817c11 100644 --- a/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Eql.g4 +++ b/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Eql.g4 @@ -705,18 +705,22 @@ subtype collection_valued_field : identification_variable + | reserved_word ; single_valued_object_field : identification_variable + | reserved_word ; state_field : identification_variable + | reserved_word ; collection_value_field : identification_variable + | reserved_word ; entity_name diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlQueryRenderer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlQueryRenderer.java index ce5d2fb1c6..e8e8d051a4 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlQueryRenderer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlQueryRenderer.java @@ -2317,21 +2317,41 @@ public QueryTokenStream visitSubtype(EqlParser.SubtypeContext ctx) { @Override public QueryTokenStream visitCollection_valued_field(EqlParser.Collection_valued_fieldContext ctx) { + + if (ctx.reserved_word() != null) { + return visit(ctx.reserved_word()); + } + return visit(ctx.identification_variable()); } @Override public QueryTokenStream visitSingle_valued_object_field(EqlParser.Single_valued_object_fieldContext ctx) { + + if (ctx.reserved_word() != null) { + return visit(ctx.reserved_word()); + } + return visit(ctx.identification_variable()); } @Override public QueryTokenStream visitState_field(EqlParser.State_fieldContext ctx) { + + if (ctx.reserved_word() != null) { + return visit(ctx.reserved_word()); + } + return visit(ctx.identification_variable()); } @Override public QueryTokenStream visitCollection_value_field(EqlParser.Collection_value_fieldContext ctx) { + + if (ctx.reserved_word() != null) { + return visit(ctx.reserved_word()); + } + return visit(ctx.identification_variable()); } diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlComplianceTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlComplianceTests.java index ca9eb8deda..2ec5f229a1 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlComplianceTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlComplianceTests.java @@ -72,6 +72,7 @@ void selectClause() { assertQuery("SELECT COUNT(e) FROM Employee e"); assertQuery("SELECT MAX(e.salary) FROM Employee e"); + assertQuery("select sum(i.size.foo.bar.new) from Item i"); assertQuery("SELECT NEW com.acme.reports.EmpReport(e.firstName, e.lastName, e.salary) FROM Employee e"); } @@ -342,8 +343,11 @@ void specialOperators() { assertQuery("SELECT toDo FROM Employee e JOIN e.toDoList toDo WHERE INDEX(toDo) = 1"); assertQuery("SELECT p FROM Employee e JOIN e.priorities p WHERE KEY(p) = 'high'"); assertQuery("SELECT e FROM Employee e WHERE SIZE(e.managedEmployees) < 2"); + assertQuery("SELECT e FROM Employee e WHERE SIZE(e.managedEmployees.new) < 2"); assertQuery("SELECT e FROM Employee e WHERE e.managedEmployees IS EMPTY"); + assertQuery("SELECT e FROM Employee e WHERE e.managedEmployee.size.new IS EMPTY"); assertQuery("SELECT e FROM Employee e WHERE 'write code' MEMBER OF e.responsibilities"); + assertQuery("SELECT e FROM Employee e WHERE 'write code' MEMBER OF e.responsibilities.size"); assertQuery("SELECT p FROM Project p WHERE TYPE(p) = LargeProject"); /** From 13f9395d0518ecf601d164515b15d04f4e172583 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Wed, 9 Apr 2025 09:03:06 +0200 Subject: [PATCH 73/87] Extend reserved word usage also to JPQL parser. Closes #3832 --- .../data/jpa/repository/query/Jpql.g4 | 4 ++++ .../jpa/repository/query/JpqlQueryRenderer.java | 15 +++++++++++++++ .../repository/query/EqlQueryRendererTests.java | 9 +++++++++ .../repository/query/HqlQueryRendererTests.java | 9 +++++++++ .../repository/query/JpqlQueryRendererTests.java | 9 +++++++++ 5 files changed, 46 insertions(+) diff --git a/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Jpql.g4 b/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Jpql.g4 index 9ddbcadb44..8ba5bf48f0 100644 --- a/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Jpql.g4 +++ b/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Jpql.g4 @@ -685,18 +685,22 @@ subtype collection_valued_field : identification_variable + | reserved_word ; single_valued_object_field : identification_variable + | reserved_word ; state_field : identification_variable + | reserved_word ; collection_value_field : identification_variable + | reserved_word ; entity_name diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpqlQueryRenderer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpqlQueryRenderer.java index 105ef169b7..8334d67ce2 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpqlQueryRenderer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpqlQueryRenderer.java @@ -2108,21 +2108,36 @@ public QueryTokenStream visitSubtype(JpqlParser.SubtypeContext ctx) { @Override public QueryTokenStream visitCollection_valued_field(JpqlParser.Collection_valued_fieldContext ctx) { + if (ctx.reserved_word() != null) { + return visit(ctx.reserved_word()); + } return visit(ctx.identification_variable()); } @Override public QueryTokenStream visitSingle_valued_object_field(JpqlParser.Single_valued_object_fieldContext ctx) { + + if (ctx.reserved_word() != null) { + return visit(ctx.reserved_word()); + } return visit(ctx.identification_variable()); } @Override public QueryTokenStream visitState_field(JpqlParser.State_fieldContext ctx) { + + if (ctx.reserved_word() != null) { + return visit(ctx.reserved_word()); + } return visit(ctx.identification_variable()); } @Override public QueryTokenStream visitCollection_value_field(JpqlParser.Collection_value_fieldContext ctx) { + + if (ctx.reserved_word() != null) { + return visit(ctx.reserved_word()); + } return visit(ctx.identification_variable()); } diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlQueryRendererTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlQueryRendererTests.java index 70ecb1fe59..695e478193 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlQueryRendererTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlQueryRendererTests.java @@ -1040,4 +1040,13 @@ void lateralShouldBeAValidParameter() { assertQuery("select e from Employee e where e.lateral = :_lateral"); assertQuery("select te from TestEntity te where te.lateral = :lateral"); } + + @Test + void reservedWordsShouldWork() { + + assertQuery("select ie from ItemExample ie left join ie.object io where io.externalId = :externalId"); + assertQuery("select ie.object from ItemExample ie left join ie.object io where io.externalId = :externalId"); + assertQuery("select ie from ItemExample ie left join ie.object io where io.object = :externalId"); + assertQuery("select ie from ItemExample ie where ie.status = com.app.domain.object.Status.UP"); + } } diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryRendererTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryRendererTests.java index 922c20bc24..cdb81af4d4 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryRendererTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryRendererTests.java @@ -1923,4 +1923,13 @@ void entityNameWithPackageContainingReservedWord(String reservedWord) { String source = "select new com.company.%s.thing.stuff.ClassName(e.id) from Experience e".formatted(reservedWord); assertQuery(source); } + + @Test + void reservedWordsShouldWork() { + + assertQuery("select ie from ItemExample ie left join ie.object io where io.externalId = :externalId"); + assertQuery("select ie.object from ItemExample ie left join ie.object io where io.externalId = :externalId"); + assertQuery("select ie from ItemExample ie left join ie.object io where io.object = :externalId"); + assertQuery("select ie from ItemExample ie where ie.status = com.app.domain.object.Status.UP"); + } } diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlQueryRendererTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlQueryRendererTests.java index 1047d4cc12..036666da7d 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlQueryRendererTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlQueryRendererTests.java @@ -1027,4 +1027,13 @@ void entityNameWithPackageContainingReservedWord(String reservedWord) { assertQuery(source); } + @Test + void reservedWordsShouldWork() { + + assertQuery("select ie from ItemExample ie left join ie.object io where io.externalId = :externalId"); + assertQuery("select ie.object from ItemExample ie left join ie.object io where io.externalId = :externalId"); + assertQuery("select ie from ItemExample ie left join ie.object io where io.object = :externalId"); + assertQuery("select ie from ItemExample ie where ie.status = com.app.domain.object.Status.UP"); + } + } From ac436da2c8b14d7799394833f61b12f30cf1c046 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Wed, 9 Apr 2025 15:30:19 +0200 Subject: [PATCH 74/87] Accept functions and paths with reserved words (string expressions) in EQL IN expressions. Closes #3834 --- .../org/springframework/data/jpa/repository/query/Eql.g4 | 2 +- .../org/springframework/data/jpa/repository/query/Jpql.g4 | 2 +- .../data/jpa/repository/query/EqlQueryRenderer.java | 4 ++-- .../data/jpa/repository/query/JpqlQueryRenderer.java | 4 ++-- .../data/jpa/repository/query/EqlQueryRendererTests.java | 5 ++++- .../data/jpa/repository/query/JpqlQueryRendererTests.java | 3 ++- 6 files changed, 12 insertions(+), 8 deletions(-) diff --git a/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Eql.g4 b/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Eql.g4 index 4dc5817c11..45be6c6ffd 100644 --- a/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Eql.g4 +++ b/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Eql.g4 @@ -349,7 +349,7 @@ between_expression ; in_expression - : (state_valued_path_expression | type_discriminator) (NOT)? IN (('(' in_item (',' in_item)* ')') | ( '(' subquery ')') | collection_valued_input_parameter) + : (string_expression | type_discriminator) (NOT)? IN (('(' in_item (',' in_item)* ')') | ( '(' subquery ')') | collection_valued_input_parameter) ; in_item diff --git a/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Jpql.g4 b/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Jpql.g4 index 8ba5bf48f0..3b82b67da3 100644 --- a/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Jpql.g4 +++ b/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Jpql.g4 @@ -337,7 +337,7 @@ between_expression ; in_expression - : (state_valued_path_expression | type_discriminator) (NOT)? IN (('(' in_item (',' in_item)* ')') | ( '(' subquery ')') | collection_valued_input_parameter) + : (string_expression | type_discriminator) (NOT)? IN (('(' in_item (',' in_item)* ')') | ( '(' subquery ')') | collection_valued_input_parameter) ; in_item diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlQueryRenderer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlQueryRenderer.java index e8e8d051a4..eb18221ac9 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlQueryRenderer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlQueryRenderer.java @@ -1155,8 +1155,8 @@ public QueryTokenStream visitIn_expression(EqlParser.In_expressionContext ctx) { QueryRendererBuilder builder = QueryRenderer.builder(); - if (ctx.state_valued_path_expression() != null) { - builder.append(visit(ctx.state_valued_path_expression())); + if (ctx.string_expression() != null) { + builder.append(visit(ctx.string_expression())); } if (ctx.type_discriminator() != null) { builder.append(visit(ctx.type_discriminator())); diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpqlQueryRenderer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpqlQueryRenderer.java index 8334d67ce2..c624f26423 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpqlQueryRenderer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpqlQueryRenderer.java @@ -1078,8 +1078,8 @@ public QueryTokenStream visitIn_expression(JpqlParser.In_expressionContext ctx) QueryRendererBuilder builder = QueryRenderer.builder(); - if (ctx.state_valued_path_expression() != null) { - builder.appendExpression(visit(ctx.state_valued_path_expression())); + if (ctx.string_expression() != null) { + builder.appendExpression(visit(ctx.string_expression())); } if (ctx.type_discriminator() != null) { builder.appendExpression(visit(ctx.type_discriminator())); diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlQueryRendererTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlQueryRendererTests.java index 695e478193..6c036c3e79 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlQueryRendererTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlQueryRendererTests.java @@ -36,6 +36,7 @@ * * @author Greg Turnquist * @author Christoph Strobl + * @author Mark Paluch */ class EqlQueryRendererTests { @@ -1041,12 +1042,14 @@ void lateralShouldBeAValidParameter() { assertQuery("select te from TestEntity te where te.lateral = :lateral"); } - @Test + @Test // GH-3834 void reservedWordsShouldWork() { assertQuery("select ie from ItemExample ie left join ie.object io where io.externalId = :externalId"); assertQuery("select ie.object from ItemExample ie left join ie.object io where io.externalId = :externalId"); assertQuery("select ie from ItemExample ie left join ie.object io where io.object = :externalId"); assertQuery("select ie from ItemExample ie where ie.status = com.app.domain.object.Status.UP"); + assertQuery("select f from FooEntity f where upper(f.name) IN :names"); + assertQuery("select f from FooEntity f where f.size IN :sizes"); } } diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlQueryRendererTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlQueryRendererTests.java index 036666da7d..8613362c4f 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlQueryRendererTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlQueryRendererTests.java @@ -36,6 +36,7 @@ * * @author Greg Turnquist * @author Christoph Strobl + * @author Mark Paluch * @since 3.1 */ class JpqlQueryRendererTests { @@ -1027,7 +1028,7 @@ void entityNameWithPackageContainingReservedWord(String reservedWord) { assertQuery(source); } - @Test + @Test // GH-3834 void reservedWordsShouldWork() { assertQuery("select ie from ItemExample ie left join ie.object io where io.externalId = :externalId"); From 2016417b639900c327d7a1e5033da6740e41a629 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Mon, 14 Apr 2025 08:50:46 +0200 Subject: [PATCH 75/87] Fix parsing of EQL/JPQL using string literals and enums in IN items. Closes #3835 --- .../data/jpa/repository/query/Eql.g4 | 5 +++++ .../data/jpa/repository/query/Jpql.g4 | 5 +++++ .../jpa/repository/query/EqlQueryRenderer.java | 18 +++++++++++++----- .../repository/query/JpqlQueryRenderer.java | 10 ++++++++++ .../query/EqlQueryRendererTests.java | 12 ++++++++++++ .../query/JpqlQueryRendererTests.java | 12 ++++++++++++ 6 files changed, 57 insertions(+), 5 deletions(-) diff --git a/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Eql.g4 b/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Eql.g4 index 45be6c6ffd..9a1136ddd1 100644 --- a/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Eql.g4 +++ b/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Eql.g4 @@ -354,7 +354,12 @@ in_expression in_item : literal + | string_expression + | boolean_literal + | numeric_literal + | date_time_timestamp_literal | single_valued_input_parameter + | conditional_expression ; like_expression diff --git a/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Jpql.g4 b/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Jpql.g4 index 3b82b67da3..98a0df214f 100644 --- a/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Jpql.g4 +++ b/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Jpql.g4 @@ -342,7 +342,12 @@ in_expression in_item : literal + | string_expression + | boolean_literal + | numeric_literal + | date_time_timestamp_literal | single_valued_input_parameter + | conditional_expression ; like_expression diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlQueryRenderer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlQueryRenderer.java index eb18221ac9..8225545c83 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlQueryRenderer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlQueryRenderer.java @@ -1189,15 +1189,23 @@ public QueryTokenStream visitIn_expression(EqlParser.In_expressionContext ctx) { @Override public QueryTokenStream visitIn_item(EqlParser.In_itemContext ctx) { - QueryRendererBuilder builder = QueryRenderer.builder(); - if (ctx.literal() != null) { - builder.append(visit(ctx.literal())); + return visit(ctx.literal()); + } else if (ctx.string_expression() != null) { + return visit(ctx.string_expression()); + } else if (ctx.boolean_literal() != null) { + return visit(ctx.boolean_literal()); + } else if (ctx.numeric_literal() != null) { + return visit(ctx.numeric_literal()); + } else if (ctx.date_time_timestamp_literal() != null) { + return visit(ctx.date_time_timestamp_literal()); } else if (ctx.single_valued_input_parameter() != null) { - builder.append(visit(ctx.single_valued_input_parameter())); + return visit(ctx.single_valued_input_parameter()); + } else if (ctx.conditional_expression() != null) { + return visit(ctx.conditional_expression()); } - return builder; + return QueryTokenStream.empty(); } @Override diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpqlQueryRenderer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpqlQueryRenderer.java index c624f26423..fad4187df7 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpqlQueryRenderer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpqlQueryRenderer.java @@ -1113,8 +1113,18 @@ public QueryTokenStream visitIn_item(JpqlParser.In_itemContext ctx) { if (ctx.literal() != null) { return visit(ctx.literal()); + } else if (ctx.string_expression() != null) { + return visit(ctx.string_expression()); + } else if (ctx.boolean_literal() != null) { + return visit(ctx.boolean_literal()); + } else if (ctx.numeric_literal() != null) { + return visit(ctx.numeric_literal()); + } else if (ctx.date_time_timestamp_literal() != null) { + return visit(ctx.date_time_timestamp_literal()); } else if (ctx.single_valued_input_parameter() != null) { return visit(ctx.single_valued_input_parameter()); + } else if (ctx.conditional_expression() != null) { + return visit(ctx.conditional_expression()); } return QueryTokenStream.empty(); diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlQueryRendererTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlQueryRendererTests.java index 6c036c3e79..72bdfc3b1b 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlQueryRendererTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlQueryRendererTests.java @@ -555,6 +555,18 @@ WHERE TYPE(e) IN :empTypes """); } + @Test + void inClauseWithFunctionAndLiterals() { + + assertQuery(""" + select f from FooEntity f where upper(f.name) IN ('Y', 'Basic', 'Remit') + """); + assertQuery( + """ + select count(f) from FooEntity f where f.status IN (com.example.eql_bug_check.entity.FooStatus.FOO, com.example.eql_bug_check.entity.FooStatus.BAR) + """); + } + @Test void notEqualsForTypeShouldWork() { diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlQueryRendererTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlQueryRendererTests.java index 8613362c4f..a16a5a8802 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlQueryRendererTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlQueryRendererTests.java @@ -556,6 +556,18 @@ WHERE TYPE(e) IN :empTypes """); } + @Test + void inClauseWithFunctionAndLiterals() { + + assertQuery(""" + select f from FooEntity f where upper(f.name) IN ('Y', 'Basic', 'Remit') + """); + assertQuery( + """ + select count(f) from FooEntity f where f.status IN (com.example.eql_bug_check.entity.FooStatus.FOO, com.example.eql_bug_check.entity.FooStatus.BAR) + """); + } + @Test void notEqualsForTypeShouldWork() { From 3f0bd6215a54a03667d18d9d706c495715b90a24 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Mon, 14 Apr 2025 16:48:32 +0200 Subject: [PATCH 76/87] Allow HQL HAVING without enforcing GROUP BY. Closes #3840 --- .../springframework/data/jpa/repository/query/Hql.g4 | 4 ++-- .../jpa/repository/query/EqlQueryRendererTests.java | 8 ++++++++ .../jpa/repository/query/HqlQueryRendererTests.java | 12 ++++++++++++ .../jpa/repository/query/JpqlQueryRendererTests.java | 8 ++++++++ 4 files changed, 30 insertions(+), 2 deletions(-) diff --git a/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Hql.g4 b/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Hql.g4 index da0518d08c..d18a924a51 100644 --- a/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Hql.g4 +++ b/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Hql.g4 @@ -89,8 +89,8 @@ orderedQuery ; query - : selectClause fromClause? whereClause? (groupByClause havingClause?)? # SelectQuery - | fromClause whereClause? (groupByClause havingClause?)? selectClause? # FromQuery + : selectClause fromClause? whereClause? groupByClause? havingClause? # SelectQuery + | fromClause whereClause? groupByClause? havingClause? selectClause? # FromQuery ; queryOrder diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlQueryRendererTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlQueryRendererTests.java index 72bdfc3b1b..f954bcc744 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlQueryRendererTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlQueryRendererTests.java @@ -597,6 +597,14 @@ SELECT c.country, COUNT(c) GROUP BY c.country HAVING COUNT(c) > 30 """); + + assertQuery(""" + SELECT COUNT(f) + FROM FooEntity f + WHERE f.name IN ('Y', 'Basic', 'Remit') + AND f.size = 10 + HAVING COUNT(f) > 0 + """); } @Test diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryRendererTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryRendererTests.java index cdb81af4d4..349b064670 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryRendererTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryRendererTests.java @@ -791,6 +791,18 @@ HAVING COUNT(o) >= 5 """); } + @Test + void shouldRenderHavingWithFunction() { + + assertQuery(""" + SELECT COUNT(f) + FROM FooEntity f + WHERE f.name IN ('Y', 'Basic', 'Remit') + AND f.size = 10 + HAVING COUNT(f) > 0 + """); + } + @Test void theRest8() { diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlQueryRendererTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlQueryRendererTests.java index a16a5a8802..33bef4a39b 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlQueryRendererTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlQueryRendererTests.java @@ -598,6 +598,14 @@ SELECT c.country, COUNT(c) GROUP BY c.country HAVING COUNT(c) > 30 """); + + assertQuery(""" + SELECT COUNT(f) + FROM FooEntity f + WHERE f.name IN ('Y', 'Basic', 'Remit') + AND f.size = 10 + HAVING COUNT(f) > 0 + """); } @Test From 8d7c0c0fa5f329bcd70dda12c639ec3839401665 Mon Sep 17 00:00:00 2001 From: hgh1472 Date: Sat, 5 Apr 2025 00:10:44 +0900 Subject: [PATCH 77/87] Remove unnecessary parameter. Remove unnecessary boolean nativeQuery from checkHasNamedParameter of StringQueryUnitTests class. Signed-off-by: hgh1472 Closes #3827 Original pull request: #3828 --- .../query/StringQueryUnitTests.java | 55 ++++++++++--------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/StringQueryUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/StringQueryUnitTests.java index 4c0bd3376a..e612e971a7 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/StringQueryUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/StringQueryUnitTests.java @@ -42,6 +42,7 @@ * @author Diego Krupitza * @author Mark Paluch * @author Aleksei Elin + * @author Gunha Hwang */ class StringQueryUnitTests { @@ -691,32 +692,32 @@ private void checkAlias(String query, String expected, String description, boole @Test // DATAJPA-1200 void testHasNamedParameter() { - checkHasNamedParameter("select something from x where id = :id", true, "named parameter", true); - checkHasNamedParameter("in the :id middle", true, "middle", false); - checkHasNamedParameter(":id start", true, "beginning", false); - checkHasNamedParameter(":id", true, "alone", false); - checkHasNamedParameter("select something from x where id = :id", true, "named parameter", true); - checkHasNamedParameter(":UPPERCASE", true, "uppercase", false); - checkHasNamedParameter(":lowercase", true, "lowercase", false); - checkHasNamedParameter(":2something", true, "beginning digit", false); - checkHasNamedParameter(":2", true, "only digit", false); - checkHasNamedParameter(":.something", true, "dot", false); - checkHasNamedParameter(":_something", true, "underscore", false); - checkHasNamedParameter(":$something", true, "dollar", false); - checkHasNamedParameter(":\uFE0F", true, "non basic latin emoji", false); // - checkHasNamedParameter(":\u4E01", true, "chinese japanese korean", false); - - checkHasNamedParameter("no bind variable", false, "no bind variable", false); - checkHasNamedParameter(":\u2004whitespace", false, "non basic latin whitespace", false); - checkHasNamedParameter("select something from x where id = ?1", false, "indexed parameter", true); - checkHasNamedParameter("::", false, "double colon", false); - checkHasNamedParameter(":", false, "end of query", false); - checkHasNamedParameter(":\u0003", false, "non-printable", false); - checkHasNamedParameter(":*", false, "basic latin emoji", false); - checkHasNamedParameter("\\:", false, "escaped colon", false); - checkHasNamedParameter("::id", false, "double colon with identifier", false); - checkHasNamedParameter("\\:id", false, "escaped colon with identifier", false); - checkHasNamedParameter("select something from x where id = #something", false, "hash", true); + checkHasNamedParameter("select something from x where id = :id", true, "named parameter"); + checkHasNamedParameter("in the :id middle", true, "middle"); + checkHasNamedParameter(":id start", true, "beginning"); + checkHasNamedParameter(":id", true, "alone"); + checkHasNamedParameter("select something from x where id = :id", true, "named parameter"); + checkHasNamedParameter(":UPPERCASE", true, "uppercase"); + checkHasNamedParameter(":lowercase", true, "lowercase"); + checkHasNamedParameter(":2something", true, "beginning digit"); + checkHasNamedParameter(":2", true, "only digit"); + checkHasNamedParameter(":.something", true, "dot"); + checkHasNamedParameter(":_something", true, "underscore"); + checkHasNamedParameter(":$something", true, "dollar"); + checkHasNamedParameter(":\uFE0F", true, "non basic latin emoji"); // + checkHasNamedParameter(":\u4E01", true, "chinese japanese korean"); + + checkHasNamedParameter("no bind variable", false, "no bind variable"); + checkHasNamedParameter(":\u2004whitespace", false, "non basic latin whitespace"); + checkHasNamedParameter("select something from x where id = ?1", false, "indexed parameter"); + checkHasNamedParameter("::", false, "double colon"); + checkHasNamedParameter(":", false, "end of query"); + checkHasNamedParameter(":\u0003", false, "non-printable"); + checkHasNamedParameter(":*", false, "basic latin emoji"); + checkHasNamedParameter("\\:", false, "escaped colon"); + checkHasNamedParameter("::id", false, "double colon with identifier"); + checkHasNamedParameter("\\:id", false, "escaped colon with identifier"); + checkHasNamedParameter("select something from x where id = #something", false, "hash"); } @Test // DATAJPA-1235 @@ -877,7 +878,7 @@ void checkNumberOfNamedParameters(String query, int expectedSize, String label, .hasSize(expectedSize); } - private void checkHasNamedParameter(String query, boolean expected, String label, boolean nativeQuery) { + private void checkHasNamedParameter(String query, boolean expected, String label) { List bindings = new ArrayList<>(); StringQuery.ParameterBindingParser.INSTANCE.parseParameterBindingsOfQueryIntoBindingsAndReturnCleanedQuery(query, From d9cfac302d03f8cc99fc8c58f751a9bda1f02378 Mon Sep 17 00:00:00 2001 From: yoobin_mion <113106136+yybmion@users.noreply.github.com> Date: Wed, 26 Mar 2025 00:07:30 +0900 Subject: [PATCH 78/87] Fix typos in query method reference documentation. Signed-off-by: Yoobin Yoon <113106136+yybmion@users.noreply.github.com> Closes #3822 --- src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc b/src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc index c4bf8a4620..f35ca5971b 100644 --- a/src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc +++ b/src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc @@ -324,7 +324,7 @@ A similar approach also works with named native queries, by adding the `.count` Next to obtaining mapped results, native queries allow you to read the raw `Tuple` from the database by choosing a `Map` container as the method's return type. The resulting map contains key/value pairs representing the actual database column name and the value. -.Native query retuning raw column name/value pairs +.Native query returning raw column name/value pairs ==== [source, java] ---- @@ -506,7 +506,7 @@ public interface ConcreteRepository In the preceding example, the `MappedTypeRepository` interface is the common parent interface for a few domain types extending `AbstractMappedType`. It also defines the generic `findAllByAttribute(…)` method, which can be used on instances of the specialized repository interfaces. -If you now invoke `findByAllAttribute(…)` on `ConcreteRepository`, the query becomes `select t from ConcreteType t where t.attribute = ?1`. +If you now invoke `findAllByAttribute(…)` on `ConcreteRepository`, the query becomes `select t from ConcreteType t where t.attribute = ?1`. You can also use Expressions to control arguments may also be used to control method arguments. In these expressions the entity name is not available, but the arguments are. From e877a5d640b4f53ea199d95718fd46b0741ae191 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Thu, 17 Apr 2025 08:55:11 +0200 Subject: [PATCH 79/87] Upgrade to Eclipselink 4.0.6. Closes #3844 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index e1c20d470f..7d700cdf98 100755 --- a/pom.xml +++ b/pom.xml @@ -28,8 +28,8 @@ 4.13.0 - 4.0.5 - 4.0.6-SNAPSHOT + 4.0.6 + 4.0.7-SNAPSHOT 6.6.11.Final 6.2.33.Final 6.6.12-SNAPSHOT From 3396e6585665d0f82211d48971310b7d78ed60c8 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Thu, 17 Apr 2025 08:55:28 +0200 Subject: [PATCH 80/87] Upgrade to Hibernate 6.6.13.Final. Closes #3845 --- pom.xml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 7d700cdf98..4452b91365 100755 --- a/pom.xml +++ b/pom.xml @@ -30,9 +30,9 @@ 4.13.0 4.0.6 4.0.7-SNAPSHOT - 6.6.11.Final + 6.6.13.Final 6.2.33.Final - 6.6.12-SNAPSHOT + 6.6.14-SNAPSHOT 7.0.0.Beta5 7.0.0-SNAPSHOT 2.7.4 @@ -47,7 +47,6 @@ org.hibernate reuseReports - From 3720d65b908797760e1dacd81704702109c7f89f Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Thu, 17 Apr 2025 09:32:15 +0200 Subject: [PATCH 81/87] Upgrade JDBC drivers. Closes #3847 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 4452b91365..bae60b9833 100755 --- a/pom.xml +++ b/pom.xml @@ -39,8 +39,8 @@

2.3.232

3.1.0 5.0 - 9.1.0 - 42.7.4 + 9.2.0 + 42.7.5 3.4.5-SNAPSHOT 0.10.3 From de7e5b9e30f193b0595376a0ef371bb7bdef8f08 Mon Sep 17 00:00:00 2001 From: SC Date: Thu, 17 Apr 2025 00:00:49 +0900 Subject: [PATCH 82/87] Clarify transaction boundary recommendation. Closes #3842 Original pull request: #3843 --- src/main/antora/modules/ROOT/pages/jpa/transactions.adoc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/antora/modules/ROOT/pages/jpa/transactions.adoc b/src/main/antora/modules/ROOT/pages/jpa/transactions.adoc index abd25d4f5f..c5625296f1 100644 --- a/src/main/antora/modules/ROOT/pages/jpa/transactions.adoc +++ b/src/main/antora/modules/ROOT/pages/jpa/transactions.adoc @@ -89,3 +89,7 @@ Typically, you want the `readOnly` flag to be set to `true`, as most of the quer You can use transactions for read-only queries and mark them as such by setting the `readOnly` flag. Doing so does not, however, act as a check that you do not trigger a manipulating query (although some databases reject `INSERT` and `UPDATE` statements inside a read-only transaction). The `readOnly` flag is instead propagated as a hint to the underlying JDBC driver for performance optimizations. Furthermore, Spring performs some optimizations on the underlying JPA provider. For example, when used with Hibernate, the flush mode is set to `NEVER` when you configure a transaction as `readOnly`, which causes Hibernate to skip dirty checks (a noticeable improvement on large object trees). ==== +[NOTE] +==== +While this example shows `@Transactional` on the repository interface, we generally recommend defining transaction boundaries at the service layer to reflect business logic units and ensure consistency. +==== \ No newline at end of file From 4b9ef044037245b24b59bc429c3c9f5505fef466 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Thu, 17 Apr 2025 15:22:05 +0200 Subject: [PATCH 83/87] Polishing. Tweak wording. See #3842 Original pull request: #3843 --- src/main/antora/modules/ROOT/pages/jpa/transactions.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/antora/modules/ROOT/pages/jpa/transactions.adoc b/src/main/antora/modules/ROOT/pages/jpa/transactions.adoc index c5625296f1..c3ca330b30 100644 --- a/src/main/antora/modules/ROOT/pages/jpa/transactions.adoc +++ b/src/main/antora/modules/ROOT/pages/jpa/transactions.adoc @@ -91,5 +91,5 @@ You can use transactions for read-only queries and mark them as such by setting [NOTE] ==== -While this example shows `@Transactional` on the repository interface, we generally recommend defining transaction boundaries at the service layer to reflect business logic units and ensure consistency. -==== \ No newline at end of file +While examples discuss `@Transactional` usage on the repository, we generally recommend declaring transaction boundaries when starting a unit of work to ensure proper consistency and desired transaction participation. +==== From 7b49ed64da2ebc767c8e2744df3b0264f1df216c Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Tue, 22 Apr 2025 10:44:59 +0200 Subject: [PATCH 84/87] Prepare 3.4.5 (2024.1.5). See #3813 --- pom.xml | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/pom.xml b/pom.xml index bae60b9833..dd5eecbc1a 100755 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.springframework.data.build spring-data-parent - 3.4.5-SNAPSHOT + 3.4.5 @@ -41,7 +41,7 @@ 5.0 9.2.0 42.7.5 - 3.4.5-SNAPSHOT + 3.4.5 0.10.3 org.hibernate @@ -173,20 +173,8 @@ - - spring-snapshot - https://repo.spring.io/snapshot - - true - - - false - - - - spring-milestone - https://repo.spring.io/milestone - + + From 5e79902c0b0fbd189e9a1b1eaf5c8b658d3ecf9e Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Tue, 22 Apr 2025 10:45:18 +0200 Subject: [PATCH 85/87] Release version 3.4.5 (2024.1.5). See #3813 --- pom.xml | 2 +- spring-data-envers/pom.xml | 4 ++-- spring-data-jpa-distribution/pom.xml | 2 +- spring-data-jpa/pom.xml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index dd5eecbc1a..f7330fe107 100755 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.springframework.data spring-data-jpa-parent - 3.4.5-SNAPSHOT + 3.4.5 pom Spring Data JPA Parent diff --git a/spring-data-envers/pom.xml b/spring-data-envers/pom.xml index 6989b5753d..a0c2274815 100755 --- a/spring-data-envers/pom.xml +++ b/spring-data-envers/pom.xml @@ -5,12 +5,12 @@ org.springframework.data spring-data-envers - 3.4.5-SNAPSHOT + 3.4.5 org.springframework.data spring-data-jpa-parent - 3.4.5-SNAPSHOT + 3.4.5 ../pom.xml diff --git a/spring-data-jpa-distribution/pom.xml b/spring-data-jpa-distribution/pom.xml index 1c80c581fd..557d224775 100644 --- a/spring-data-jpa-distribution/pom.xml +++ b/spring-data-jpa-distribution/pom.xml @@ -14,7 +14,7 @@ org.springframework.data spring-data-jpa-parent - 3.4.5-SNAPSHOT + 3.4.5 ../pom.xml diff --git a/spring-data-jpa/pom.xml b/spring-data-jpa/pom.xml index d3d0411013..f06fe7e6c6 100644 --- a/spring-data-jpa/pom.xml +++ b/spring-data-jpa/pom.xml @@ -7,7 +7,7 @@ org.springframework.data spring-data-jpa - 3.4.5-SNAPSHOT + 3.4.5 Spring Data JPA Spring Data module for JPA repositories. @@ -16,7 +16,7 @@ org.springframework.data spring-data-jpa-parent - 3.4.5-SNAPSHOT + 3.4.5 ../pom.xml From e81ad3d967b33fec4c2159fb924002ca46a659be Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Tue, 22 Apr 2025 10:47:45 +0200 Subject: [PATCH 86/87] Prepare next development iteration. See #3813 --- pom.xml | 2 +- spring-data-envers/pom.xml | 4 ++-- spring-data-jpa-distribution/pom.xml | 2 +- spring-data-jpa/pom.xml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index f7330fe107..5c3090d6d8 100755 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.springframework.data spring-data-jpa-parent - 3.4.5 + 3.4.6-SNAPSHOT pom Spring Data JPA Parent diff --git a/spring-data-envers/pom.xml b/spring-data-envers/pom.xml index a0c2274815..4f93d495bb 100755 --- a/spring-data-envers/pom.xml +++ b/spring-data-envers/pom.xml @@ -5,12 +5,12 @@ org.springframework.data spring-data-envers - 3.4.5 + 3.4.6-SNAPSHOT org.springframework.data spring-data-jpa-parent - 3.4.5 + 3.4.6-SNAPSHOT ../pom.xml diff --git a/spring-data-jpa-distribution/pom.xml b/spring-data-jpa-distribution/pom.xml index 557d224775..127bd173d0 100644 --- a/spring-data-jpa-distribution/pom.xml +++ b/spring-data-jpa-distribution/pom.xml @@ -14,7 +14,7 @@ org.springframework.data spring-data-jpa-parent - 3.4.5 + 3.4.6-SNAPSHOT ../pom.xml diff --git a/spring-data-jpa/pom.xml b/spring-data-jpa/pom.xml index f06fe7e6c6..182e671fb5 100644 --- a/spring-data-jpa/pom.xml +++ b/spring-data-jpa/pom.xml @@ -7,7 +7,7 @@ org.springframework.data spring-data-jpa - 3.4.5 + 3.4.6-SNAPSHOT Spring Data JPA Spring Data module for JPA repositories. @@ -16,7 +16,7 @@ org.springframework.data spring-data-jpa-parent - 3.4.5 + 3.4.6-SNAPSHOT ../pom.xml From 17fef3ca8d5193c67e9d2c5c216ac9d1e19717b9 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Tue, 22 Apr 2025 10:47:46 +0200 Subject: [PATCH 87/87] After release cleanups. See #3813 --- pom.xml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 5c3090d6d8..ad99c12d10 100755 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.springframework.data.build spring-data-parent - 3.4.5 + 3.4.6-SNAPSHOT @@ -41,7 +41,7 @@ 5.0 9.2.0 42.7.5 - 3.4.5 + 3.4.6-SNAPSHOT 0.10.3 org.hibernate @@ -173,8 +173,20 @@ - - + + spring-snapshot + https://repo.spring.io/snapshot + + true + + + false + + + + spring-milestone + https://repo.spring.io/milestone +