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