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

com.easy.query.api4j.select.extension.queryable5.SQLHavingable5 Maven / Gradle / Ivy

There is a newer version: 2.3.3
Show newest version
package com.easy.query.api4j.select.extension.queryable5;

import com.easy.query.api4j.select.Queryable5;
import com.easy.query.api4j.sql.SQLWhereAggregatePredicate;
import com.easy.query.api4j.sql.impl.SQLWhereAggregatePredicateImpl;
import com.easy.query.core.common.tuple.Tuple5;
import com.easy.query.core.expression.lambda.SQLExpression1;
import com.easy.query.core.expression.lambda.SQLExpression5;

/**
 * create time 2023/8/18 09:38
 * 文件说明
 *
 * @author xuejiaming
 */
public interface SQLHavingable5 extends ClientQueryable5Available, Queryable5Available {

    default Queryable5 having(SQLExpression5, SQLWhereAggregatePredicate, SQLWhereAggregatePredicate, SQLWhereAggregatePredicate, SQLWhereAggregatePredicate> predicateExpression) {
        getClientQueryable5().having((predicate1, predicate2, predicate3, predicate4, predicate5) -> {
            predicateExpression.apply(new SQLWhereAggregatePredicateImpl<>(predicate1), new SQLWhereAggregatePredicateImpl<>(predicate2), new SQLWhereAggregatePredicateImpl<>(predicate3), new SQLWhereAggregatePredicateImpl<>(predicate4), new SQLWhereAggregatePredicateImpl<>(predicate5));
        });
        return getQueryable5();
    }

    default Queryable5 having(boolean condition, SQLExpression5, SQLWhereAggregatePredicate, SQLWhereAggregatePredicate, SQLWhereAggregatePredicate, SQLWhereAggregatePredicate> predicateExpression) {
        getClientQueryable5().having(condition, (predicate1, predicate2, predicate3, predicate4, predicate5) -> {
            predicateExpression.apply(new SQLWhereAggregatePredicateImpl<>(predicate1), new SQLWhereAggregatePredicateImpl<>(predicate2), new SQLWhereAggregatePredicateImpl<>(predicate3), new SQLWhereAggregatePredicateImpl<>(predicate4), new SQLWhereAggregatePredicateImpl<>(predicate5));
        });
        return getQueryable5();
    }

    default Queryable5 havingMerge(SQLExpression1, SQLWhereAggregatePredicate, SQLWhereAggregatePredicate, SQLWhereAggregatePredicate, SQLWhereAggregatePredicate>> predicateExpression) {
        return havingMerge(true, predicateExpression);
    }

    default Queryable5 havingMerge(boolean condition, SQLExpression1, SQLWhereAggregatePredicate, SQLWhereAggregatePredicate, SQLWhereAggregatePredicate, SQLWhereAggregatePredicate>> predicateExpression) {
        return having(condition, (t1, t2, t3, t4, t5) -> {
            predicateExpression.apply(new Tuple5<>(t1, t2, t3, t4, t5));
        });
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy