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

com.contentgrid.spring.querydsl.predicate.None Maven / Gradle / Ivy

There is a newer version: 0.16.0
Show newest version
package com.contentgrid.spring.querydsl.predicate;

import com.contentgrid.spring.querydsl.annotation.QuerydslPredicateFactory;
import com.querydsl.core.types.Path;
import com.querydsl.core.types.Predicate;
import java.util.Collection;
import java.util.Optional;
import java.util.stream.Stream;

/**
 * Creates no predicate under any circumstances
 */
public class None implements QuerydslPredicateFactory, Object> {

    @Override
    public Stream> boundPaths(Path path) {
        return Stream.empty();
    }

    @Override
    public Optional bind(Path path, Collection values) {
        return Optional.empty();
    }

    @Override
    public Class valueType(Path path) {
        return Object.class;
    }
}