
com.alon.spring.crud.repository.specification.predicate.GreaterThanPredicateBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spring-crud-base Show documentation
Show all versions of spring-crud-base Show documentation
Projeto base para criação de serviços e recusos de CRUD com Spring Data JPA.
package com.alon.spring.crud.repository.specification.predicate;
import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.Path;
import javax.persistence.criteria.Predicate;
public class GreaterThanPredicateBuilder implements PredicateBuilder {
private static PredicateBuilder INSTANCE;
@Override
public Predicate buildPredicate(CriteriaBuilder criteriaBuilder, Path path, String value) {
Comparable convertedValue = this.convertValue(path, value);
return criteriaBuilder.greaterThan(path, convertedValue);
}
public static PredicateBuilder getInstance() {
if (INSTANCE == null)
INSTANCE = new GreaterThanPredicateBuilder();
return INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy