com.github.alittlehuang.data.query.specification.WhereClauseBuilder Maven / Gradle / Ivy
The newest version!
package com.github.alittlehuang.data.query.specification;
import java.util.Collection;
/**
* @author ALittleHuang
*/
public interface WhereClauseBuilder> {
/**
* 返回一个新的对象,与原条件以OR条件链接
*/
THIS or();
THIS or(WhereClause whereClause);
/**
* 返回一个新的对象,与原条件以AND条件链接
*/
THIS and();
THIS and(WhereClause whereClause);
THIS andEq(String name, Object value);
default THIS eq(String name, Object value) {
return andEq(name, value);
}
THIS orEq(String name, Object value);
THIS andNotEq(String name, Object value);
default THIS notEq(String name, Object value) {
return andNotEq(name, value);
}
THIS orNotEq(String name, Object value);
> THIS andBetween(String name, X value0, X value1);
default > THIS between(String name, X value0, X value1) {
return andBetween(name, value0, value1);
}
> THIS orBetween(String name, X value0, X value1);
> THIS andNotBetween(String name, X value0, X value1);
default > THIS notBetween(String name, X value0, X value1) {
return andNotBetween(name, value0, value1);
}
> THIS orNotBetween(String name, X value0, X value1);
THIS andIsNull(String name);
default THIS isNull(String name) {
return andIsNull(name);
}
THIS andIsNotNull(String name);
default THIS isNotNull(String name) {
return andIsNotNull(name);
}
THIS orIsNotNull(String name);
THIS orIsNull(String name);
THIS andIsNull(Expressions name);
default THIS isNull(Expressions name) {
return andIsNull(name);
}
THIS andIsNotNull(Expressions name);
default THIS isNotNull(Expressions name) {
return andIsNotNull(name);
}
THIS orIsNotNull(Expressions name);
THIS orIsNull(Expressions name);
THIS andLike(String name, String value);
default THIS like(String name, String value) {
return andLike(name, value);
}
THIS andNotLike(String name, String value);
default THIS notLike(String name, String value) {
return andNotLike(name, value);
}
THIS orLike(String name, String value);
THIS orNotLike(String name, String value);
THIS andIn(String name, Collection value);
default THIS in(String name, Collection value) {
return andIn(name, value);
}
@SuppressWarnings( "unchecked" )
THIS andIn(String name, X... value);
default THIS in(String name, Object... value) {
return andIn(name, value);
}
THIS andNotIn(String name, Collection value);
default THIS notIn(String name, Collection value) {
return andNotIn(name, value);
}
@SuppressWarnings( "unchecked" )
THIS andNotIn(String name, X... value);
default THIS notIn(String name, Object... value) {
return andNotIn(name, value);
}
THIS orIn(String name, Collection value);
@SuppressWarnings( "unchecked" )
THIS orIn(String name, X... value);
THIS orNotIn(String name, Collection value);
@SuppressWarnings( "unchecked" )
THIS orNotIn(String name, X... value);
> THIS andEqual(E expression, E other);
default > THIS equal(E expression, E other) {
return andEqual(expression, other);
}
> THIS orEqual(E expression, E other);
> THIS andNotEqual(E expression, E other);
default > THIS notEqual(E expression, E other) {
return andNotEqual(expression, other);
}
> THIS orNotEqual(E expression, E other);
> THIS andEq(E expression, X value);
default > THIS eq(E expression, X value) {
return andEq(expression, value);
}
> THIS orEq(E expression, X value);
> THIS andNotEq(E expression, X value);
default > THIS notEq(E expression, X value) {
return andNotEq(expression, value);
}
> THIS orNotEq(E expression, X value);
> THIS andGe(String name, X value);
default > THIS ge(String name, X value) {
return andGe(name, value);
}
, E extends Expressions> THIS andGe(E expression, X value);
default , E extends Expressions> THIS ge(E expression, X value) {
return andGe(expression, value);
}
> THIS orGe(String name, X value);
, E extends Expressions> THIS orGe(E expression, X value);
> THIS andGreaterThanOrEqual(Expressions expression, Expressions other);
default > THIS greaterThanOrEqual(Expressions expression, Expressions other) {
return andGreaterThanOrEqual(expression, other);
}
> THIS orGreaterThanOrEqual(Expressions expression, Expressions other);
> THIS andNotGreaterThanOrEqual(Expressions expression, Expressions other);
default > THIS notGreaterThanOrEqual(Expressions expression, Expressions other) {
return andNotGreaterThanOrEqual(expression, other);
}
> THIS orNotGreaterThanOrEqual(Expressions expression, Expressions other);
> THIS andLe(String name, X value);
default > THIS le(String name, X value) {
return andLe(name, value);
}
, E extends Expressions> THIS andLe(E expression, X value);
default , E extends Expressions> THIS le(E expression, X value) {
return andLe(expression, value);
}
> THIS orLe(String name, X value);
, E extends Expressions> THIS orLe(E expression, X value);
> THIS andLessThanOrEqual(Expressions expression, Expressions other);
default > THIS lessThanOrEqual(Expressions expression, Expressions other) {
return andLessThanOrEqual(expression, other);
}
> THIS orLessThanOrEqual(Expressions expression, Expressions other);
> THIS andNotLessThanOrEqual(Expressions expression, Expressions other);
default > THIS notLessThanOrEqual(Expressions expression, Expressions other) {
return andNotLessThanOrEqual(expression, other);
}
> THIS orNotLessThanOrEqual(Expressions expression, Expressions other);
> THIS andGt(String name, X value);
default > THIS gt(String name, X value) {
return andGt(name, value);
}
, E extends Expressions> THIS andGt(E expression, X value);
default , E extends Expressions> THIS gt(E expression, X value) {
return andGt(expression, value);
}
> THIS orGt(String name, X value);
, E extends Expressions> THIS orGt(E expression, X value);
> THIS andGreaterThan(Expressions expression, Expressions other);
default > THIS greaterThan(Expressions expression, Expressions other) {
return andGreaterThan(expression, other);
}
> THIS orGreaterThan(Expressions expression, Expressions other);
> THIS andNotGreaterThan(Expressions expression, Expressions other);
default > THIS notGreaterThan(Expressions expression, Expressions other) {
return andNotGreaterThan(expression, other);
}
> THIS orNotGreaterThan(Expressions expression, Expressions other);
> THIS andLt(String name, X value);
default > THIS lt(String name, X value) {
return andLt(name, value);
}
, E extends Expressions> THIS andLt(E expression, X value);
default , E extends Expressions> THIS lt(E expression, X value) {
return andLt(expression, value);
}
> THIS orLt(String name, X value);
, E extends Expressions> THIS orLt(E expression, X value);
> THIS andLessThan(Expressions expression, Expressions other);
default > THIS lessThan(Expressions expression, Expressions other) {
return andLessThan(expression, other);
}
> THIS orLessThan(Expressions expression, Expressions other);
> THIS andNotLessThan(Expressions expression, Expressions other);
default > THIS notLessThan(Expressions expression, Expressions other) {
return andNotLessThan(expression, other);
}
> THIS orNotLessThan(Expressions expression, Expressions other);
, E extends Expressions> THIS andBetween(E expression, X value, X otherValue);
default , E extends Expressions> THIS between(E expression, X value, X otherValue) {
return andBetween(expression, value, otherValue);
}
, E extends Expressions> THIS orBetween(E expression, X value, X otherValue);
, E extends Expressions> THIS andNotBetween(E expression, X value, X otherValue);
default , E extends Expressions> THIS notBetween(E expression, X value,
X otherValue) {
return andNotBetween(expression, value, otherValue);
}
, E extends Expressions> THIS orNotBetween(E expression, X value, X otherValue);
default THIS andIsNull(String name, boolean isNull) {
return isNull ? isNull(name) : isNotNull(name);
}
default THIS andIsNull(Expressions expressions, boolean isNull) {
return isNull ? isNull(expressions) : isNotNull(expressions);
}
default THIS isNull(String name, boolean isNull) {
return andIsNull(name, isNull);
}
default THIS isNull(Expressions expressions, boolean isNull) {
return andIsNull(expressions, isNull);
}
default THIS orIsNull(String name, boolean isNull) {
return isNull ? orIsNull(name) : orIsNotNull(name);
}
default THIS orIsNull(Expressions expressions, boolean isNull) {
return isNull ? orIsNull(expressions) : orIsNotNull(expressions);
}
THIS andLike(Expressions expression, String value);
default THIS like(Expressions expression, String value) {
return andLike(expression, value);
}
THIS andNotLike(Expressions expression, String value);
default THIS notLike(Expressions expression, String value) {
return andNotLike(expression, value);
}
THIS orLike(Expressions expression, String value);
THIS orNotLike(Expressions expression, String value);
> THIS andIn(E expression, Collection value);
default > THIS in(E expression, Collection value) {
return andIn(expression, value);
}
@SuppressWarnings( "unchecked" )
> THIS andIn(E expression, X... value);
@SuppressWarnings( "unchecked" )
default > THIS in(E expression, X... value) {
return andIn(expression, value);
}
> THIS andNotIn(E expression, Collection value);
default > THIS notIn(E expression, Collection value) {
return andNotIn(expression, value);
}
@SuppressWarnings( "unchecked" )
> THIS andNotIn(E expression, X... value);
@SuppressWarnings( "unchecked" )
default > THIS notIn(E expression, X... value) {
return andNotIn(expression, value);
}
> THIS orIn(E expression, Collection value);
@SuppressWarnings( "unchecked" )
> THIS orIn(E expression, X... value);
> THIS orNotIn(E expression, Collection value);
@SuppressWarnings( "unchecked" )
> THIS orNotIn(E expression, X... value);
WhereClause getWhereClause();
Class getJavaType();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy