com.easy.query.api.proxy.entity.insert.EasyEntityOnlyInsertable Maven / Gradle / Ivy
package com.easy.query.api.proxy.entity.insert;
import com.easy.query.core.basic.api.insert.ClientInsertable;
import com.easy.query.core.basic.jdbc.parameter.ToSQLContext;
import com.easy.query.core.enums.SQLExecuteStrategyEnum;
import com.easy.query.core.expression.lambda.SQLExpression1;
import com.easy.query.core.expression.sql.builder.EntityInsertExpressionBuilder;
import com.easy.query.core.expression.sql.builder.internal.ContextConfigurer;
import com.easy.query.core.expression.sql.builder.internal.EasyBehavior;
import com.easy.query.core.proxy.ProxyEntity;
import java.util.Collection;
import java.util.function.BiFunction;
import java.util.function.Function;
/**
* create time 2024/5/19 08:41
* 文件说明
*
* @author xuejiaming
*/
public class EasyEntityOnlyInsertable implements EntityOnlyInsertable {
private final ClientInsertable clientInsertable;
public EasyEntityOnlyInsertable(ClientInsertable clientInsertable) {
this.clientInsertable = clientInsertable;
}
@Override
public EntityOnlyInsertable insert(T entity) {
clientInsertable.insert(entity);
return this;
}
@Override
public EntityOnlyInsertable insert(Collection entities) {
clientInsertable.insert(entities);
return this;
}
@Override
public EntityInsertExpressionBuilder getEntityInsertExpressionBuilder() {
return clientInsertable.getEntityInsertExpressionBuilder();
}
@Override
public long executeRows(boolean fillAutoIncrement) {
return clientInsertable.executeRows(fillAutoIncrement);
}
@Override
public String toSQL(T entity) {
return clientInsertable.toSQL(entity);
}
@Override
public String toSQL(T entity, ToSQLContext toSQLContext) {
return clientInsertable.toSQL(entity,toSQLContext);
}
@Override
public > EntityInsertable useProxy(TProxy proxy) {
return new EasyEntityInsertable<>(proxy,clientInsertable);
}
@Override
public EntityOnlyInsertable noInterceptor() {
clientInsertable.noInterceptor();
return this;
}
@Override
public EntityOnlyInsertable useInterceptor(String name) {
clientInsertable.useInterceptor(name);
return this;
}
@Override
public EntityOnlyInsertable noInterceptor(String name) {
clientInsertable.noInterceptor(name);
return this;
}
@Override
public EntityOnlyInsertable useInterceptor() {
clientInsertable.useInterceptor();
return this;
}
@Override
public EntityOnlyInsertable batch(boolean use) {
clientInsertable.batch(use);
return this;
}
@Override
public EntityOnlyInsertable setSQLStrategy(boolean condition, SQLExecuteStrategyEnum sqlStrategy) {
clientInsertable.setSQLStrategy(sqlStrategy);
return this;
}
@Override
public EntityOnlyInsertable onDuplicateKeyIgnore() {
clientInsertable.onDuplicateKeyIgnore();
return this;
}
@Override
public EntityOnlyInsertable asTable(Function tableNameAs) {
clientInsertable.asTable(tableNameAs);
return this;
}
@Override
public EntityOnlyInsertable asSchema(Function schemaAs) {
clientInsertable.asSchema(schemaAs);
return this;
}
@Override
public EntityOnlyInsertable asAlias(String alias) {
clientInsertable.asAlias(alias);
return this;
}
@Override
public EntityOnlyInsertable asTableLink(Function linkAs) {
clientInsertable.asTableLink(linkAs);
return this;
}
@Override
public EntityOnlyInsertable asTableSegment(BiFunction segmentAs) {
clientInsertable.asTableSegment(segmentAs);
return this;
}
@Override
public EntityOnlyInsertable configure(SQLExpression1 configurer) {
clientInsertable.configure(configurer);
return this;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy