com.github.yulichang.wrapper.interfaces.CompareStr Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mybatis-plus-join-core Show documentation
Show all versions of mybatis-plus-join-core Show documentation
An enhanced toolkit of Mybatis-Plus to simplify development.
/*
* Copyright (c) 2011-2022, baomidou ([email protected]).
*
* 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
*
* http://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.github.yulichang.wrapper.interfaces;
import java.io.Serializable;
import java.util.Map;
import java.util.function.BiPredicate;
/**
* copu {@link com.baomidou.mybatisplus.core.conditions.interfaces.Compare}
*
* @since 1.3.12
*/
@SuppressWarnings("ALL")
public interface CompareStr extends Serializable {
/**
* ignore
*/
default Children allEqStr(Map params) {
return allEqStr(params, true);
}
/**
* ignore
*/
default Children allEqStr(Map params, boolean null2IsNull) {
return allEqStr(true, params, null2IsNull);
}
/**
* map 所有非空属性等于 =
*
* @param condition 执行条件
* @param params map 类型的参数, key 是字段名, value 是字段值
* @param null2IsNull 是否参数为 null 自动执行 isNull 方法, false 则忽略这个字段\
* @return children
*/
Children allEqStr(boolean condition, Map params, boolean null2IsNull);
/**
* ignore
*/
default Children allEqStr(BiPredicate filter, Map params) {
return allEqStr(filter, params, true);
}
/**
* ignore
*/
default Children allEqStr(BiPredicate filter, Map params, boolean null2IsNull) {
return allEqStr(true, filter, params, null2IsNull);
}
/**
* 字段过滤接口,传入多参数时允许对参数进行过滤
*
* @param condition 执行条件
* @param filter 返回 true 来允许字段传入比对条件中
* @param params map 类型的参数, key 是字段名, value 是字段值
* @param null2IsNull 是否参数为 null 自动执行 isNull 方法, false 则忽略这个字段
* @return children
*/
Children allEqStr(boolean condition, BiPredicate filter, Map params, boolean null2IsNull);
/**
* ignore
*/
default Children eq(R column, Object val) {
return eq(true, column, val);
}
/**
* 等于 =
*
* @param condition 执行条件
* @param column 字段
* @param val 值
* @return children
*/
Children eq(boolean condition, R column, Object val);
/**
* ignore
*/
default Children ne(R column, Object val) {
return ne(true, column, val);
}
/**
* 不等于 <>
*
* @param condition 执行条件
* @param column 字段
* @param val 值
* @return children
*/
Children ne(boolean condition, R column, Object val);
/**
* ignore
*/
default Children gt(R column, Object val) {
return gt(true, column, val);
}
/**
* 大于 >
*
* @param condition 执行条件
* @param column 字段
* @param val 值
* @return children
*/
Children gt(boolean condition, R column, Object val);
/**
* ignore
*/
default Children ge(R column, Object val) {
return ge(true, column, val);
}
/**
* 大于等于 >=
*
* @param condition 执行条件
* @param column 字段
* @param val 值
* @return children
*/
Children ge(boolean condition, R column, Object val);
/**
* ignore
*/
default Children lt(R column, Object val) {
return lt(true, column, val);
}
/**
* 小于 <
*
* @param condition 执行条件
* @param column 字段
* @param val 值
* @return children
*/
Children lt(boolean condition, R column, Object val);
/**
* ignore
*/
default Children le(R column, Object val) {
return le(true, column, val);
}
/**
* 小于等于 <=
*
* @param condition 执行条件
* @param column 字段
* @param val 值
* @return children
*/
Children le(boolean condition, R column, Object val);
/**
* ignore
*/
default Children between(R column, Object val1, Object val2) {
return between(true, column, val1, val2);
}
/**
* BETWEEN 值1 AND 值2
*
* @param condition 执行条件
* @param column 字段
* @param val1 值1
* @param val2 值2
* @return children
*/
Children between(boolean condition, R column, Object val1, Object val2);
/**
* ignore
*/
default Children notBetween(R column, Object val1, Object val2) {
return notBetween(true, column, val1, val2);
}
/**
* NOT BETWEEN 值1 AND 值2
*
* @param condition 执行条件
* @param column 字段
* @param val1 值1
* @param val2 值2
* @return children
*/
Children notBetween(boolean condition, R column, Object val1, Object val2);
/**
* ignore
*/
default Children like(R column, Object val) {
return like(true, column, val);
}
/**
* LIKE '%值%'
*
* @param condition 执行条件
* @param column 字段
* @param val 值
* @return children
*/
Children like(boolean condition, R column, Object val);
/**
* ignore
*/
default Children notLike(R column, Object val) {
return notLike(true, column, val);
}
/**
* NOT LIKE '%值%'
*
* @param condition 执行条件
* @param column 字段
* @param val 值
* @return children
*/
Children notLike(boolean condition, R column, Object val);
/**
* ignore
*/
default Children likeLeft(R column, Object val) {
return likeLeft(true, column, val);
}
/**
* LIKE '%值'
*
* @param condition 执行条件
* @param column 字段
* @param val 值
* @return children
*/
Children likeLeft(boolean condition, R column, Object val);
/**
* ignore
*/
default Children notLikeLeft(R column, Object val) {
return notLikeLeft(true, column, val);
}
/**
* LIKE '%值'
*
* @param condition 执行条件
* @param column 字段
* @param val 值
* @return children
*/
Children notLikeLeft(boolean condition, R column, Object val);
/**
* ignore
*/
default Children likeRight(R column, Object val) {
return likeRight(true, column, val);
}
/**
* LIKE '值%'
*
* @param condition 执行条件
* @param column 字段
* @param val 值
* @return children
*/
Children likeRight(boolean condition, R column, Object val);
/**
* ignore
*/
default Children notLikeRight(R column, Object val) {
return notLikeRight(true, column, val);
}
/**
* LIKE '值%'
*
* @param condition 执行条件
* @param column 字段
* @param val 值
* @return children
*/
Children notLikeRight(boolean condition, R column, Object val);
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy