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

cn.hiboot.mcn.autoconfigure.jpa.Specifications Maven / Gradle / Ivy

package cn.hiboot.mcn.autoconfigure.jpa;

/**
 * Specifications
 *
 * @author DingHao
 * @since 2022/1/24 11:01
 */
public interface Specifications {

    static  ExampleSpecification of(PredicateProvider predicateProviders){
        return new ExampleSpecification(predicateProviders);
    }

    static  ExampleSpecification withOf(S t, PredicateProvider predicateProviders){
        return new ExampleSpecification<>(t,predicateProviders);
    }

    @SafeVarargs
    static  ExampleSpecification and(PredicateProvider... predicateProviders){
        return new ExampleSpecification<>(predicateProviders);
    }

    @SafeVarargs
    static  ExampleSpecification withAnd(S t, PredicateProvider... predicateProviders){
        return new ExampleSpecification<>(t,predicateProviders);
    }

    @SafeVarargs
    static  ExampleSpecification or(PredicateProvider... predicateProviders){
        return new ExampleSpecification<>(predicateProviders).or();
    }

    @SafeVarargs
    static  ExampleSpecification withOr(S t, PredicateProvider... predicateProviders){
        return new ExampleSpecification<>(t, predicateProviders).or();
    }

}