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

com.blazebit.persistence.QuantifiableBinaryPredicateBuilder Maven / Gradle / Ivy

There is a newer version: 1.6.11
Show newest version
/*
 * Copyright 2014 - 2021 Blazebit.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.blazebit.persistence;

/**
 * The interface for quantifiable binary predicate builders.
 * The left hand side and the operator are already known to the builder and the methods of this builder either terminate the building
 * process or start a {@link SubqueryInitiator}.
 *
 * @param  The builder type that is returned on terminal operations
 * @author Christian Beikov
 * @since 1.0.0
 */
public interface QuantifiableBinaryPredicateBuilder extends BinaryPredicateBuilder, SubqueryInitiator {

    /**
     * Starts a {@link SubqueryInitiator} for the right hand side of a predicate that uses the ALL quantor.
     * When the builder finishes, the predicate is added to the parent predicate container represented by the type T.
     *
     * @return The subquery initiator for building a subquery
     */
    public SubqueryInitiator all();

    /**
     * Starts a {@link SubqueryInitiator} for the right hand side of a predicate that uses the ANY quantor.
     * When the builder finishes, the predicate is added to the parent predicate container represented by the type T.
     *
     * @return The subquery initiator for building a subquery
     */
    public SubqueryInitiator any();

    /**
     * Starts a {@link SubqueryBuilder} based on the given criteria builder for the right hand side of a predicate that uses the ALL quantor.
     * When the builder finishes, the predicate is added to the parent predicate container represented by the type T.
     *
     * @param criteriaBuilder The criteria builder to base the subquery on
     * @return The subquery builder for building a subquery
     * @since 1.2.0
     */
    public SubqueryBuilder all(FullQueryBuilder criteriaBuilder);

    /**
     * Starts a {@link SubqueryBuilder} based on the given criteria builder for the right hand side of a predicate that uses the ANY quantor.
     * When the builder finishes, the predicate is added to the parent predicate container represented by the type T.
     *
     * @param criteriaBuilder The criteria builder to base the subquery on
     * @return The subquery builder for building a subquery
     * @since 1.2.0
     */
    public SubqueryBuilder any(FullQueryBuilder criteriaBuilder);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy