making the userspecification immutable and re-enabling a problematic plugin
This commit is contained in:
parent
f479bc8a21
commit
300ff44b46
|
@ -327,24 +327,24 @@
|
|||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<!-- Querydsl -->
|
||||
<!-- Querydsl and Specifications -->
|
||||
|
||||
<!-- <plugin> -->
|
||||
<!-- <groupId>com.mysema.maven</groupId> -->
|
||||
<!-- <artifactId>apt-maven-plugin</artifactId> -->
|
||||
<!-- <version>1.1.3</version> -->
|
||||
<!-- <executions> -->
|
||||
<!-- <execution> -->
|
||||
<!-- <goals> -->
|
||||
<!-- <goal>process</goal> -->
|
||||
<!-- </goals> -->
|
||||
<!-- <configuration> -->
|
||||
<!-- <outputDirectory>target/generated-sources/java</outputDirectory> -->
|
||||
<!-- <processor>com.mysema.query.apt.jpa.JPAAnnotationProcessor</processor> -->
|
||||
<!-- </configuration> -->
|
||||
<!-- </execution> -->
|
||||
<!-- </executions> -->
|
||||
<!-- </plugin> -->
|
||||
<plugin>
|
||||
<groupId>com.mysema.maven</groupId>
|
||||
<artifactId>apt-maven-plugin</artifactId>
|
||||
<version>1.1.3</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>process</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>target/generated-sources/java</outputDirectory>
|
||||
<processor>com.mysema.query.apt.jpa.JPAAnnotationProcessor</processor>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
|
||||
|
|
|
@ -11,11 +11,7 @@ import org.springframework.data.jpa.domain.Specification;
|
|||
|
||||
public class UserSpecification implements Specification<User> {
|
||||
|
||||
private SearchCriteria criteria;
|
||||
|
||||
public UserSpecification() {
|
||||
|
||||
}
|
||||
private final SearchCriteria criteria;
|
||||
|
||||
public UserSpecification(final SearchCriteria criteria) {
|
||||
super();
|
||||
|
@ -26,10 +22,6 @@ public class UserSpecification implements Specification<User> {
|
|||
return criteria;
|
||||
}
|
||||
|
||||
public void setCriteria(final SearchCriteria criteria) {
|
||||
this.criteria = criteria;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Predicate toPredicate(final Root<User> root, final CriteriaQuery<?> query, final CriteriaBuilder builder) {
|
||||
if (criteria.getOperation().equalsIgnoreCase(">")) {
|
||||
|
|
Loading…
Reference in New Issue