- java.lang.Object
-
- org.redkale.source.FilterNode
-
- 直接已知子类:
FilterJoinNode
public class FilterNode extends Object
注意:
column的值以#开头的视为虚拟字段,不在过滤范围内
在调用 createSQLExpress 之前必须先调用 createSQLJoin
在调用 createPredicate 之前必须先调用 isCacheUseable
详情见: https://redkale.org
- 作者:
- zhangjx
-
-
字段概要
字段 修饰符和类型 字段 说明 protected String
column
protected FilterExpress
express
protected FilterNode[]
nodes
protected boolean
or
protected boolean
readOnly
protected Serializable
value
-
构造器概要
构造器 限定符 构造器 说明 FilterNode()
protected
FilterNode(String col, FilterExpress exp, Serializable val)
-
方法概要
-
-
-
字段详细资料
-
readOnly
@ConvertColumn(index=1) protected boolean readOnly
-
column
@ConvertColumn(index=2) protected String column
-
express
@ConvertColumn(index=3) protected FilterExpress express
-
value
@ConvertColumn(index=4) protected Serializable value
-
or
@ConvertColumn(index=5) protected boolean or
-
nodes
@ConvertColumn(index=6) protected FilterNode[] nodes
-
-
构造器详细资料
-
FilterNode
public FilterNode()
-
FilterNode
protected FilterNode(String col, FilterExpress exp, Serializable val)
-
-
方法详细资料
-
any
protected FilterNode any(FilterNode node, boolean isOr)
-
create
@Deprecated(since="2.8.0") public static FilterNode create(String column, Serializable value)
已过时。
-
create
@Deprecated(since="2.8.0") public static FilterNode create(String column, FilterExpress express, Serializable value)
已过时。
-
create
@Deprecated(since="2.8.0") public static <F extends Serializable> FilterNode create(LambdaSupplier<F> func)
已过时。
-
create
@Deprecated(since="2.8.0") public static <F extends Serializable> FilterNode create(LambdaSupplier<F> func, FilterExpress express)
已过时。
-
create
@Deprecated(since="2.8.0") public static <T,F extends Serializable> FilterNode create(LambdaFunction<T,F> func, F value)
已过时。
-
create
@Deprecated(since="2.8.0") public static <T,F extends Serializable> FilterNode create(LambdaFunction<T,F> func, FilterExpress express, F value)
已过时。
-
filter
@Deprecated(since="2.8.0") public static FilterNode filter(String column, Serializable value)
已过时。
-
filter
@Deprecated(since="2.8.0") public static FilterNode filter(String column, FilterExpress express, Serializable value)
已过时。
-
copy
public FilterNode copy()
-
copy
protected FilterNode copy(FilterNode node)
-
asReadOnly
public FilterNode asReadOnly()
-
readOnly
public FilterNode readOnly(boolean readOnly)
-
findLongValue
public long findLongValue(String col, long defValue)
-
findIntValue
public int findIntValue(String col, int defValue)
-
findValue
public Serializable findValue(String col)
-
or
public final FilterNode or(FilterNode node)
-
or
public final FilterNode or(String column, Serializable value)
-
or
public final FilterNode or(String column, FilterExpress express, Serializable value)
-
or
public final <F extends Serializable> FilterNode or(LambdaSupplier<F> func)
-
or
public final <F extends Serializable> FilterNode or(LambdaSupplier<F> func, FilterExpress express)
-
or
public final <T,F extends Serializable> FilterNode or(LambdaFunction<T,F> func, F value)
-
or
public final <T,F extends Serializable> FilterNode or(LambdaFunction<T,F> func, FilterExpress express, F value)
-
and
public final FilterNode and(FilterNode node)
-
and
public final FilterNode and(String column, Serializable value)
-
and
public final FilterNode and(String column, FilterExpress express, Serializable value)
-
and
public final <F extends Serializable> FilterNode and(LambdaSupplier<F> func)
-
and
public final <F extends Serializable> FilterNode and(LambdaSupplier<F> func, FilterExpress express)
-
and
public final <T,F extends Serializable> FilterNode and(LambdaFunction<T,F> func, F value)
-
and
public final <T,F extends Serializable> FilterNode and(LambdaFunction<T,F> func, FilterExpress express, F value)
-
eq
public FilterNode eq(String column, Serializable value)
-
eq
public <F extends Serializable> FilterNode eq(LambdaSupplier<F> func)
-
eq
public <T,F extends Serializable> FilterNode eq(LambdaFunction<T,F> func, F value)
-
igEq
public FilterNode igEq(String column, Serializable value)
-
igEq
public <F extends Serializable> FilterNode igEq(LambdaSupplier<F> func)
-
igEq
public <T,F extends Serializable> FilterNode igEq(LambdaFunction<T,F> func, F value)
-
notEq
public FilterNode notEq(String column, Serializable value)
-
notEq
public <F extends Serializable> FilterNode notEq(LambdaSupplier<F> func)
-
notEq
public <T,F extends Serializable> FilterNode notEq(LambdaFunction<T,F> func, F value)
-
igNotEq
public FilterNode igNotEq(String column, Serializable value)
-
igNotEq
public <F extends Serializable> FilterNode igNotEq(LambdaSupplier<F> func)
-
igNotEq
public <T,F extends Serializable> FilterNode igNotEq(LambdaFunction<T,F> func, F value)
-
gt
public FilterNode gt(String column, Number value)
-
gt
public <F extends Number> FilterNode gt(LambdaSupplier<F> func)
-
gt
public <T,F extends Number> FilterNode gt(LambdaFunction<T,F> func, F value)
-
lt
public FilterNode lt(String column, Number value)
-
lt
public <F extends Number> FilterNode lt(LambdaSupplier<F> func)
-
lt
public <T,F extends Number> FilterNode lt(LambdaFunction<T,F> func, F value)
-
ge
public FilterNode ge(String column, Number value)
-
ge
public <F extends Number> FilterNode ge(LambdaSupplier<F> func)
-
ge
public <T,F extends Number> FilterNode ge(LambdaFunction<T,F> func, F value)
-
le
public FilterNode le(String column, Number value)
-
le
public <F extends Number> FilterNode le(LambdaSupplier<F> func)
-
le
public <T,F extends Number> FilterNode le(LambdaFunction<T,F> func, F value)
-
like
public FilterNode like(String column, String value)
-
like
public FilterNode like(LambdaSupplier<String> func)
-
like
public <T> FilterNode like(LambdaFunction<T,String> func, String value)
-
notLike
public FilterNode notLike(String column, String value)
-
notLike
public FilterNode notLike(LambdaSupplier<String> func)
-
notLike
public <T> FilterNode notLike(LambdaFunction<T,String> func, String value)
-
igLike
public FilterNode igLike(String column, String value)
-
igLike
public FilterNode igLike(LambdaSupplier<String> func)
-
igLike
public <T> FilterNode igLike(LambdaFunction<T,String> func, String value)
-
igNotLike
public FilterNode igNotLike(String column, String value)
-
igNotLike
public FilterNode igNotLike(LambdaSupplier<String> func)
-
igNotLike
public <T> FilterNode igNotLike(LambdaFunction<T,String> func, String value)
-
starts
public FilterNode starts(String column, String value)
-
starts
public FilterNode starts(LambdaSupplier<String> func)
-
starts
public <T> FilterNode starts(LambdaFunction<T,String> func, String value)
-
ends
public FilterNode ends(String column, String value)
-
ends
public FilterNode ends(LambdaSupplier<String> func)
-
ends
public <T> FilterNode ends(LambdaFunction<T,String> func, String value)
-
notStarts
public FilterNode notStarts(String column, String value)
-
notStarts
public FilterNode notStarts(LambdaSupplier<String> func)
-
notStarts
public <T> FilterNode notStarts(LambdaFunction<T,String> func, String value)
-
notEnds
public FilterNode notEnds(String column, String value)
-
notEnds
public FilterNode notEnds(LambdaSupplier<String> func)
-
notEnds
public <T> FilterNode notEnds(LambdaFunction<T,String> func, String value)
-
lenEq
public FilterNode lenEq(String column, Number value)
-
lenEq
public <F extends Number> FilterNode lenEq(LambdaSupplier<F> func)
-
lenEq
public <T,F extends Number> FilterNode lenEq(LambdaFunction<T,F> func, F value)
-
lenGt
public FilterNode lenGt(String column, Number value)
-
lenGt
public <F extends Number> FilterNode lenGt(LambdaSupplier<F> func)
-
lenGt
public <T,F extends Number> FilterNode lenGt(LambdaFunction<T,F> func, F value)
-
lenLt
public FilterNode lenLt(String column, Number value)
-
lenLt
public <F extends Number> FilterNode lenLt(LambdaSupplier<F> func)
-
lenLt
public <T,F extends Number> FilterNode lenLt(LambdaFunction<T,F> func, F value)
-
lenGe
public FilterNode lenGe(String column, Number value)
-
lenGe
public <F extends Number> FilterNode lenGe(LambdaSupplier<F> func)
-
lenGe
public <T,F extends Number> FilterNode lenGe(LambdaFunction<T,F> func, F value)
-
lenLe
public FilterNode lenLe(String column, Number value)
-
lenLe
public <F extends Number> FilterNode lenLe(LambdaSupplier<F> func)
-
lenLe
public <T,F extends Number> FilterNode lenLe(LambdaFunction<T,F> func, F value)
-
contain
public FilterNode contain(String column, Serializable value)
-
contain
public <F extends Serializable> FilterNode contain(LambdaSupplier<F> func)
-
contain
public <T,F extends Serializable> FilterNode contain(LambdaFunction<T,F> func, F value)
-
notContain
public FilterNode notContain(String column, Serializable value)
-
notContain
public <F extends Serializable> FilterNode notContain(LambdaSupplier<F> func)
-
notContain
public <T,F extends Serializable> FilterNode notContain(LambdaFunction<T,F> func, F value)
-
igContain
public FilterNode igContain(String column, Serializable value)
-
igContain
public <F extends Serializable> FilterNode igContain(LambdaSupplier<F> func)
-
igContain
public <T,F extends Serializable> FilterNode igContain(LambdaFunction<T,F> func, F value)
-
igNotContain
public FilterNode igNotContain(String column, Serializable value)
-
igNotContain
public <F extends Serializable> FilterNode igNotContain(LambdaSupplier<F> func)
-
igNotContain
public <T,F extends Serializable> FilterNode igNotContain(LambdaFunction<T,F> func, F value)
-
between
public FilterNode between(String column, Range value)
-
between
public <F extends Range> FilterNode between(LambdaSupplier<F> func)
-
between
public <T,F extends Range> FilterNode between(LambdaFunction<T,F> func, F value)
-
notBetween
public FilterNode notBetween(String column, Range value)
-
notBetween
public <F extends Range> FilterNode notBetween(LambdaSupplier<F> func)
-
notBetween
public <T,F extends Range> FilterNode notBetween(LambdaFunction<T,F> func, F value)
-
in
public FilterNode in(String column, Serializable value)
-
in
public FilterNode in(String column, Stream stream)
-
in
public FilterNode in(String column, Collection collection)
-
in
public FilterNode in(LambdaSupplier func)
-
in
public <T,F> FilterNode in(LambdaFunction<T,F> func, F value)
-
notIn
public FilterNode notIn(String column, Serializable value)
-
notIn
public FilterNode notIn(String column, Stream stream)
-
notIn
public FilterNode notIn(String column, Collection collection)
-
notIn
public FilterNode notIn(LambdaSupplier func)
-
notIn
public <T,F> FilterNode notIn(LambdaFunction<T,F> func, F value)
-
isNull
public FilterNode isNull(String column)
-
isNull
public <F extends Serializable> FilterNode isNull(LambdaSupplier<F> func)
-
isNull
public <T,F extends Serializable> FilterNode isNull(LambdaFunction<T,F> func)
-
notNull
public FilterNode notNull(String column)
-
notNull
public <F extends Serializable> FilterNode notNull(LambdaSupplier<F> func)
-
notNull
public <T,F extends Serializable> FilterNode notNull(LambdaFunction<T,F> func)
-
isEmpty
public FilterNode isEmpty(String column)
-
isEmpty
public <F extends Serializable> FilterNode isEmpty(LambdaSupplier<F> func)
-
isEmpty
public <T,F extends Serializable> FilterNode isEmpty(LambdaFunction<T,F> func)
-
notEmpty
public FilterNode notEmpty(String column)
-
notEmpty
public <F extends Serializable> FilterNode notEmpty(LambdaSupplier<F> func)
-
notEmpty
public <T,F extends Serializable> FilterNode notEmpty(LambdaFunction<T,F> func)
-
opand
public FilterNode opand(String column, Number value)
-
opand
public <F extends Number> FilterNode opand(LambdaSupplier<F> func)
-
opand
public <T,F extends Number> FilterNode opand(LambdaFunction<T,F> func, F value)
-
opor
public FilterNode opor(String column, Number value)
-
opor
public <F extends Number> FilterNode opor(LambdaSupplier<F> func)
-
opor
public <T,F extends Number> FilterNode opor(LambdaFunction<T,F> func, F value)
-
notOpand
public FilterNode notOpand(String column, Number value)
-
notOpand
public <F extends Number> FilterNode notOpand(LambdaSupplier<F> func)
-
notOpand
public <T,F extends Number> FilterNode notOpand(LambdaFunction<T,F> func, F value)
-
fvmode
public FilterNode fvmode(String column, FilterExpValue value)
-
fvmode
public <F extends FilterExpValue> FilterNode fvmode(LambdaSupplier<F> func)
-
fvmode
public <T,F extends FilterExpValue> FilterNode fvmode(LambdaFunction<T,F> func, F value)
-
fvdiv
public FilterNode fvdiv(String column, FilterExpValue value)
-
fvdiv
public <F extends FilterExpValue> FilterNode fvdiv(LambdaSupplier<F> func)
-
fvdiv
public <T,F extends FilterExpValue> FilterNode fvdiv(LambdaFunction<T,F> func, F value)
-
createSQLJoin
protected <T> CharSequence createSQLJoin(Function<Class,EntityInfo> func, boolean update, Map<Class,String> joinTabalis, Set<String> haset, EntityInfo<T> info)
该方法需要重载- 类型参数:
T
- Entity类的泛型- 参数:
func
- EntityInfo的加载器update
- 是否用于更新的JOINjoinTabalis
- 关联表集合haset
- 已拼接过的字段名info
- Entity类的EntityInfo- 返回:
- SQL的join语句 不存在返回null
-
isjoin
protected boolean isjoin()
该方法需要重载- 返回:
- 是否存在关联表
-
isCacheUseable
protected boolean isCacheUseable(Function<Class,EntityInfo> entityApplyer)
该方法需要重载- 参数:
entityApplyer
- EntityInfo的加载器- 返回:
- 是否可以使用缓存
-
createSQLExpress
protected <T> CharSequence createSQLExpress(AbstractDataSqlSource source, EntityInfo<T> info, Map<Class,String> joinTabalis)
该方法需要重载- 类型参数:
T
- Entity类的泛型- 参数:
source
- AbstractDataSqlSourcejoinTabalis
- 关联表的集合info
- EntityInfo- 返回:
- JOIN的SQL语句
-
createElementSQLExpress
protected final <T> CharSequence createElementSQLExpress(AbstractDataSqlSource source, EntityInfo<T> info, String talis)
-
createPredicate
protected <T,E> Predicate<T> createPredicate(EntityCache<T> cache)
-
createElementPredicate
protected final <T> Predicate<T> createElementPredicate(EntityCache<T> cache, boolean join)
-
createElementPredicate
protected final <T> Predicate<T> createElementPredicate(EntityCache<T> cache, boolean join, Attribute<T,Serializable> attr)
-
createElementPredicate
protected final <T> Predicate<T> createElementPredicate(EntityCache<T> cache, boolean join, Attribute<T,Serializable> attr, Object val0)
-
toString
protected StringBuilder toString(String prefix)
-
toElementString
protected final StringBuilder toElementString(String prefix)
-
toElementString
protected final StringBuilder toElementString(String prefix, Object ev)
-
getValue
public final Serializable getValue()
-
setValue
public final void setValue(Serializable value)
-
isReadOnly
public boolean isReadOnly()
-
setReadOnly
public void setReadOnly(boolean readOnly)
-
isOr
public final boolean isOr()
-
setOr
public final void setOr(boolean or)
-
getColumn
public final String getColumn()
-
setColumn
public final void setColumn(String column)
-
getExpress
public final FilterExpress getExpress()
-
setExpress
public final void setExpress(FilterExpress express)
-
getNodes
public final FilterNode[] getNodes()
-
setNodes
public final void setNodes(FilterNode[] nodes)
-
-