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

com.easy.query.api4j.select.extension.queryable10.override.OverrideQueryable10 Maven / Gradle / Ivy

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

import com.easy.query.api4j.select.Queryable;
import com.easy.query.api4j.select.Queryable10;
import com.easy.query.api4j.select.extension.queryable10.Queryable10Available;
import com.easy.query.api4j.sql.SQLColumnSelector;
import com.easy.query.api4j.sql.SQLGroupBySelector;
import com.easy.query.api4j.sql.SQLNavigateInclude;
import com.easy.query.api4j.sql.SQLOrderBySelector;
import com.easy.query.api4j.sql.SQLWhereAggregatePredicate;
import com.easy.query.api4j.sql.SQLWherePredicate;
import com.easy.query.core.api.client.EasyQueryClient;
import com.easy.query.core.api.dynamic.sort.ObjectSort;
import com.easy.query.core.enums.sharding.ConnectionModeEnum;
import com.easy.query.core.exception.EasyQueryOrderByInvalidOperationException;
import com.easy.query.core.expression.builder.core.ValueFilter;
import com.easy.query.core.expression.lambda.SQLExpression1;
import com.easy.query.core.expression.lambda.SQLFuncExpression1;
import com.easy.query.core.expression.sql.builder.internal.ContextConfigurer;
import com.easy.query.core.expression.sql.builder.internal.EasyBehavior;

import java.util.Collection;
import java.util.function.BiFunction;
import java.util.function.Function;

/**
 * create time 2023/8/16 08:12
 * 文件说明
 *
 * @author xuejiaming
 */
public interface OverrideQueryable10 extends Queryable, Queryable10Available {

    @Override
    Queryable10 cloneQueryable();

    @Override
    default Queryable10 whereById(Object id) {
        return whereById(true, id);
    }

    @Override
    Queryable10 whereById(boolean condition, Object id);

    @Override
    default  Queryable10 whereByIds(Collection ids) {
        return whereByIds(true, ids);
    }

    @Override
     Queryable10 whereByIds(boolean condition, Collection ids);

    /**
     * 仅支持主表的动态对象查询
     *
     * @param object 对象查询的对象
     * @return
     */
    @Override
    default Queryable10 whereObject(Object object) {
        return whereObject(true, object);
    }

    /**
     * 仅支持主表的动态对象查询
     *
     * @param condition 是否使用对象查询
     * @param object    对象查询的对象
     * @return
     */
    @Override
    Queryable10 whereObject(boolean condition, Object object);


    @Override
    default Queryable10 where(SQLExpression1> whereExpression) {
        return where(true, whereExpression);
    }

    @Override
    Queryable10 where(boolean condition, SQLExpression1> whereExpression);

    @Override
    default Queryable10 groupBy(SQLExpression1> selectExpression) {
        return groupBy(true, selectExpression);
    }

    @Override
    Queryable10 groupBy(boolean condition, SQLExpression1> selectExpression);

    @Override
    default Queryable10 having(SQLExpression1> predicateExpression) {
        return having(true, predicateExpression);
    }

    @Override
    Queryable10 having(boolean condition, SQLExpression1> predicateExpression);

    @Override
    default Queryable10 orderByAsc(SQLExpression1> selectExpression) {
        return orderByAsc(true, selectExpression);
    }

    @Override
    Queryable10 orderByAsc(boolean condition, SQLExpression1> selectExpression);

    @Override
    default Queryable10 orderByDesc(SQLExpression1> selectExpression) {
        return orderByDesc(true, selectExpression);
    }

    @Override
    Queryable10 orderByDesc(boolean condition, SQLExpression1> selectExpression);

    /**
     * @param configuration
     * @return
     * @throws EasyQueryOrderByInvalidOperationException 当配置{@link ObjectSort} 为{@code  DynamicModeEnum.STRICT}排序设置的属性不存在当前排序对象里面或者当前查询对象无法获取 {@link SQLColumnSelector}
     */
    @Override
    default Queryable10 orderByObject(ObjectSort configuration) {
        return orderByObject(true, configuration);
    }

    /**
     * @param condition
     * @param configuration
     * @return
     * @throws EasyQueryOrderByInvalidOperationException 当配置{@link ObjectSort} 为{@code  DynamicModeEnum.STRICT}排序设置的属性不存在当前排序对象里面或者当前查询对象无法获取 {@link SQLColumnSelector}
     */
    @Override
    Queryable10 orderByObject(boolean condition, ObjectSort configuration);

    @Override
    default  Queryable10 include(SQLFuncExpression1, Queryable> navigateIncludeSQLExpression) {
        return include(true, navigateIncludeSQLExpression);
    }

    @Override
     Queryable10 include(boolean condition, SQLFuncExpression1, Queryable> navigateIncludeSQLExpression);

    @Override
    default Queryable10 limit(long rows) {
        return limit(true, rows);
    }

    @Override
    default Queryable10 limit(boolean condition, long rows) {
        return limit(condition, 0, rows);
    }

    @Override
    default Queryable10 limit(long offset, long rows) {
        return limit(true, offset, rows);
    }

    @Override
    Queryable10 limit(boolean condition, long offset, long rows);

    default Queryable10 distinct() {
        return distinct(true);
    }

    @Override
    Queryable10 distinct(boolean condition);

    @Override
    Queryable10 disableLogicDelete();

    @Override
    Queryable10 enableLogicDelete();

    @Override
    Queryable10 useLogicDelete(boolean enable);

    @Override
    Queryable10 noInterceptor();

    @Override
    Queryable10 useInterceptor(String name);

    @Override
    Queryable10 noInterceptor(String name);

    @Override
    Queryable10 useInterceptor();

    /**
     * 自动将查询结果集合全部添加到当前上下文追踪中,如果当前查询结果十分庞大,并且更新数据只有个别条数,建议不要使用
     * 追踪查询,可以通过开启追踪后使用普通的查询,然后添加到当前的追踪上下文中{@link EasyQueryClient#addTracking(Object)},开始先数据追踪的差异更新
     *
     * @return
     */
    @Override
    Queryable10 asTracking();

    @Override
    Queryable10 asNoTracking();

    @Override
    Queryable10 queryLargeColumn(boolean queryLarge);

    @Override
    Queryable10 useShardingConfigure(int maxShardingQueryLimit, ConnectionModeEnum connectionMode);

    @Override
    Queryable10 useMaxShardingQueryLimit(int maxShardingQueryLimit);

    @Override
    Queryable10 useConnectionMode(ConnectionModeEnum connectionMode);

    /**
     * 将当前表达式最近的一张表的表名修改成 {@param tableName}
     * 如果当前最近的表是正常的数据库表名,那么直接将表名改写
     * 如果当前最近的表是匿名表比如嵌套queryable的表那么将alias改成对应的表名
     *
     * @param tableName
     * @return
     */
    @Override
    default Queryable10 asTable(String tableName) {
        return asTable(old -> tableName);
    }

    /**
     * 将当前表达式最近的一张表的表名修改成 {@param tableNameAs}返回的表名
     * 如果当前最近的表是正常的数据库表名,那么直接将表名改写
     * 如果当前最近的表是匿名表比如嵌套queryable的表那么将alias改成对应的表名
     *
     * @param tableNameAs
     * @return
     */
    @Override
    Queryable10 asTable(Function tableNameAs);

    @Override
    default Queryable10 asSchema(String schema) {
        return asSchema(old -> schema);
    }

    @Override
    Queryable10 asSchema(Function schemaAs);

    @Override
    Queryable10 asAlias(String alias);

    /**
     * @param linkAs 别名 FROM | LEFT JOIN | RIGHT JOIN
     * @return
     */
    @Override
    default Queryable10 asTableLink(String linkAs) {
        return asTableLink(o -> linkAs);
    }
    @Override
    Queryable10 asTableLink(Function linkAs);

    @Override
    Queryable10 asTableSegment(BiFunction segmentAs);

    @Override
    Queryable10 filterConfigure(ValueFilter valueFilter);

    @Override
    Queryable10 configure(SQLExpression1 configurer);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy