com.github.yulichang.wrapper.interfaces.CompareWrapper Maven / Gradle / Ivy
Show all versions of mybatis-plus-join-core Show documentation
package com.github.yulichang.wrapper.interfaces;
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import java.io.Serializable;
/**
* 将原来的泛型R改成SFunction
*
* {@link com.baomidou.mybatisplus.core.conditions.interfaces.Compare}
*/
@SuppressWarnings("unused")
public interface CompareWrapper extends Serializable {
default Children eq(SFunction column, Class clazz, MFunction> val) {
return eq(true, null, column, clazz, val);
}
default Children eq(String alias, SFunction column, Class clazz, MFunction> val) {
return eq(true, alias, column, clazz, val);
}
default Children eq(boolean condition, SFunction column, Class clazz, MFunction> val) {
return eq(condition, null, column, clazz, val);
}
/**
* 等于 =
*
* @param condition 执行条件
* @param column 字段
* @param val 值
* @return children
*/
Children eq(boolean condition, String alias, SFunction column, Class clazz, MFunction> val);
default Children ne(SFunction column, Class clazz, MFunction> val) {
return ne(true, null, column, clazz, val);
}
default Children ne(String alias, SFunction column, Class clazz, MFunction> val) {
return ne(true, alias, column, clazz, val);
}
default Children ne(boolean condition, SFunction column, Class clazz, MFunction> val) {
return ne(condition, null, column, clazz, val);
}
/**
* 不等于 <>
*
* @param condition 执行条件
* @param alias 字段别名
* @param column 字段
* @param val 值
* @return children
*/
Children ne(boolean condition, String alias, SFunction column, Class clazz, MFunction> val);
default Children gt(SFunction column, Class clazz, MFunction> val) {
return gt(true, null, column, clazz, val);
}
default Children gt(String alias, SFunction column, Class clazz, MFunction> val) {
return gt(true, alias, column, clazz, val);
}
default Children gt(boolean condition, SFunction column, Class clazz, MFunction> val) {
return gt(condition, null, column, clazz, val);
}
/**
* 大于 >
*
* @param condition 执行条件
* @param column 字段
* @param val 值
* @return children
*/
Children gt(boolean condition, String alias, SFunction column, Class clazz, MFunction> val);
default Children ge(SFunction column, Class clazz, MFunction> val) {
return ge(true, null, column, clazz, val);
}
default Children ge(String alias, SFunction column, Class clazz, MFunction> val) {
return ge(true, alias, column, clazz, val);
}
default Children ge(boolean condition, SFunction column, Class clazz, MFunction> val) {
return ge(condition, null, column, clazz, val);
}
/**
* 大于等于 >=
*
* @param condition 执行条件
* @param column 字段
* @param val 值
* @return children
*/
Children ge(boolean condition, String alias, SFunction column, Class clazz, MFunction> val);
default Children lt(SFunction column, Class clazz, MFunction> val) {
return lt(true, null, column, clazz, val);
}
default Children lt(String alias, SFunction column, Class clazz, MFunction> val) {
return lt(true, alias, column, clazz, val);
}
default Children lt(boolean condition, SFunction column, Class clazz, MFunction> val) {
return lt(condition, null, column, clazz, val);
}
/**
* 小于 <
*
* @param condition 执行条件
* @param column 字段
* @param val 值
* @return children
*/
Children lt(boolean condition, String alias, SFunction column, Class clazz, MFunction> val);
default Children le(SFunction column, Class clazz, MFunction> val) {
return le(true, null, column, clazz, val);
}
default Children le(String alias, SFunction column, Class clazz, MFunction> val) {
return le(true, alias, column, clazz, val);
}
default Children le(boolean condition, SFunction column, Class clazz, MFunction> val) {
return le(condition, null, column, clazz, val);
}
/**
* 小于等于 <=
*
* @param condition 执行条件
* @param column 字段
* @param val 值
* @return children
*/
Children le(boolean condition, String alias, SFunction column, Class clazz, MFunction> val);
}