Skip to content

Commit e42fd0d

Browse files
committed
Polishing.
See #711
1 parent cd0d2b3 commit e42fd0d

File tree

2 files changed

+2
-29
lines changed

2 files changed

+2
-29
lines changed

jpa/aot-optimization/src/main/java/example/springdata/aot/CLR.java

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2025 the original author or authors.
2+
* Copyright 2026 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -39,36 +39,19 @@ public void run(String... args) throws Exception {
3939
User luke = new User("id-1", "luke");
4040
luke.setFirstname("Luke");
4141
luke.setLastname("Skywalker");
42-
// Post lukeP1 = new Post("I have a bad feeling about this.");
43-
// em.persist(lukeP1);
44-
// luke.setPosts(List.of(lukeP1));
45-
4642
User leia = new User("id-2", "leia");
4743
leia.setFirstname("Leia");
4844
leia.setLastname("Organa");
4945

5046
User han = new User("id-3", "han");
5147
han.setFirstname("Han");
5248
han.setLastname("Solo");
53-
// Post hanP1 = new Post("It's the ship that made the Kessel Run in less than 12 Parsecs.");
54-
// em.persist(hanP1);
55-
// han.setPosts(List.of(hanP1));
5649

5750
User chewbacca = new User("id-4", "chewbacca");
5851
User yoda = new User("id-5", "yoda");
59-
Post yodaP1 = new Post("Do. Or do not. There is no try.");
60-
Post yodaP2 = new Post(
61-
"Decide you must, how to serve them best. If you leave now, help them you could; but you would destroy all for which they have fought, and suffered.");
62-
// em.persist(yodaP1);
63-
// em.persist(yodaP2);
64-
// yoda.setPosts(List.of(yodaP1, yodaP2));
65-
6652
User vader = new User("id-6", "vader");
6753
vader.setFirstname("Anakin");
6854
vader.setLastname("Skywalker");
69-
// Post vaderP1 = new Post("I am your father");
70-
// em.persist(vaderP1);
71-
// vader.setPosts(List.of(vaderP1));
7255

7356
User kylo = new User("id-7", "kylo");
7457
kylo.setFirstname("Ben");
@@ -82,9 +65,6 @@ public void run(String... args) throws Exception {
8265
System.out.println("------- derived single -------");
8366
System.out.println(repository.findUserByUsername("yoda"));
8467

85-
// System.out.println("------- derived nested.path -------");
86-
// System.out.println(repository.findUserByPostsMessageLike("father"));
87-
8868
System.out.println("------- derived optional -------");
8969
System.out.println(repository.findOptionalUserByUsername("yoda"));
9070

@@ -118,8 +98,5 @@ public void run(String... args) throws Exception {
11898

11999
System.out.println("------- derived top -------");
120100
System.out.println(repository.findTop2UsersByLastnameStartingWith("S"));
121-
122-
// System.out.println("------- derived with fields -------");
123-
// System.out.println(repository.findJustUsernameBy());
124101
}
125102
}

jpa/aot-optimization/src/main/java/example/springdata/aot/UserRepository.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2025 the original author or authors.
2+
* Copyright 2026 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -25,10 +25,6 @@
2525
import org.springframework.data.querydsl.QuerydslPredicateExecutor;
2626
import org.springframework.data.repository.CrudRepository;
2727

28-
/**
29-
* @author Christoph Strobl
30-
* @since 2025/01
31-
*/
3228
public interface UserRepository extends CrudRepository<User, String>, QuerydslPredicateExecutor<User> {
3329

3430
User findUserByUsername(String username);

0 commit comments

Comments
 (0)