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

com.easy.query.api4j.update.abstraction.AbstractEntityUpdatable 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.EntityUpdatable;
import com.easy.query.core.basic.api.update.ClientEntityUpdatable;
import com.easy.query.core.enums.SQLExecuteStrategyEnum;
import com.easy.query.core.expression.lambda.SQLExpression1;
import com.easy.query.core.expression.sql.builder.EntityUpdateExpressionBuilder;
import com.easy.query.core.expression.sql.builder.internal.ContextConfigurer;
import com.easy.query.core.expression.sql.builder.internal.EasyBehavior;

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

/**
 * @author xuejiaming
 * @FileName: AbstractUpdate.java
 * @Description: 文件说明
 * @Date: 2023/2/24 22:06
 */
public abstract class AbstractEntityUpdatable implements EntityUpdatable {

    protected final ClientEntityUpdatable clientEntityUpdatable;

    public AbstractEntityUpdatable(ClientEntityUpdatable entityObjectUpdatable) {
        this.clientEntityUpdatable = entityObjectUpdatable;
    }

    @Override
    public EntityUpdateExpressionBuilder getUpdateExpressionBuilder() {
        return clientEntityUpdatable.getUpdateExpressionBuilder();
    }

    @Override
    public ClientEntityUpdatable getClientUpdate() {
        return clientEntityUpdatable;
    }

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

    @Override
    public EntityUpdatable asTable(Function tableNameAs) {
        clientEntityUpdatable.asTable(tableNameAs);
        return this;
    }

    @Override
    public EntityUpdatable asSchema(Function schemaAs) {
        clientEntityUpdatable.asSchema(schemaAs);
        return this;
    }

    @Override
    public EntityUpdatable asAlias(String alias) {
        clientEntityUpdatable.asAlias(alias);
        return this;
    }

    @Override
    public EntityUpdatable setSQLStrategy(boolean condition, SQLExecuteStrategyEnum sqlStrategy) {
        if (condition) {
            clientEntityUpdatable.setSQLStrategy(sqlStrategy);
        }
        return this;
    }

    @Override
    public EntityUpdatable noInterceptor() {
        clientEntityUpdatable.noInterceptor();
        return this;
    }

    @Override
    public EntityUpdatable useInterceptor(String name) {
        clientEntityUpdatable.useInterceptor(name);
        return this;
    }

    @Override
    public EntityUpdatable noInterceptor(String name) {
        clientEntityUpdatable.noInterceptor(name);
        return this;
    }

    @Override
    public EntityUpdatable useInterceptor() {
        clientEntityUpdatable.useInterceptor();
        return this;
    }

    @Override
    public EntityUpdatable useLogicDelete(boolean enable) {
        clientEntityUpdatable.useLogicDelete(enable);
        return this;
    }

    @Override
    public EntityUpdatable ignoreVersion(boolean ignored) {
        clientEntityUpdatable.ignoreVersion(ignored);
        return this;
    }

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

    @Override
    public EntityUpdatable batch(boolean use) {
        clientEntityUpdatable.batch(use);
        return this;
    }

    @Override
    public EntityUpdatable asTableLink(Function linkAs) {
        clientEntityUpdatable.asTableLink(linkAs);
        return this;
    }

    @Override
    public EntityUpdatable asTableSegment(BiFunction segmentAs) {
        clientEntityUpdatable.asTableSegment(segmentAs);
        return this;
    }

    @Override
    public EntityUpdatable configure(SQLExpression1 configurer) {
        clientEntityUpdatable.configure(configurer);
        return this;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy