Package com.landawn.abacus.condition
Class ConditionFactory
java.lang.Object
com.landawn.abacus.condition.ConditionFactory
- Direct Known Subclasses:
ConditionFactory.CF
A factory for creating Condition objects.
- Since:
- 0.8
- Author:
- Haiyang Li
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
static final class
The Class CF. -
Field Summary
Modifier and TypeFieldDescriptionstatic final SortDirection
static final SortDirection
static final Expression
Expression with question mark literal: "?". -
Method Summary
Modifier and TypeMethodDescriptionstatic All
static Expression
Deprecated.static Expression
static And
static And
and
(Collection<? extends Condition> conditions) static Any
static Between
static Between
static Binary
static Between
Deprecated.static Between
Deprecated.please usebetween(String, Object, Object)
static Cell
static Like
static Criteria
criteria()
static CrossJoin
static CrossJoin
static CrossJoin
crossJoin
(Collection<String> joinEntities, Condition condition) static Like
static Equal
It's for parameterized SQL with question mark or named parameters.static Equal
static And
static And
eqAnd
(Object entity, Collection<String> selectPropNames) static And
static And
eqAnd
(String propName1, Object propValue1, String propName2, Object propValue2, String propName3, Object propValue3) static And
static Or
eqAndOr
(Collection<?> entities) Eq and or.static Or
eqAndOr
(Collection<?> entities, Collection<String> selectPropNames) Eq and or.static Or
Eq and or.static Or
static Or
eqOr
(Object entity, Collection<String> selectPropNames) static Or
static Or
static Or
eqOr
(String propName1, Object propValue1, String propName2, Object propValue2, String propName3, Object propValue3) static Or
eqOr
(String propName, Collection<?> propValues) static Or
static Equal
It's for parameterized SQL with question mark or named parameters.static Equal
static Except
static Exists
static Expression
static FullJoin
static FullJoin
static FullJoin
fullJoin
(Collection<String> joinEntities, Condition condition) static GreaterEqual
It's for parameterized SQL with question mark or named parameters.static GreaterEqual
static And
static And
static And
static And
static GreaterEqual
greaterEqual
(String propName) It's for parameterized SQL with question mark or named parameters.static GreaterEqual
greaterEqual
(String propName, Object propValue) static GreaterThan
greaterThan
(String propName) It's for parameterized SQL with question mark or named parameters.static GreaterThan
greaterThan
(String propName, Object propValue) static GroupBy
static GroupBy
static GroupBy
groupBy
(String propName, SortDirection direction) static GroupBy
groupBy
(String propNameA, SortDirection directionA, String propNameB, SortDirection directionB) static GroupBy
groupBy
(String propNameA, SortDirection directionA, String propNameB, SortDirection directionB, String propNameC, SortDirection directionC) static GroupBy
groupBy
(Collection<String> propNames) static GroupBy
groupBy
(Collection<String> propNames, SortDirection direction) static GroupBy
groupBy
(Map<String, SortDirection> orders) static GreaterThan
It's for parameterized SQL with question mark or named parameters.static GreaterThan
static And
static And
static And
static And
static Having
static Having
static And
id2Cond
(com.landawn.abacus.util.EntityId entityId) static Or
id2Cond
(Collection<? extends com.landawn.abacus.util.EntityId> entityIds) static In
static In
static In
static InSubQuery
static In
static In
in
(String propName, Collection<?> values) static InSubQuery
in
(Collection<String> propNames, SubQuery subQuery) static InnerJoin
static InnerJoin
static InnerJoin
innerJoin
(Collection<String> joinEntities, Condition condition) static Intersect
static Is
Checks if is.static Or
Checks if is null or empty.static IsInfinite
isInfinite
(String propName) Checks if is infinite.static IsNaN
Checks if is na N.static IsNot
Checks if is not.static IsNotInfinite
isNotInfinite
(String propName) Checks if is not infinite.static IsNotNaN
Checks if is not na N.static IsNotNull
Checks if is not null.static IsNull
Checks if is null.static Or
isNullOrZero
(String propName) Checks if is null or zero.static Join
static Join
static Join
join
(Collection<String> joinEntities, Condition condition) static Junction
static Junction
junction
(Operator operator, Collection<? extends Condition> conditions) static LessEqual
It's for parameterized SQL with question mark or named parameters.static LessEqual
static LeftJoin
static LeftJoin
static LeftJoin
leftJoin
(Collection<String> joinEntities, Condition condition) static LessEqual
It's for parameterized SQL with question mark or named parameters.static LessEqual
static LessThan
It's for parameterized SQL with question mark or named parameters.static LessThan
static Like
static Like
static Limit
limit
(int count) static Limit
limit
(int offset, int count) static Limit
static LessThan
It's for parameterized SQL with question mark or named parameters.static LessThan
static Minus
static NamedProperty
namedProperty
(String propName) static NaturalJoin
naturalJoin
(String joinEntity) static NaturalJoin
naturalJoin
(String joinEntity, Condition condition) static NaturalJoin
naturalJoin
(Collection<String> joinEntities, Condition condition) static NotEqual
It's for parameterized SQL with question mark or named parameters.static NotEqual
static NotBetween
notBetween
(String propName) static NotBetween
notBetween
(String propName, Object minValue, Object maxValue) static NotLike
notContains
(String propName, Object propValue) static NotLike
notEndsWith
(String propName, Object propValue) static NotEqual
It's for parameterized SQL with question mark or named parameters.static NotEqual
static Not
static NotIn
static NotIn
static NotIn
static NotInSubQuery
static NotIn
static NotIn
notIn
(String propName, Collection<?> values) static NotInSubQuery
notIn
(Collection<String> propNames, SubQuery subQuery) static NotLike
static NotLike
static NotLike
notStartsWith
(String propName, Object propValue) static On
static On
static On
static On
static Or
static Or
or
(Collection<? extends Condition> conditions) static OrderBy
static OrderBy
static OrderBy
orderBy
(String propName, SortDirection direction) static OrderBy
orderBy
(String propNameA, SortDirection directionA, String propNameB, SortDirection directionB) static OrderBy
orderBy
(String propNameA, SortDirection directionA, String propNameB, SortDirection directionB, String propNameC, SortDirection directionC) static OrderBy
orderBy
(Collection<String> propNames) static OrderBy
orderBy
(Collection<String> propNames, SortDirection direction) static OrderBy
orderBy
(Map<String, SortDirection> orders) static OrderBy
orderByAsc
(String... propNames) static OrderBy
orderByAsc
(Collection<String> propNames) static OrderBy
orderByDesc
(String... propNames) static OrderBy
orderByDesc
(Collection<String> propNames) static RightJoin
static RightJoin
static RightJoin
rightJoin
(Collection<String> joinEntities, Condition condition) static Some
static Like
startsWith
(String propName, Object propValue) static SubQuery
subQuery
(Class<?> entityClass, Collection<String> propNames, Condition condition) static SubQuery
static SubQuery
Deprecated.replaced bysubQuery(String)
static SubQuery
subQuery
(String entityName, Collection<String> propNames, Condition condition) static SubQuery
subQuery
(String entityName, Collection<String> propNames, String condition) static Union
static UnionAll
static Using
Deprecated.static Using
using
(Collection<String> columnNames) Deprecated.static Where
static Where
static XOR
-
Field Details
-
QME
Expression with question mark literal: "?". -
ASC
-
DESC
-
-
Method Details
-
alwaysTrue
- Returns:
-
alwaysFalse
Deprecated.- Returns:
-
namedProperty
- Parameters:
propName
-- Returns:
-
expr
- Parameters:
literal
-- Returns:
-
binary
- Parameters:
propName
-operator
-propValue
-- Returns:
-
equal
- Parameters:
propName
-propValue
-- Returns:
-
equal
It's for parameterized SQL with question mark or named parameters.- Parameters:
propName
-- Returns:
- See Also:
-
eq
- Parameters:
propName
-propValue
-- Returns:
-
eq
It's for parameterized SQL with question mark or named parameters.- Parameters:
propName
-- Returns:
- See Also:
-
eqOr
- Parameters:
propName
-propValues
-- Returns:
-
eqOr
- Parameters:
propName
-propValues
-- Returns:
-
eqOr
- Parameters:
props
-- Returns:
-
eqOr
- Parameters:
entity
-- Returns:
-
eqOr
- Parameters:
entity
-selectPropNames
-- Returns:
-
eqOr
- Parameters:
propName1
-propValue1
-propName2
-propValue2
-- Returns:
-
eqOr
public static Or eqOr(String propName1, Object propValue1, String propName2, Object propValue2, String propName3, Object propValue3) - Parameters:
propName1
-propValue1
-propName2
-propValue2
-propName3
-propValue3
-- Returns:
-
eqAnd
- Parameters:
props
-- Returns:
-
eqAnd
- Parameters:
entity
-- Returns:
-
eqAnd
- Parameters:
entity
-selectPropNames
-- Returns:
-
eqAnd
- Parameters:
propName1
-propValue1
-propName2
-propValue2
-- Returns:
-
eqAnd
public static And eqAnd(String propName1, Object propValue1, String propName2, Object propValue2, String propName3, Object propValue3) - Parameters:
propName1
-propValue1
-propName2
-propValue2
-propName3
-propValue3
-- Returns:
-
eqAndOr
Eq and or.- Parameters:
propsList
-- Returns:
-
eqAndOr
Eq and or.- Parameters:
entities
-- Returns:
-
eqAndOr
Eq and or.- Parameters:
entities
-selectPropNames
-- Returns:
-
gtAndLt
- Parameters:
propName
-minValue
-maxValue
-- Returns:
-
gtAndLt
- Parameters:
propName
-- Returns:
-
geAndLt
- Parameters:
propName
-minValue
-maxValue
-- Returns:
-
geAndLt
- Parameters:
propName
-- Returns:
-
geAndLe
- Parameters:
propName
-minValue
-maxValue
-- Returns:
-
geAndLe
- Parameters:
propName
-- Returns:
-
gtAndLe
- Parameters:
propName
-minValue
-maxValue
-- Returns:
-
gtAndLe
- Parameters:
propName
-- Returns:
-
id2Cond
- Parameters:
entityId
-- Returns:
-
id2Cond
- Parameters:
entityIds
-- Returns:
-
notEqual
- Parameters:
propName
-propValue
-- Returns:
-
notEqual
It's for parameterized SQL with question mark or named parameters.- Parameters:
propName
-- Returns:
- See Also:
-
ne
- Parameters:
propName
-propValue
-- Returns:
-
ne
It's for parameterized SQL with question mark or named parameters.- Parameters:
propName
-- Returns:
- See Also:
-
greaterThan
- Parameters:
propName
-propValue
-- Returns:
-
greaterThan
It's for parameterized SQL with question mark or named parameters.- Parameters:
propName
-- Returns:
- See Also:
-
gt
- Parameters:
propName
-propValue
-- Returns:
-
gt
It's for parameterized SQL with question mark or named parameters.- Parameters:
propName
-- Returns:
- See Also:
-
greaterEqual
- Parameters:
propName
-propValue
-- Returns:
-
greaterEqual
It's for parameterized SQL with question mark or named parameters.- Parameters:
propName
-- Returns:
- See Also:
-
ge
- Parameters:
propName
-propValue
-- Returns:
-
ge
It's for parameterized SQL with question mark or named parameters.- Parameters:
propName
-- Returns:
- See Also:
-
lessThan
- Parameters:
propName
-propValue
-- Returns:
-
lessThan
It's for parameterized SQL with question mark or named parameters.- Parameters:
propName
-- Returns:
- See Also:
-
lt
- Parameters:
propName
-propValue
-- Returns:
-
lt
It's for parameterized SQL with question mark or named parameters.- Parameters:
propName
-- Returns:
- See Also:
-
lessEqual
- Parameters:
propName
-propValue
-- Returns:
-
lessEqual
It's for parameterized SQL with question mark or named parameters.- Parameters:
propName
-- Returns:
- See Also:
-
le
- Parameters:
propName
-propValue
-- Returns:
-
le
It's for parameterized SQL with question mark or named parameters.- Parameters:
propName
-- Returns:
- See Also:
-
between
- Parameters:
propName
-minValue
-maxValue
-- Returns:
-
between
- Parameters:
propName
-- Returns:
-
bt
Deprecated.please usebetween(String, Object, Object)
- Parameters:
propName
-minValue
-maxValue
-- Returns:
-
bt
Deprecated.please usebetween(String)
- Parameters:
propName
-- Returns:
-
notBetween
- Parameters:
propName
-minValue
-maxValue
-- Returns:
-
notBetween
- Parameters:
propName
-- Returns:
-
like
- Parameters:
propName
-propValue
-- Returns:
-
like
- Parameters:
propName
-- Returns:
-
notLike
- Parameters:
propName
-propValue
-- Returns:
-
notLike
- Parameters:
propName
-- Returns:
-
contains
- Parameters:
propName
-propValue
-- Returns:
-
notContains
- Parameters:
propName
-propValue
-- Returns:
-
startsWith
- Parameters:
propName
-propValue
-- Returns:
-
notStartsWith
- Parameters:
propName
-propValue
-- Returns:
-
endsWith
- Parameters:
propName
-propValue
-- Returns:
-
notEndsWith
- Parameters:
propName
-propValue
-- Returns:
-
isNull
Checks if is null.- Parameters:
propName
-- Returns:
-
isEmpty
Checks if is null or empty.- Parameters:
propName
-- Returns:
-
isNullOrZero
Checks if is null or zero.- Parameters:
propName
-- Returns:
-
isNotNull
Checks if is not null.- Parameters:
propName
-- Returns:
-
isNaN
Checks if is na N.- Parameters:
propName
-- Returns:
-
isNotNaN
Checks if is not na N.- Parameters:
propName
-- Returns:
-
isInfinite
Checks if is infinite.- Parameters:
propName
-- Returns:
-
isNotInfinite
Checks if is not infinite.- Parameters:
propName
-- Returns:
-
is
Checks if is.- Parameters:
propName
-propValue
-- Returns:
-
isNot
Checks if is not.- Parameters:
propName
-propValue
-- Returns:
-
xor
- Parameters:
propName
-propValue
-- Returns:
-
or
- Parameters:
conditions
-- Returns:
-
or
- Parameters:
conditions
-- Returns:
-
and
- Parameters:
conditions
-- Returns:
-
and
- Parameters:
conditions
-- Returns:
-
junction
- Parameters:
operator
-conditions
-- Returns:
-
junction
@Beta public static Junction junction(Operator operator, Collection<? extends Condition> conditions) - Parameters:
operator
-conditions
-- Returns:
-
where
- Parameters:
condition
-- Returns:
-
where
- Parameters:
condition
-- Returns:
-
groupBy
- Parameters:
propNames
-- Returns:
-
groupBy
- Parameters:
propNames
-- Returns:
-
groupBy
- Parameters:
propNames
-direction
-- Returns:
-
groupBy
- Parameters:
propName
-direction
-- Returns:
-
groupBy
public static GroupBy groupBy(String propNameA, SortDirection directionA, String propNameB, SortDirection directionB) - Parameters:
propNameA
-directionA
-propNameB
-directionB
-- Returns:
-
groupBy
public static GroupBy groupBy(String propNameA, SortDirection directionA, String propNameB, SortDirection directionB, String propNameC, SortDirection directionC) - Parameters:
propNameA
-directionA
-propNameB
-directionB
-propNameC
-directionC
-- Returns:
-
groupBy
- Parameters:
orders
- should be aLinkedHashMap
- Returns:
-
groupBy
- Parameters:
condition
-- Returns:
-
having
- Parameters:
condition
-- Returns:
-
having
- Parameters:
condition
-- Returns:
-
orderBy
- Parameters:
propNames
-- Returns:
-
orderByAsc
- Parameters:
propNames
-- Returns:
-
orderByAsc
- Parameters:
propNames
-- Returns:
-
orderByDesc
- Parameters:
propNames
-- Returns:
-
orderByDesc
- Parameters:
propNames
-- Returns:
-
orderBy
- Parameters:
propNames
-- Returns:
-
orderBy
- Parameters:
propNames
-direction
-- Returns:
-
orderBy
- Parameters:
propName
-direction
-- Returns:
-
orderBy
public static OrderBy orderBy(String propNameA, SortDirection directionA, String propNameB, SortDirection directionB) - Parameters:
propNameA
-directionA
-propNameB
-directionB
-- Returns:
-
orderBy
public static OrderBy orderBy(String propNameA, SortDirection directionA, String propNameB, SortDirection directionB, String propNameC, SortDirection directionC) - Parameters:
propNameA
-directionA
-propNameB
-directionB
-propNameC
-directionC
-- Returns:
-
orderBy
- Parameters:
orders
- should be aLinkedHashMap
- Returns:
-
orderBy
- Parameters:
condition
-- Returns:
-
on
- Parameters:
condition
-- Returns:
-
on
- Parameters:
condition
-- Returns:
-
on
- Parameters:
propName
-anoPropName
-- Returns:
-
on
- Parameters:
propNamePair
-- Returns:
-
using
Deprecated.It's recommended to useOn
, instead ofUsing
.- Parameters:
columnNames
-- Returns:
-
using
Deprecated.It's recommended to useOn
, instead ofUsing
.- Parameters:
columnNames
-- Returns:
-
join
- Parameters:
joinEntity
-- Returns:
-
join
- Parameters:
joinEntity
-condition
-- Returns:
-
join
- Parameters:
joinEntities
-condition
-- Returns:
-
leftJoin
- Parameters:
joinEntity
-- Returns:
-
leftJoin
- Parameters:
joinEntity
-condition
-- Returns:
-
leftJoin
- Parameters:
joinEntities
-condition
-- Returns:
-
rightJoin
- Parameters:
joinEntity
-- Returns:
-
rightJoin
- Parameters:
joinEntity
-condition
-- Returns:
-
rightJoin
- Parameters:
joinEntities
-condition
-- Returns:
-
crossJoin
- Parameters:
joinEntity
-- Returns:
-
crossJoin
- Parameters:
joinEntity
-condition
-- Returns:
-
crossJoin
- Parameters:
joinEntities
-condition
-- Returns:
-
fullJoin
- Parameters:
joinEntity
-- Returns:
-
fullJoin
- Parameters:
joinEntity
-condition
-- Returns:
-
fullJoin
- Parameters:
joinEntities
-condition
-- Returns:
-
innerJoin
- Parameters:
joinEntity
-- Returns:
-
innerJoin
- Parameters:
joinEntity
-condition
-- Returns:
-
innerJoin
- Parameters:
joinEntities
-condition
-- Returns:
-
naturalJoin
- Parameters:
joinEntity
-- Returns:
-
naturalJoin
- Parameters:
joinEntity
-condition
-- Returns:
-
naturalJoin
- Parameters:
joinEntities
-condition
-- Returns:
-
in
- Parameters:
propName
-values
-- Returns:
-
in
- Parameters:
propName
-values
-- Returns:
-
in
- Parameters:
propName
-values
-- Returns:
-
in
- Parameters:
propName
-values
-- Returns:
-
in
- Parameters:
propName
-values
-- Returns:
-
in
- Parameters:
propName
-subQuery
-- Returns:
-
in
- Parameters:
propNames
-subQuery
-- Returns:
-
notIn
- Parameters:
propName
-values
-- Returns:
-
notIn
- Parameters:
propName
-values
-- Returns:
-
notIn
- Parameters:
propName
-values
-- Returns:
-
notIn
- Parameters:
propName
-values
-- Returns:
-
notIn
- Parameters:
propName
-values
-- Returns:
-
notIn
- Parameters:
propName
-subQuery
-- Returns:
-
notIn
- Parameters:
propNames
-subQuery
-- Returns:
-
all
- Parameters:
condition
-- Returns:
-
any
- Parameters:
condition
-- Returns:
-
some
- Parameters:
condition
-- Returns:
-
exists
- Parameters:
condition
-- Returns:
-
notExists
- Parameters:
condition
-- Returns:
-
union
- Parameters:
condition
-- Returns:
-
unionAll
- Parameters:
condition
-- Returns:
-
except
- Parameters:
condition
-- Returns:
-
intersect
- Parameters:
condition
-- Returns:
-
minus
- Parameters:
condition
-- Returns:
-
cell
- Parameters:
operator
-condition
-- Returns:
-
subQuery
public static SubQuery subQuery(Class<?> entityClass, Collection<String> propNames, Condition condition) - Parameters:
entityClass
-propNames
-condition
-- Returns:
-
subQuery
public static SubQuery subQuery(String entityName, Collection<String> propNames, Condition condition) - Parameters:
entityName
-propNames
-condition
-- Returns:
-
subQuery
- Parameters:
entityName
-propNames
-condition
-- Returns:
-
subQuery
Deprecated.replaced bysubQuery(String)
- Parameters:
entityName
-sql
-- Returns:
- See Also:
-
subQuery
- Parameters:
sql
-- Returns:
-
limit
- Parameters:
count
-- Returns:
-
limit
- Parameters:
offset
-count
-- Returns:
-
limit
- Parameters:
expr
-- Returns:
-
criteria
- Returns:
-
between(String)