com.yuehuanghun.mybatis.milu.criteria.LambdaStatisticPredicateImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mybatis-milu Show documentation
Show all versions of mybatis-milu Show documentation
A mybatis orm enhance framework.
/*
* Copyright 2020-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.yuehuanghun.mybatis.milu.criteria;
import java.util.function.Consumer;
import com.yuehuanghun.mybatis.milu.annotation.Mode;
import com.yuehuanghun.mybatis.milu.criteria.lambda.LambdaReflections;
import com.yuehuanghun.mybatis.milu.criteria.lambda.SerializableFunction;
import com.yuehuanghun.mybatis.milu.data.Sort.Direction;
import lombok.Getter;
public class LambdaStatisticPredicateImpl extends LambdaPredicateImpl implements LambdaStatisticPredicate {
@Getter
private StatisticPredicateImpl delegate = new StatisticPredicateImpl();
@Override
public LambdaStatisticPredicate sum(SerializableFunction getterFn) {
getDelegate().sum(LambdaReflections.fnToFieldName(getterFn));
return this;
}
@Override
public LambdaStatisticPredicate sum(SerializableFunction getterFn, String columnAlias) {
getDelegate().sum(LambdaReflections.fnToFieldName(getterFn), columnAlias);
return this;
}
@Override
public LambdaStatisticPredicate count(SerializableFunction getterFn) {
getDelegate().count(LambdaReflections.fnToFieldName(getterFn));
return this;
}
@Override
public LambdaStatisticPredicate count(SerializableFunction getterFn, String columnAlias) {
getDelegate().count(LambdaReflections.fnToFieldName(getterFn), columnAlias);
return this;
}
@Override
public LambdaStatisticPredicate avg(SerializableFunction getterFn) {
getDelegate().avg(LambdaReflections.fnToFieldName(getterFn));
return this;
}
@Override
public LambdaStatisticPredicate avg(SerializableFunction getterFn, String columnAlias) {
getDelegate().avg(LambdaReflections.fnToFieldName(getterFn), columnAlias);
return this;
}
@Override
public LambdaStatisticPredicate min(SerializableFunction getterFn) {
getDelegate().min(LambdaReflections.fnToFieldName(getterFn));
return this;
}
@Override
public LambdaStatisticPredicate min(SerializableFunction getterFn, String columnAlias) {
getDelegate().min(LambdaReflections.fnToFieldName(getterFn), columnAlias);
return this;
}
@Override
public LambdaStatisticPredicate max(SerializableFunction getterFn) {
getDelegate().max(LambdaReflections.fnToFieldName(getterFn));
return this;
}
@Override
public LambdaStatisticPredicate max(SerializableFunction getterFn, String columnAlias) {
getDelegate().max(LambdaReflections.fnToFieldName(getterFn), columnAlias);
return this;
}
@Override
public LambdaStatisticPredicate groupBy(SerializableFunction getterFn) {
getDelegate().groupBy(LambdaReflections.fnToFieldName(getterFn));
return this;
}
@SuppressWarnings("unchecked")
@Override
public LambdaStatisticPredicate groupBy(SerializableFunction... getterFns) {
String[] attrNames = new String[getterFns.length];
for(int i = 0; i < getterFns.length; i++) {
SerializableFunction getterFn = getterFns[i];
attrNames[i] = LambdaReflections.fnToFieldName(getterFn);
}
getDelegate().groupBy(attrNames);
return this;
}
public LambdaStatisticPredicate groupByAs(SerializableFunction getterFn, String alias) {
getDelegate().groupByAs(LambdaReflections.fnToFieldName(getterFn), alias);
return this;
}
@SuppressWarnings("unchecked")
@Override
public LambdaStatisticPredicate order(SerializableFunction... getterFns) {
this.order(null, getterFns);
return this;
}
@Override
public LambdaStatisticPredicate order(SerializableFunction getterFn) {
this.order(null, getterFn);
return this;
}
@SuppressWarnings("unchecked")
@Override
public LambdaStatisticPredicate order(Direction direction, SerializableFunction... getterFns) {
String[] attrNames = new String[getterFns.length];
for(int i = 0; i < getterFns.length; i++) {
SerializableFunction getterFn = getterFns[i];
attrNames[i] = LambdaReflections.fnToFieldName(getterFn);
}
getDelegate().order(direction, attrNames);
return this;
}
@Override
public LambdaStatisticPredicate order(Direction direction, SerializableFunction getterFn) {
getDelegate().order(direction, LambdaReflections.fnToFieldName(getterFn));
return this;
}
@SuppressWarnings("unchecked")
@Override
public LambdaStatisticPredicate orderAsc(SerializableFunction... getterFns) {
this.order(Direction.ASC, getterFns);
return this;
}
@Override
public LambdaStatisticPredicate orderAsc(SerializableFunction getterFn) {
this.order(Direction.ASC, getterFn);
return this;
}
@SuppressWarnings("unchecked")
@Override
public LambdaStatisticPredicate orderDesc(SerializableFunction... getterFns) {
this.order(Direction.DESC, getterFns);
return this;
}
@Override
public LambdaStatisticPredicate orderDesc(SerializableFunction getterFn) {
this.order(Direction.DESC, getterFn);
return this;
}
@Override
public LambdaStatisticPredicate limit(int pageSize) {
getDelegate().limit(pageSize);
return this;
}
@Override
public LambdaStatisticPredicate limit(int pageSize, boolean count) {
getDelegate().limit(pageSize, count);
return this;
}
@Override
public LambdaStatisticPredicate limit(int pageNum, int pageSize) {
getDelegate().limit(pageNum, pageSize);
return this;
}
@Override
public LambdaStatisticPredicate limit(int pageNum, int pageSize, boolean count) {
getDelegate().limit(pageNum, pageSize, count);
return this;
}
@Override
public LambdaStatisticPredicate apply(T entity) {
super.apply(entity);
return this;
}
@Override
public LambdaStatisticPredicate conditionMode(Mode conditionMode) {
super.conditionMode(conditionMode);
return this;
}
@Override
public LambdaStatisticPredicate and(Condition... conditions) {
super.and(conditions);
return this;
}
@Override
public LambdaStatisticPredicate and(Consumer> predicate) {
super.and(predicate);
return this;
}
@Override
public LambdaStatisticPredicate or(Condition... conditions) {
super.or(conditions);
return this;
}
@Override
public LambdaStatisticPredicate or(Consumer> predicate) {
super.or(predicate);
return this;
}
@Override
public LambdaStatisticPredicate not(Condition... conditions) {
super.not(conditions);
return this;
}
@Override
public LambdaStatisticPredicate not(Consumer> predicate) {
super.not(predicate);
return this;
}
@Override
public LambdaStatisticPredicate andP(Consumer predicate) {
super.andP(predicate);
return this;
}
@Override
public LambdaStatisticPredicate orP(Consumer predicate) {
super.orP(predicate);
return this;
}
@Override
public LambdaStatisticPredicate notP(Consumer predicate) {
super.notP(predicate);
return this;
}
@Override
public LambdaStatisticPredicate eq(SerializableFunction getterFn) {
super.eq(getterFn);
return this;
}
@Override
public LambdaStatisticPredicate eq(boolean accept, SerializableFunction getterFn) {
super.eq(accept, getterFn);
return this;
}
@Override
public LambdaStatisticPredicate neq(SerializableFunction getterFn) {
super.neq(getterFn);
return this;
}
@Override
public LambdaStatisticPredicate neq(boolean accept, SerializableFunction getterFn) {
super.neq(accept, getterFn);
return this;
}
@Override
public LambdaStatisticPredicate lt(SerializableFunction getterFn) {
super.lt(getterFn);
return this;
}
@Override
public LambdaStatisticPredicate lt(boolean accept, SerializableFunction getterFn) {
super.lt(accept, getterFn);
return this;
}
@Override
public LambdaStatisticPredicate lte(SerializableFunction getterFn) {
super.lte(getterFn);
return this;
}
@Override
public LambdaStatisticPredicate lte(boolean accept, SerializableFunction getterFn) {
super.lte(accept, getterFn);
return this;
}
@Override
public LambdaStatisticPredicate gt(SerializableFunction getterFn) {
super.gt(getterFn);
return this;
}
@Override
public LambdaStatisticPredicate gt(boolean accept, SerializableFunction getterFn) {
super.gt(accept, getterFn);
return this;
}
@Override
public LambdaStatisticPredicate gte(SerializableFunction getterFn) {
super.gte(getterFn);
return this;
}
@Override
public LambdaStatisticPredicate gte(boolean accept, SerializableFunction getterFn) {
super.gte(accept, getterFn);
return this;
}
@Override
public LambdaStatisticPredicate like(SerializableFunction getterFn) {
super.like(getterFn);
return this;
}
@Override
public LambdaStatisticPredicate like(boolean accept, SerializableFunction getterFn) {
super.like(accept, getterFn);
return this;
}
@Override
public LambdaStatisticPredicate notLike(SerializableFunction getterFn) {
super.notLike(getterFn);
return this;
}
@Override
public LambdaStatisticPredicate notLike(boolean accept, SerializableFunction getterFn) {
super.notLike(accept, getterFn);
return this;
}
@Override
public LambdaStatisticPredicate contain(SerializableFunction getterFn) {
super.contain(getterFn);
return this;
}
@Override
public LambdaStatisticPredicate contain(boolean accept, SerializableFunction getterFn) {
super.contain(accept, getterFn);
return this;
}
@Override
public LambdaStatisticPredicate notContain(SerializableFunction getterFn) {
super.notContain(getterFn);
return this;
}
@Override
public LambdaStatisticPredicate notContain(boolean accept, SerializableFunction getterFn) {
super.notContain(accept, getterFn);
return this;
}
@Override
public LambdaStatisticPredicate startWith(SerializableFunction getterFn) {
super.startWith(getterFn);
return this;
}
@Override
public LambdaStatisticPredicate startWith(boolean accept, SerializableFunction getterFn) {
super.startWith(accept, getterFn);
return this;
}
@Override
public LambdaStatisticPredicate endWith(SerializableFunction getterFn) {
super.endWith(getterFn);
return this;
}
@Override
public LambdaStatisticPredicate endWith(boolean accept, SerializableFunction getterFn) {
super.endWith(accept, getterFn);
return this;
}
@Override
public LambdaStatisticPredicate between(SerializableFunction getterFn, Object startValue, Object endValue) {
super.between(getterFn, startValue, endValue);
return this;
}
@Override
public LambdaStatisticPredicate between(boolean accept, SerializableFunction getterFn, Object startValue,
Object endValue) {
super.between(accept, getterFn, startValue, endValue);
return this;
}
@Override
public LambdaStatisticPredicate isNull(SerializableFunction getterFn) {
super.isNull(getterFn);
return this;
}
@Override
public LambdaStatisticPredicate isNull(boolean accept, SerializableFunction getterFn) {
super.isNull(accept, getterFn);
return this;
}
@Override
public LambdaStatisticPredicate notNull(SerializableFunction getterFn) {
super.notNull(getterFn);
return this;
}
@Override
public LambdaStatisticPredicate notNull(boolean accept, SerializableFunction getterFn) {
super.notNull(accept, getterFn);
return this;
}
@Override
public LambdaStatisticPredicate in(SerializableFunction getterFn) {
super.in(getterFn);
return this;
}
@Override
public LambdaStatisticPredicate in(boolean accept, SerializableFunction getterFn) {
super.in(accept, getterFn);
return this;
}
@Override
public LambdaStatisticPredicate notIn(SerializableFunction getterFn) {
super.notIn(getterFn);
return this;
}
@Override
public LambdaStatisticPredicate notIn(boolean accept, SerializableFunction getterFn) {
super.notIn(accept, getterFn);
return this;
}
@Override
public LambdaStatisticPredicate eq(SerializableFunction getterFn, Object value) {
super.eq(getterFn, value);
return this;
}
@Override
public LambdaStatisticPredicate eq(boolean accept, SerializableFunction getterFn, Object value) {
super.eq(accept, getterFn, value);
return this;
}
@Override
public LambdaStatisticPredicate neq(SerializableFunction getterFn, Object value) {
super.neq(getterFn, value);
return this;
}
@Override
public LambdaStatisticPredicate neq(boolean accept, SerializableFunction getterFn, Object value) {
super.neq(accept, getterFn, value);
return this;
}
@Override
public LambdaStatisticPredicate lt(SerializableFunction getterFn, Object value) {
super.lt(getterFn, value);
return this;
}
@Override
public LambdaStatisticPredicate lt(boolean accept, SerializableFunction getterFn, Object value) {
super.lt(accept, getterFn, value);
return this;
}
@Override
public LambdaStatisticPredicate lte(SerializableFunction getterFn, Object value) {
super.lte(getterFn, value);
return this;
}
@Override
public LambdaStatisticPredicate lte(boolean accept, SerializableFunction getterFn, Object value) {
super.lte(accept, getterFn, value);
return this;
}
@Override
public LambdaStatisticPredicate gt(SerializableFunction getterFn, Object value) {
super.gt(getterFn, value);
return this;
}
@Override
public LambdaStatisticPredicate gt(boolean accept, SerializableFunction getterFn, Object value) {
super.gt(accept, getterFn, value);
return this;
}
@Override
public LambdaStatisticPredicate gte(SerializableFunction getterFn, Object value) {
super.gte(getterFn, value);
return this;
}
@Override
public LambdaStatisticPredicate gte(boolean accept, SerializableFunction getterFn, Object value) {
super.gte(accept, getterFn, value);
return this;
}
@Override
public LambdaStatisticPredicate like(SerializableFunction getterFn, Object value) {
super.like(getterFn, value);
return this;
}
@Override
public LambdaStatisticPredicate like(boolean accept, SerializableFunction getterFn, Object value) {
super.like(accept, getterFn, value);
return this;
}
@Override
public LambdaStatisticPredicate notLike(SerializableFunction getterFn, Object value) {
super.notLike(getterFn, value);
return this;
}
@Override
public LambdaStatisticPredicate notLike(boolean accept, SerializableFunction getterFn, Object value) {
super.notLike(accept, getterFn, value);
return this;
}
@Override
public LambdaStatisticPredicate contain(SerializableFunction getterFn, Object value) {
super.contain(getterFn, value);
return this;
}
@Override
public LambdaStatisticPredicate contain(boolean accept, SerializableFunction getterFn, Object value) {
super.contain(accept, getterFn, value);
return this;
}
@Override
public LambdaStatisticPredicate notContain(SerializableFunction getterFn, Object value) {
super.notContain(getterFn, value);
return this;
}
@Override
public LambdaStatisticPredicate notContain(boolean accept, SerializableFunction getterFn, Object value) {
super.notContain(accept, getterFn, value);
return this;
}
@Override
public LambdaStatisticPredicate startWith(SerializableFunction getterFn, Object value) {
super.startWith(getterFn, value);
return this;
}
@Override
public LambdaStatisticPredicate startWith(boolean accept, SerializableFunction getterFn, Object value) {
super.startWith(accept, getterFn, value);
return this;
}
@Override
public LambdaStatisticPredicate endWith(SerializableFunction getterFn, Object value) {
super.endWith(getterFn, value);
return this;
}
@Override
public LambdaStatisticPredicate endWith(boolean accept, SerializableFunction getterFn, Object value) {
super.endWith(accept, getterFn, value);
return this;
}
@Override
public LambdaStatisticPredicate in(SerializableFunction getterFn, Object value) {
super.in(getterFn, value);
return this;
}
@Override
public LambdaStatisticPredicate in(boolean accept, SerializableFunction getterFn, Object value) {
super.in(accept, getterFn, value);
return this;
}
@Override
public LambdaStatisticPredicate notIn(SerializableFunction getterFn, Object value) {
super.notIn(getterFn, value);
return this;
}
@Override
public LambdaStatisticPredicate notIn(boolean accept, SerializableFunction getterFn, Object value) {
super.notIn(accept, getterFn, value);
return this;
}
@Override
public LambdaStatisticPredicate regex(SerializableFunction getterFn, Object value) {
super.regex(getterFn, value);
return this;
}
@Override
public LambdaStatisticPredicate regex(boolean accept, SerializableFunction getterFn, Object value) {
super.regex(accept, getterFn, value);
return this;
}
@Override
public LambdaStatisticPredicate undeleted() {
getDelegate().undeleted();
return this;
}
@Override
public LambdaStatisticPredicate deleted() {
getDelegate().deleted();
return this;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy