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

com.easy.query.api4j.select.extension.queryable.SQLFillable1 Maven / Gradle / Ivy

There is a newer version: 2.3.3
Show newest version
package com.easy.query.api4j.select.extension.queryable;

import com.easy.query.api4j.select.Queryable;
import com.easy.query.api4j.sql.SQLFillSelector;
import com.easy.query.api4j.sql.impl.SQLFillSelectorImpl;
import com.easy.query.api4j.util.EasyLambdaUtil;
import com.easy.query.core.expression.lambda.Property;
import com.easy.query.core.expression.lambda.SQLFuncExpression1;

import java.util.Collection;
import java.util.function.BiConsumer;

/**
 * create time 2023/8/17 13:35
 * 文件说明
 *
 * @author xuejiaming
 */
public interface SQLFillable1 extends ClientQueryableAvailable, QueryableAvailable {


    default  Queryable fillMany(SQLFuncExpression1> fillSetterExpression, Property targetProperty,Property selfProperty,  BiConsumer> produce) {
        getClientQueryable().fillMany(fillSelector -> {
            return fillSetterExpression.apply(new SQLFillSelectorImpl(fillSelector)).getClientQueryable();
        }, EasyLambdaUtil.getPropertyName(targetProperty), selfProperty, produce);
        return getQueryable();
    }
    default  Queryable fillOne(SQLFuncExpression1> fillSetterExpression, Property targetProperty, Property selfProperty, BiConsumer produce) {
        getClientQueryable().fillOne(fillSelector -> {
            return fillSetterExpression.apply(new SQLFillSelectorImpl(fillSelector)).getClientQueryable();
        }, EasyLambdaUtil.getPropertyName(targetProperty), selfProperty, produce);
        return getQueryable();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy