Skip to content

Commit e271f15

Browse files
committed
refactor: IDE auto code cleanup
1 parent 0ee4f4e commit e271f15

File tree

434 files changed

+11387
-10916
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

434 files changed

+11387
-10916
lines changed

README.md

Lines changed: 126 additions & 60 deletions
Large diffs are not rendered by default.

demos/roms-documents/pom.xml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<project xmlns="http://maven.apache.org/POM/4.0.0"
3-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
2+
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xmlns="http://maven.apache.org/POM/4.0.0"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
55
<modelVersion>4.0.0</modelVersion>
66
<parent>
77
<groupId>org.springframework.boot</groupId>
88
<artifactId>spring-boot-starter-parent</artifactId>
99
<version>3.2.5</version>
10-
<relativePath /> <!-- lookup parent from repository -->
10+
<relativePath/> <!-- lookup parent from repository -->
1111
</parent>
1212

1313
<groupId>com.redis.om</groupId>
@@ -31,7 +31,7 @@
3131
<dependency>
3232
<groupId>com.redis.om</groupId>
3333
<artifactId>redis-om-spring</artifactId>
34-
<version>0.9.1-SNAPSHOT</version>
34+
<version>0.9.1</version>
3535
</dependency>
3636
<dependency>
3737
<groupId>org.springframework.boot</groupId>
@@ -65,11 +65,11 @@
6565
<version>${testcontainers.redis.version}</version>
6666
<scope>test</scope>
6767
</dependency>
68-
<!-- <dependency>-->
69-
<!-- <groupId>org.springdoc</groupId>-->
70-
<!-- <artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>-->
71-
<!-- <version>2.0.0</version>-->
72-
<!-- </dependency>-->
68+
<!-- <dependency>-->
69+
<!-- <groupId>org.springdoc</groupId>-->
70+
<!-- <artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>-->
71+
<!-- <version>2.0.0</version>-->
72+
<!-- </dependency>-->
7373
</dependencies>
7474

7575
<repositories>
@@ -147,7 +147,7 @@
147147
<path>
148148
<groupId>com.redis.om</groupId>
149149
<artifactId>redis-om-spring</artifactId>
150-
<version>0.9.1-SNAPSHOT</version>
150+
<version>0.9.1</version>
151151
</path>
152152
</annotationProcessorPaths>
153153
</configuration>

demos/roms-documents/src/main/java/com/redis/om/documents/RomsDocumentsApplication.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,20 @@ public class RomsDocumentsApplication {
2525
@Autowired
2626
PersonRepository personRepo;
2727

28+
public static void main(String[] args) {
29+
SpringApplication.run(RomsDocumentsApplication.class, args);
30+
}
31+
2832
@Bean
2933
CommandLineRunner loadTestData() {
3034
return args -> {
3135
companyRepo.deleteAll();
32-
Company redis = Company.of("Redis", "https://redis.com", new Point(-122.066540, 37.377690), 526, 2011, Set.of(CompanyMeta.of("Redis", 100, Set.of("RedisTag"))));
36+
Company redis = Company.of("Redis", "https://redis.com", new Point(-122.066540, 37.377690), 526, 2011,
37+
Set.of(CompanyMeta.of("Redis", 100, Set.of("RedisTag"))));
3338
redis.setTags(Set.of("fast", "scalable", "reliable"));
3439

35-
Company microsoft = Company.of("Microsoft", "https://microsoft.com", new Point(-122.124500, 47.640160), 182268, 1975, Set.of(CompanyMeta.of("MS", 50, Set.of("MsTag"))));
40+
Company microsoft = Company.of("Microsoft", "https://microsoft.com", new Point(-122.124500, 47.640160), 182268,
41+
1975, Set.of(CompanyMeta.of("MS", 50, Set.of("MsTag"))));
3642
microsoft.setTags(Set.of("innovative", "reliable"));
3743

3844
companyRepo.save(redis);
@@ -46,8 +52,4 @@ CommandLineRunner loadTestData() {
4652
};
4753
}
4854

49-
public static void main(String[] args) {
50-
SpringApplication.run(RomsDocumentsApplication.class, args);
51-
}
52-
5355
}

demos/roms-documents/src/main/java/com/redis/om/documents/controllers/CompanyController.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,35 +18,35 @@
1818
public class CompanyController {
1919
@Autowired
2020
CompanyRepository repository;
21-
21+
2222
@GetMapping("employees/count/{count}")
2323
Iterable<Company> byNumberOfEmployees(@PathVariable("count") int count) {
2424
return repository.findByNumberOfEmployees(count);
2525
}
26-
26+
2727
@GetMapping("employees/range/{low}/{high}")
2828
Iterable<Company> byNumberOfEmployeesRange(@PathVariable("low") int low, @PathVariable("high") int high) {
2929
return repository.findByNumberOfEmployeesBetween(low, high);
3030
}
31-
31+
3232
@GetMapping("all")
3333
Page<Company> all(Pageable pageable) {
3434
return repository.findAll(pageable);
3535
}
36-
36+
3737
@GetMapping("all-ids")
3838
Page<String> allIds(Pageable pageable) {
3939
return repository.getIds(pageable);
4040
}
4141

4242
@GetMapping("near")
4343
Iterable<Company> byLocationNear(//
44-
@RequestParam("lat") double lat, //
45-
@RequestParam("lon") double lon, //
46-
@RequestParam("d") double distance) {
44+
@RequestParam("lat") double lat, //
45+
@RequestParam("lon") double lon, //
46+
@RequestParam("d") double distance) {
4747
return repository.findByLocationNear(new Point(lon, lat), new Distance(distance, Metrics.MILES));
4848
}
49-
49+
5050
@GetMapping("name/starts/{prefix}")
5151
Iterable<Company> byNameStartingWith(@PathVariable("prefix") String prefix) {
5252
return repository.findByNameStartingWith(prefix);

demos/roms-documents/src/main/java/com/redis/om/documents/controllers/EventController.java

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,13 @@
1717
@RequiredArgsConstructor
1818
public class EventController {
1919

20-
private final EventService eventService;
20+
private final EventService eventService;
2121

22-
@GetMapping("between")
23-
List<Event> byNumberOfEmployees(@RequestParam("start")
24-
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) LocalDateTime start,
25-
@RequestParam("end")
26-
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) LocalDateTime end) {
27-
return eventService.searchByBeginDateBetween(start, end);
28-
}
22+
@GetMapping("between")
23+
List<Event> byNumberOfEmployees(
24+
@RequestParam("start") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) LocalDateTime start,
25+
@RequestParam("end") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) LocalDateTime end) {
26+
return eventService.searchByBeginDateBetween(start, end);
27+
}
2928

3029
}

demos/roms-documents/src/main/java/com/redis/om/documents/controllers/PersonController.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,23 @@
2020
public class PersonController {
2121
@Autowired
2222
PersonRepository repository;
23-
23+
2424
@GetMapping("all")
2525
Page<Person> all(Pageable pageable) {
2626
return repository.findAll(pageable);
2727
}
28-
28+
2929
@GetMapping("all-ids")
3030
Page<String> allIds(Pageable pageable) {
3131
return repository.getIds(pageable);
3232
}
33-
33+
3434
@GetMapping("name/{last}/{first}")
3535
List<Person> byLastAndFirst(//
36-
@PathVariable("last") String last, @PathVariable("first") String first) {
36+
@PathVariable("last") String last, @PathVariable("first") String first) {
3737
return repository.findByLastNameAndFirstName(last, first);
3838
}
39-
39+
4040
@GetMapping("{id}")
4141
Optional<Person> byId(@PathVariable("id") String id) {
4242
return repository.findById(id);

demos/roms-documents/src/main/java/com/redis/om/documents/domain/Company.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ public class Company {
4949
private Set<CompanyMeta> metaList;
5050

5151
private boolean publiclyListed;
52-
52+
5353
// audit fields
54-
54+
5555
@CreatedDate
5656
private Date createdDate;
57-
57+
5858
@LastModifiedDate
5959
private Date lastModifiedDate;
6060
}

demos/roms-documents/src/main/java/com/redis/om/documents/domain/Event.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@
1414
@AllArgsConstructor
1515
@Document
1616
public class Event {
17-
@Id
18-
private String id;
17+
@Id
18+
private String id;
1919

20-
@NonNull
21-
@Searchable
22-
private String name;
20+
@NonNull
21+
@Searchable
22+
private String name;
2323

24-
@Indexed
25-
private LocalDateTime beginDate;
24+
@Indexed
25+
private LocalDateTime beginDate;
2626

27-
@Indexed
28-
private LocalDateTime endDate;
27+
@Indexed
28+
private LocalDateTime endDate;
2929

3030
}

demos/roms-documents/src/main/java/com/redis/om/documents/domain/Person.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414
public class Person {
1515
@Id
1616
private String id;
17-
17+
1818
@NonNull
1919
@TextIndexed
2020
private String firstName;
21-
21+
2222
@NonNull
2323
@TextIndexed
2424
private String lastName;
25-
25+
2626
@NonNull
2727
@TagIndexed
2828
private String email;

demos/roms-documents/src/main/java/com/redis/om/documents/repositories/CompanyRepository.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,20 @@
1313
public interface CompanyRepository extends RedisDocumentRepository<Company, String> {
1414
// find one by property
1515
Optional<Company> findOneByName(String name);
16-
16+
1717
// geospatial query
18-
Iterable<Company> findByLocationNear(Point point, Distance distance);
19-
18+
Iterable<Company> findByLocationNear(Point point, Distance distance);
19+
2020
// find by tag field, using JRediSearch "native" annotation
2121
@Query("@tags:{$tags}")
2222
Iterable<Company> findByTags(@Param("tags") Set<String> tags);
23-
23+
2424
// find by numeric property
2525
Iterable<Company> findByNumberOfEmployees(int noe);
26-
26+
2727
// find by numeric property range
2828
Iterable<Company> findByNumberOfEmployeesBetween(int noeGT, int noeLT);
29-
29+
3030
// starting with/ending with
3131
Iterable<Company> findByNameStartingWith(String prefix);
3232
}

0 commit comments

Comments
 (0)