All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.mikesafonov.specification.builder.starter.predicates.NotPredicateBuilder Maven / Gradle / Ivy

There is a newer version: 1.10.0
Show newest version
package com.github.mikesafonov.specification.builder.starter.predicates;

import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.Predicate;

public class NotPredicateBuilder implements PredicateBuilder {
    private final CriteriaBuilder cb;
    private final PredicateBuilder predicateBuilder;

    public NotPredicateBuilder(CriteriaBuilder cb, PredicateBuilder predicateBuilder) {
        this.cb = cb;
        this.predicateBuilder = predicateBuilder;
    }

    @Override
    public Predicate build() {
        return cb.not(predicateBuilder.build());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy