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

org.babyfish.jimmer.sql.ast.query.MutableRootQuery Maven / Gradle / Ivy

The newest version!
package org.babyfish.jimmer.sql.ast.query;

import org.babyfish.jimmer.Specification;
import org.babyfish.jimmer.lang.OldChain;
import org.babyfish.jimmer.sql.ast.Expression;
import org.babyfish.jimmer.sql.ast.Predicate;
import org.babyfish.jimmer.sql.ast.query.selectable.RootSelectable;
import org.babyfish.jimmer.sql.ast.query.specification.JSpecification;
import org.babyfish.jimmer.sql.ast.table.Table;

import java.util.List;
import java.util.function.Supplier;

public interface MutableRootQuery> extends MutableQuery, RootSelectable {

    @OldChain
    @Override
    MutableRootQuery where(Predicate... predicates);

    @OldChain
    MutableRootQuery where(Specification specification);

    @OldChain
    MutableRootQuery where(JSpecification specification);

    @OldChain
    @Override
    default MutableRootQuery whereIf(boolean condition, Predicate predicate) {
        if (condition) {
            where(predicate);
        }
        return this;
    }

    @OldChain
    @Override
    default MutableRootQuery whereIf(boolean condition, Supplier block) {
        if (condition) {
            where(block.get());
        }
        return this;
    }

    @OldChain
    @SuppressWarnings("unchecked")
    @Override
    MutableRootQuery orderBy(Expression... expressions);

    @OldChain
    @SuppressWarnings("unchecked")
    @Override
    default MutableRootQuery orderByIf(boolean condition, Expression... expressions) {
        if (condition) {
            orderBy(expressions);
        }
        return this;
    }

    @OldChain
    @Override
    MutableRootQuery orderBy(Order... orders);

    @OldChain
    @SuppressWarnings("unchecked")
    @Override
    default MutableRootQuery orderByIf(boolean condition, Order... orders) {
        if (condition) {
            orderBy(orders);
        }
        return this;
    }

    @OldChain
    @Override
    MutableRootQuery orderBy(List orders);

    @OldChain
    @Override
    default MutableRootQuery orderByIf(boolean condition, List orders) {
        if (condition) {
            orderBy(orders);
        }
        return this;
    }

    @Override
    MutableRootQuery groupBy(Expression... expressions);

    @Override
    MutableRootQuery having(Predicate... predicates);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy