DATAJPA-1622 - Polishing.

Reformat code. Qualify static method calls.

Original pull request: #397.
This commit is contained in:
Mark Paluch
2020-10-23 14:57:59 +02:00
parent c1b9339919
commit 08b5e39095

View File

@@ -15,8 +15,6 @@
*/
package org.springframework.data.jpa.domain;
import static org.springframework.data.jpa.domain.SpecificationComposition.*;
import java.io.Serializable;
import javax.persistence.criteria.CriteriaBuilder;
@@ -51,7 +49,7 @@ public interface Specification<T> extends Serializable {
static <T> Specification<T> not(@Nullable Specification<T> spec) {
return spec == null //
? (root, query, builder) -> null//
? (root, query, builder) -> null //
: (root, query, builder) -> builder.not(spec.toPredicate(root, query, builder));
}
@@ -74,9 +72,8 @@ public interface Specification<T> extends Serializable {
* @return The conjunction of the specifications
* @since 2.0
*/
default Specification<T> and(@Nullable Specification<T> other) {
return composed(this, other, CriteriaBuilder::and);
return SpecificationComposition.composed(this, other, CriteriaBuilder::and);
}
/**
@@ -87,7 +84,7 @@ public interface Specification<T> extends Serializable {
* @since 2.0
*/
default Specification<T> or(@Nullable Specification<T> other) {
return composed(this, other, CriteriaBuilder::or);
return SpecificationComposition.composed(this, other, CriteriaBuilder::or);
}
/**