com.easy.query.api4j.select.extension.queryable3.SQLAggregatable3 Maven / Gradle / Ivy
package com.easy.query.api4j.select.extension.queryable3;
import com.easy.query.api4j.sql.SQLColumnResultSelector;
import com.easy.query.api4j.sql.impl.SQLColumnResultSelectorImpl;
import com.easy.query.core.common.tuple.Tuple3;
import com.easy.query.core.expression.lambda.SQLExpression1;
import com.easy.query.core.expression.lambda.SQLExpression3;
import java.math.BigDecimal;
/**
* create time 2023/8/15 21:54
* 文件说明
*
* @author xuejiaming
*/
public interface SQLAggregatable3 extends ClientQueryable3Available {
/**
* 防止溢出
*
* @param columnSelectorExpression
* @param
* @return
*/
default BigDecimal sumBigDecimalOrNull(SQLExpression3, SQLColumnResultSelector, SQLColumnResultSelector> columnSelectorExpression) {
return getClientQueryable3().sumBigDecimalOrNull((selector1, selector2, selector3) -> {
columnSelectorExpression.apply(new SQLColumnResultSelectorImpl<>(selector1), new SQLColumnResultSelectorImpl<>(selector2), new SQLColumnResultSelectorImpl<>(selector3));
});
}
default BigDecimal sumBigDecimalOrDefault(SQLExpression3, SQLColumnResultSelector, SQLColumnResultSelector> columnSelectorExpression, BigDecimal def) {
return getClientQueryable3().sumBigDecimalOrDefault((selector1, selector2, selector3) -> {
columnSelectorExpression.apply(new SQLColumnResultSelectorImpl<>(selector1), new SQLColumnResultSelectorImpl<>(selector2), new SQLColumnResultSelectorImpl<>(selector3));
}, def);
}
default TMember sumOrNull(SQLExpression3, SQLColumnResultSelector, SQLColumnResultSelector> columnSelectorExpression) {
return getClientQueryable3().sumOrNull((selector1, selector2, selector3) -> {
columnSelectorExpression.apply(new SQLColumnResultSelectorImpl<>(selector1), new SQLColumnResultSelectorImpl<>(selector2), new SQLColumnResultSelectorImpl<>(selector3));
});
}
default TMember sumOrDefault(SQLExpression3, SQLColumnResultSelector, SQLColumnResultSelector> columnSelectorExpression, TMember def) {
return getClientQueryable3().sumOrDefault((selector1, selector2, selector3) -> {
columnSelectorExpression.apply(new SQLColumnResultSelectorImpl<>(selector1), new SQLColumnResultSelectorImpl<>(selector2), new SQLColumnResultSelectorImpl<>(selector3));
}, def);
}
default TMember maxOrNull(SQLExpression3, SQLColumnResultSelector, SQLColumnResultSelector> columnSelectorExpression) {
return getClientQueryable3().maxOrNull((selector1, selector2, selector3) -> {
columnSelectorExpression.apply(new SQLColumnResultSelectorImpl<>(selector1), new SQLColumnResultSelectorImpl<>(selector2), new SQLColumnResultSelectorImpl<>(selector3));
});
}
default TMember maxOrDefault(SQLExpression3, SQLColumnResultSelector, SQLColumnResultSelector> columnSelectorExpression, TMember def) {
return getClientQueryable3().maxOrDefault((selector1, selector2, selector3) -> {
columnSelectorExpression.apply(new SQLColumnResultSelectorImpl<>(selector1), new SQLColumnResultSelectorImpl<>(selector2), new SQLColumnResultSelectorImpl<>(selector3));
}, def);
}
default TMember minOrNull(SQLExpression3, SQLColumnResultSelector, SQLColumnResultSelector> columnSelectorExpression) {
return getClientQueryable3().minOrNull((selector1, selector2, selector3) -> {
columnSelectorExpression.apply(new SQLColumnResultSelectorImpl<>(selector1), new SQLColumnResultSelectorImpl<>(selector2), new SQLColumnResultSelectorImpl<>(selector3));
});
}
default TMember minOrDefault(SQLExpression3, SQLColumnResultSelector, SQLColumnResultSelector> columnSelectorExpression, TMember def) {
return getClientQueryable3().minOrDefault((selector1, selector2, selector3) -> {
columnSelectorExpression.apply(new SQLColumnResultSelectorImpl<>(selector1), new SQLColumnResultSelectorImpl<>(selector2), new SQLColumnResultSelectorImpl<>(selector3));
}, def);
}
default Double avgOrNull(SQLExpression3, SQLColumnResultSelector, SQLColumnResultSelector> columnSelectorExpression) {
return getClientQueryable3().avgOrNull((selector1, selector2, selector3) -> {
columnSelectorExpression.apply(new SQLColumnResultSelectorImpl<>(selector1), new SQLColumnResultSelectorImpl<>(selector2), new SQLColumnResultSelectorImpl<>(selector3));
});
}
default BigDecimal avgBigDecimalOrNull(SQLExpression3, SQLColumnResultSelector, SQLColumnResultSelector> columnSelectorExpression) {
return getClientQueryable3().avgBigDecimalOrNull((selector1, selector2, selector3) -> {
columnSelectorExpression.apply(new SQLColumnResultSelectorImpl<>(selector1), new SQLColumnResultSelectorImpl<>(selector2), new SQLColumnResultSelectorImpl<>(selector3));
});
}
default Float avgFloatOrNull(SQLExpression3, SQLColumnResultSelector, SQLColumnResultSelector> columnSelectorExpression) {
return getClientQueryable3().avgFloatOrNull((selector1, selector2, selector3) -> {
columnSelectorExpression.apply(new SQLColumnResultSelectorImpl<>(selector1), new SQLColumnResultSelectorImpl<>(selector2), new SQLColumnResultSelectorImpl<>(selector3));
});
}
default Double avgOrDefault(SQLExpression3, SQLColumnResultSelector, SQLColumnResultSelector> columnSelectorExpression, Double def) {
return getClientQueryable3().avgOrDefault((selector1, selector2, selector3) -> {
columnSelectorExpression.apply(new SQLColumnResultSelectorImpl<>(selector1), new SQLColumnResultSelectorImpl<>(selector2), new SQLColumnResultSelectorImpl<>(selector3));
}, def);
}
default BigDecimal avgBigDecimalOrDefault(SQLExpression3, SQLColumnResultSelector, SQLColumnResultSelector> columnSelectorExpression, BigDecimal def) {
return getClientQueryable3().avgBigDecimalOrDefault((selector1, selector2, selector3) -> {
columnSelectorExpression.apply(new SQLColumnResultSelectorImpl<>(selector1), new SQLColumnResultSelectorImpl<>(selector2), new SQLColumnResultSelectorImpl<>(selector3));
}, def);
}
default Float avgFloatOrDefault(SQLExpression3, SQLColumnResultSelector, SQLColumnResultSelector> columnSelectorExpression, Float def) {
return getClientQueryable3().avgFloatOrDefault((selector1, selector2, selector3) -> {
columnSelectorExpression.apply(new SQLColumnResultSelectorImpl<>(selector1), new SQLColumnResultSelectorImpl<>(selector2), new SQLColumnResultSelectorImpl<>(selector3));
}, def);
}
default TResult avgOrDefault(SQLExpression3, SQLColumnResultSelector, SQLColumnResultSelector> columnSelectorExpression, TResult def, Class resultClass) {
return getClientQueryable3().avgOrDefault((selector1, selector2, selector3) -> {
columnSelectorExpression.apply(new SQLColumnResultSelectorImpl<>(selector1), new SQLColumnResultSelectorImpl<>(selector2), new SQLColumnResultSelectorImpl<>(selector3));
}, def, resultClass);
}
/**
* 防止溢出
*
* @param columnSelectorExpression
* @param
* @return
*/
default BigDecimal sumBigDecimalOrNullMerge(SQLExpression1, SQLColumnResultSelector, SQLColumnResultSelector>> columnSelectorExpression) {
return getClientQueryable3().sumBigDecimalOrNullMerge((tuple3) -> {
columnSelectorExpression.apply(new Tuple3<>(new SQLColumnResultSelectorImpl<>(tuple3.t()), new SQLColumnResultSelectorImpl<>(tuple3.t1()),new SQLColumnResultSelectorImpl<>(tuple3.t2())));
});
}
default BigDecimal sumBigDecimalOrDefaultMerge(SQLExpression1, SQLColumnResultSelector, SQLColumnResultSelector>> columnSelectorExpression, BigDecimal def) {
return getClientQueryable3().sumBigDecimalOrDefaultMerge((tuple3) -> {
columnSelectorExpression.apply(new Tuple3<>(new SQLColumnResultSelectorImpl<>(tuple3.t()), new SQLColumnResultSelectorImpl<>(tuple3.t1()),new SQLColumnResultSelectorImpl<>(tuple3.t2())));
}, def);
}
default TMember sumOrNullMerge(SQLExpression1, SQLColumnResultSelector, SQLColumnResultSelector>> columnSelectorExpression) {
return getClientQueryable3().sumOrNullMerge((tuple3) -> {
columnSelectorExpression.apply(new Tuple3<>(new SQLColumnResultSelectorImpl<>(tuple3.t()), new SQLColumnResultSelectorImpl<>(tuple3.t1()),new SQLColumnResultSelectorImpl<>(tuple3.t2())));
});
}
default TMember sumOrDefaultMerge(SQLExpression1, SQLColumnResultSelector, SQLColumnResultSelector>> columnSelectorExpression, TMember def) {
return getClientQueryable3().sumOrDefaultMerge((tuple3) -> {
columnSelectorExpression.apply(new Tuple3<>(new SQLColumnResultSelectorImpl<>(tuple3.t()), new SQLColumnResultSelectorImpl<>(tuple3.t1()),new SQLColumnResultSelectorImpl<>(tuple3.t2())));
}, def);
}
default TMember maxOrNullMerge(SQLExpression1, SQLColumnResultSelector, SQLColumnResultSelector>> columnSelectorExpression) {
return getClientQueryable3().maxOrNullMerge((tuple3) -> {
columnSelectorExpression.apply(new Tuple3<>(new SQLColumnResultSelectorImpl<>(tuple3.t()), new SQLColumnResultSelectorImpl<>(tuple3.t1()),new SQLColumnResultSelectorImpl<>(tuple3.t2())));
});
}
default TMember maxOrDefaultMerge(SQLExpression1, SQLColumnResultSelector, SQLColumnResultSelector>> columnSelectorExpression, TMember def) {
return getClientQueryable3().maxOrDefaultMerge((tuple3) -> {
columnSelectorExpression.apply(new Tuple3<>(new SQLColumnResultSelectorImpl<>(tuple3.t()), new SQLColumnResultSelectorImpl<>(tuple3.t1()),new SQLColumnResultSelectorImpl<>(tuple3.t2())));
}, def);
}
default TMember minOrNullMerge(SQLExpression1, SQLColumnResultSelector, SQLColumnResultSelector>> columnSelectorExpression) {
return getClientQueryable3().minOrNullMerge((tuple3) -> {
columnSelectorExpression.apply(new Tuple3<>(new SQLColumnResultSelectorImpl<>(tuple3.t()), new SQLColumnResultSelectorImpl<>(tuple3.t1()),new SQLColumnResultSelectorImpl<>(tuple3.t2())));
});
}
default TMember minOrDefaultMerge(SQLExpression1, SQLColumnResultSelector, SQLColumnResultSelector>> columnSelectorExpression, TMember def) {
return getClientQueryable3().minOrDefaultMerge((tuple3) -> {
columnSelectorExpression.apply(new Tuple3<>(new SQLColumnResultSelectorImpl<>(tuple3.t()), new SQLColumnResultSelectorImpl<>(tuple3.t1()),new SQLColumnResultSelectorImpl<>(tuple3.t2())));
}, def);
}
default Double avgOrNullMerge(SQLExpression1, SQLColumnResultSelector, SQLColumnResultSelector>> columnSelectorExpression) {
return getClientQueryable3().avgOrNullMerge((tuple3) -> {
columnSelectorExpression.apply(new Tuple3<>(new SQLColumnResultSelectorImpl<>(tuple3.t()), new SQLColumnResultSelectorImpl<>(tuple3.t1()),new SQLColumnResultSelectorImpl<>(tuple3.t2())));
});
}
default BigDecimal avgBigDecimalOrNullMerge(SQLExpression1, SQLColumnResultSelector, SQLColumnResultSelector>> columnSelectorExpression) {
return getClientQueryable3().avgBigDecimalOrNullMerge((tuple3) -> {
columnSelectorExpression.apply(new Tuple3<>(new SQLColumnResultSelectorImpl<>(tuple3.t()), new SQLColumnResultSelectorImpl<>(tuple3.t1()),new SQLColumnResultSelectorImpl<>(tuple3.t2())));
});
}
default Float avgFloatOrNullMerge(SQLExpression1, SQLColumnResultSelector, SQLColumnResultSelector>> columnSelectorExpression) {
return getClientQueryable3().avgFloatOrNullMerge((tuple3) -> {
columnSelectorExpression.apply(new Tuple3<>(new SQLColumnResultSelectorImpl<>(tuple3.t()), new SQLColumnResultSelectorImpl<>(tuple3.t1()),new SQLColumnResultSelectorImpl<>(tuple3.t2())));
});
}
default Double avgOrDefaultMerge(SQLExpression1, SQLColumnResultSelector, SQLColumnResultSelector>> columnSelectorExpression, Double def) {
return getClientQueryable3().avgOrDefaultMerge((tuple3) -> {
columnSelectorExpression.apply(new Tuple3<>(new SQLColumnResultSelectorImpl<>(tuple3.t()), new SQLColumnResultSelectorImpl<>(tuple3.t1()),new SQLColumnResultSelectorImpl<>(tuple3.t2())));
}, def);
}
default BigDecimal avgBigDecimalOrDefaultMerge(SQLExpression1, SQLColumnResultSelector, SQLColumnResultSelector>> columnSelectorExpression, BigDecimal def) {
return getClientQueryable3().avgBigDecimalOrDefaultMerge((tuple3) -> {
columnSelectorExpression.apply(new Tuple3<>(new SQLColumnResultSelectorImpl<>(tuple3.t()), new SQLColumnResultSelectorImpl<>(tuple3.t1()),new SQLColumnResultSelectorImpl<>(tuple3.t2())));
}, def);
}
default Float avgFloatOrDefaultMerge(SQLExpression1, SQLColumnResultSelector, SQLColumnResultSelector>> columnSelectorExpression, Float def) {
return getClientQueryable3().avgFloatOrDefaultMerge((tuple3) -> {
columnSelectorExpression.apply(new Tuple3<>(new SQLColumnResultSelectorImpl<>(tuple3.t()), new SQLColumnResultSelectorImpl<>(tuple3.t1()),new SQLColumnResultSelectorImpl<>(tuple3.t2())));
}, def);
}
default TResult avgOrDefaultMerge(SQLExpression1, SQLColumnResultSelector, SQLColumnResultSelector>> columnSelectorExpression, TResult def, Class resultClass) {
return getClientQueryable3().avgOrDefaultMerge((tuple3) -> {
columnSelectorExpression.apply(new Tuple3<>(new SQLColumnResultSelectorImpl<>(tuple3.t()), new SQLColumnResultSelectorImpl<>(tuple3.t1()),new SQLColumnResultSelectorImpl<>(tuple3.t2())));
}, def, resultClass);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy