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

com.easy.query.api4j.update.abstraction.AbstractExpressionUpdatable Maven / Gradle / Ivy

There is a newer version: 2.3.3
Show newest version
package com.easy.query.api4j.update.abstraction;

import com.easy.query.api4j.update.ExpressionUpdatable;
import com.easy.query.core.basic.api.update.ClientExpressionUpdatable;
import com.easy.query.core.expression.sql.builder.ExpressionContext;

import java.util.function.Function;

/**
 * @author xuejiaming
 * @FileName: AbstractExpressionUpdate.java
 * @Description: 文件说明
 * @Date: 2023/2/25 08:24
 */
public abstract class AbstractExpressionUpdatable implements ExpressionUpdatable {
    protected final ClientExpressionUpdatable expressionObjectUpdatable;

    public AbstractExpressionUpdatable(ClientExpressionUpdatable expressionObjectUpdatable) {
        this.expressionObjectUpdatable = expressionObjectUpdatable;
    }

    @Override
    public ClientExpressionUpdatable getClientUpdate() {
        return expressionObjectUpdatable;
    }

    @Override
    public long executeRows() {
        return expressionObjectUpdatable.executeRows();
    }

    @Override
    public ExpressionUpdatable withVersion(boolean condition, Object versionValue) {
        if (condition) {
            expressionObjectUpdatable.withVersion(versionValue);
        }
        return this;
    }
    @Override
    public ExpressionUpdatable asTable(Function tableNameAs) {
        expressionObjectUpdatable.asTable(tableNameAs);
        return this;
    }

    @Override
    public ExpressionUpdatable asSchema(Function schemaAs) {
        expressionObjectUpdatable.asSchema(schemaAs);
        return this;
    }

    @Override
    public ExpressionUpdatable asAlias(String alias) {
        expressionObjectUpdatable.asAlias(alias);
        return this;
    }
    @Override
    public ExpressionUpdatable noInterceptor() {
        expressionObjectUpdatable.noInterceptor();
        return this;
    }

    @Override
    public ExpressionUpdatable useInterceptor(String name) {
        expressionObjectUpdatable.useInterceptor(name);
        return this;
    }

    @Override
    public ExpressionUpdatable noInterceptor(String name) {
        expressionObjectUpdatable.noInterceptor(name);
        return this;
    }

    @Override
    public ExpressionUpdatable useInterceptor() {
        expressionObjectUpdatable.useInterceptor();
        return this;
    }

    @Override
    public ExpressionUpdatable useLogicDelete(boolean enable) {
        expressionObjectUpdatable.useLogicDelete(enable);
        return this;
    }

    @Override
    public void executeRows(long expectRows, String msg, String code) {
        expressionObjectUpdatable.executeRows(expectRows, msg, code);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy