com.easy.query.api4j.update.abstraction.AbstractEntityUpdatable Maven / Gradle / Ivy
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 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 entityObjectUpdatable;
public AbstractEntityUpdatable(ClientEntityUpdatable entityObjectUpdatable) {
this.entityObjectUpdatable = entityObjectUpdatable;
}
@Override
public ClientEntityUpdatable getClientUpdate() {
return entityObjectUpdatable;
}
@Override
public long executeRows() {
return entityObjectUpdatable.executeRows();
}
@Override
public EntityUpdatable asTable(Function tableNameAs) {
entityObjectUpdatable.asTable(tableNameAs);
return this;
}
@Override
public EntityUpdatable asSchema(Function schemaAs) {
entityObjectUpdatable.asSchema(schemaAs);
return this;
}
@Override
public EntityUpdatable asAlias(String alias) {
entityObjectUpdatable.asAlias(alias);
return this;
}
@Override
public EntityUpdatable setSQLStrategy(boolean condition, SQLExecuteStrategyEnum sqlStrategy) {
if (condition) {
entityObjectUpdatable.setSQLStrategy(sqlStrategy);
}
return this;
}
@Override
public EntityUpdatable noInterceptor() {
entityObjectUpdatable.noInterceptor();
return this;
}
@Override
public EntityUpdatable useInterceptor(String name) {
entityObjectUpdatable.useInterceptor(name);
return this;
}
@Override
public EntityUpdatable noInterceptor(String name) {
entityObjectUpdatable.noInterceptor(name);
return this;
}
@Override
public EntityUpdatable useInterceptor() {
entityObjectUpdatable.useInterceptor();
return this;
}
@Override
public EntityUpdatable useLogicDelete(boolean enable) {
entityObjectUpdatable.useLogicDelete(enable);
return this;
}
@Override
public void executeRows(long expectRows, String msg, String code) {
entityObjectUpdatable.executeRows(expectRows, msg, code);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy