From 300ff44b4659b7aec84b934b70ba04b9b563fe94 Mon Sep 17 00:00:00 2001 From: eugenp Date: Wed, 28 Jan 2015 12:12:51 +0200 Subject: [PATCH] making the userspecification immutable and re-enabling a problematic plugin --- spring-security-rest-full/pom.xml | 34 +++++++++---------- .../persistence/dao/UserSpecification.java | 10 +----- 2 files changed, 18 insertions(+), 26 deletions(-) diff --git a/spring-security-rest-full/pom.xml b/spring-security-rest-full/pom.xml index 8b01c7f61b..0a6b72d545 100644 --- a/spring-security-rest-full/pom.xml +++ b/spring-security-rest-full/pom.xml @@ -327,24 +327,24 @@ - + - - - - - - - - - - - - - - - - + + com.mysema.maven + apt-maven-plugin + 1.1.3 + + + + process + + + target/generated-sources/java + com.mysema.query.apt.jpa.JPAAnnotationProcessor + + + + diff --git a/spring-security-rest-full/src/main/java/org/baeldung/persistence/dao/UserSpecification.java b/spring-security-rest-full/src/main/java/org/baeldung/persistence/dao/UserSpecification.java index 909f93a3e7..7d37874fd2 100644 --- a/spring-security-rest-full/src/main/java/org/baeldung/persistence/dao/UserSpecification.java +++ b/spring-security-rest-full/src/main/java/org/baeldung/persistence/dao/UserSpecification.java @@ -11,11 +11,7 @@ import org.springframework.data.jpa.domain.Specification; public class UserSpecification implements Specification { - private SearchCriteria criteria; - - public UserSpecification() { - - } + private final SearchCriteria criteria; public UserSpecification(final SearchCriteria criteria) { super(); @@ -26,10 +22,6 @@ public class UserSpecification implements Specification { return criteria; } - public void setCriteria(final SearchCriteria criteria) { - this.criteria = criteria; - } - @Override public Predicate toPredicate(final Root root, final CriteriaQuery query, final CriteriaBuilder builder) { if (criteria.getOperation().equalsIgnoreCase(">")) {