com.easy.query.api.proxy.client.EasyProxyQuery Maven / Gradle / Ivy
package com.easy.query.api.proxy.client;
import com.easy.query.api.proxy.entity.delete.EntityOnlyDeletable;
import com.easy.query.api.proxy.entity.delete.ExpressionDeletable;
import com.easy.query.api.proxy.entity.insert.EntityOnlyInsertable;
import com.easy.query.api.proxy.entity.select.EntityQueryable;
import com.easy.query.api.proxy.entity.update.EntityOnlyUpdatable;
import com.easy.query.api.proxy.entity.update.ExpressionUpdatable;
import com.easy.query.core.configuration.LoadIncludeConfiguration;
import com.easy.query.core.expression.lambda.SQLExpression1;
import com.easy.query.core.expression.lambda.SQLFuncExpression1;
import com.easy.query.core.proxy.PropColumn;
import com.easy.query.core.proxy.ProxyEntity;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
/**
* create time 2023/6/21 17:09
* 文件说明
*
* @author xuejiaming
*/
public interface EasyProxyQuery extends EasyBaseQuery{
, T> EntityQueryable queryable(TProxy table);
, T> EntityQueryable queryable(String sql, TProxy table);
EntityOnlyInsertable insertable(T entity);
EntityOnlyInsertable insertable(Collection entities);
, T> ExpressionUpdatable updatable(TProxy table);
EntityOnlyUpdatable updatable(T entity);
EntityOnlyUpdatable updatable(Collection entities);
EntityOnlyDeletable deletable(T entity);
EntityOnlyDeletable deletable(Collection entities);
, T> ExpressionDeletable deletable(TProxy table);
default , T> void loadInclude(T entity,TProxy table, SQLFuncExpression1 navigateProperty){
loadInclude(Collections.singletonList(entity),table,navigateProperty);
}
default , T> void loadInclude(T entity,TProxy table,SQLFuncExpression1 navigateProperty, SQLExpression1 configure){
loadInclude(Collections.singletonList(entity),table,navigateProperty,configure);
}
default , T> void loadInclude(List entities,TProxy table,SQLFuncExpression1 navigateProperty){
loadInclude(entities,table,navigateProperty,null);
}
default , T> void loadInclude(List entities,TProxy table, SQLFuncExpression1 navigateProperty, SQLExpression1 configure){
PropColumn propColumn = navigateProperty.apply(table);
getEasyQueryClient().loadInclude(entities,propColumn.getValue(),configure);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy