T
- the type of this predicate operandpublic class BasicOperand<T> extends Object
QueryParameter
(i.e. left operand) and allows to build Predicate
s.Modifier and Type | Class and Description |
---|---|
static class |
BasicOperand.InnerSelectReferenceValue
Inner select reference value used by the
eq(Predicate) method to render the inner select statement with the given parameter as the column name and the given
predicate as the right operand. |
Modifier and Type | Field and Description |
---|---|
protected ConstructionInterceptor |
constructionInterceptor
The interceptor invoked upon construction of predicates or orderings.
|
protected QueryParameter |
queryParameter
The query parameter (i.e. left operand).
|
Constructor and Description |
---|
BasicOperand(QueryParameter queryParameter)
Creates a new operand instance.
|
BasicOperand(QueryParameter queryParameter,
ConstructionInterceptor constructionInterceptor)
Creates a new operand instance.
|
Modifier and Type | Method and Description |
---|---|
Predicate |
eq(BasicOperand<?> operand,
Predicate innerSelectPredicate)
Builds a predicate which tests the
queryParameter of the given operand is equal to a single match of the given inner select predicate. |
Predicate |
eq(Predicate innerSelectPredicate)
Builds a predicate which tests the
queryParameter of this operand is equal to a single match of the given inner select predicate. |
Predicate |
eq(T expectedValue)
Builds a predicate representing a
queryParameter = expectedValue comparison. |
Predicate |
in(BasicOperand<?> operand,
Predicate innerSelectPredicate)
Builds a predicate which tests the
queryParameter of the given operand to be contained in any of the given inner select predicate matches. |
Predicate |
in(Collection<? extends T> possibleValues)
Builds a predicate which tests that the
queryParameter of this operand contains any of the given possibleValues . |
Predicate |
in(Predicate innerSelectPredicate)
Builds a predicate which tests the
queryParameter of this operand to be contained in any of the given inner select predicate matches. |
Predicate |
in(T possibleValue)
Builds a predicate which tests that the
queryParameter of this operand contains possibleValue1 . |
Predicate |
in(T possibleValue1,
T possibleValue2)
Builds a predicate which tests that the
queryParameter of this operand contains either possibleValue1 or possibleValue2 . |
Predicate |
in(T possibleValue1,
T possibleValue2,
T possibleValue3)
Builds a predicate which tests that the
queryParameter of this operand contains either possibleValue1 , possibleValue2 , or
possibleValue3 . |
Predicate |
in(T possibleValue1,
T possibleValue2,
T possibleValue3,
T... morePossibleValues)
Builds a predicate which tests that the
queryParameter of this operand contains either possibleValue1 , possibleValue2 ,
possibleValue3 , or any of morePossibleValues . |
protected Predicate |
interceptPredicate(Predicate predicate) |
protected Object |
interceptValue(Object value) |
Predicate |
isNotNull()
Builds a predicate representing a
queryParameter IS NOT NULL comparison. |
Predicate |
isNull()
Builds a predicate representing a
queryParameter IS NULL comparison. |
Ordering |
orderAsc()
Builds an ordering criterion which sorts the encapsulated parameter in ascending order.
|
Ordering |
orderDesc()
Builds an ordering criterion which sorts the encapsulated parameter in descending order.
|
protected final QueryParameter queryParameter
protected final ConstructionInterceptor constructionInterceptor
public BasicOperand(QueryParameter queryParameter)
queryParameter
- the left operand for all predicates to be builtpublic BasicOperand(QueryParameter queryParameter, ConstructionInterceptor constructionInterceptor)
queryParameter
- the left operand for all predicates to be builtconstructionInterceptor
- the interceptor to be invoked upon construction of predicatespublic final Predicate eq(T expectedValue)
queryParameter = expectedValue
comparison.expectedValue
- the expected value of the comparisonpublic final Predicate eq(Predicate innerSelectPredicate)
queryParameter
of this operand is equal to a single match of the given inner select predicate.innerSelectPredicate
- the inner select predicatepublic final Predicate eq(BasicOperand<?> operand, Predicate innerSelectPredicate)
queryParameter
of the given operand is equal to a single match of the given inner select predicate.operand
- the operandinnerSelectPredicate
- the inner select predicatepublic final Predicate isNull()
queryParameter IS NULL
comparison.public final Predicate isNotNull()
queryParameter IS NOT NULL
comparison.public final Predicate in(T possibleValue)
queryParameter
of this operand contains possibleValue1
.possibleValue
- the expected valuepublic final Predicate in(T possibleValue1, T possibleValue2)
queryParameter
of this operand contains either possibleValue1
or possibleValue2
.possibleValue1
- the first possible valuepossibleValue2
- the second possible valuepublic final Predicate in(T possibleValue1, T possibleValue2, T possibleValue3)
queryParameter
of this operand contains either possibleValue1
, possibleValue2
, or
possibleValue3
.possibleValue1
- the first possible valuepossibleValue2
- the second possible valuepossibleValue3
- the third possible valuepublic final Predicate in(T possibleValue1, T possibleValue2, T possibleValue3, T... morePossibleValues)
queryParameter
of this operand contains either possibleValue1
, possibleValue2
,
possibleValue3
, or any of morePossibleValues
.possibleValue1
- the first possible valuepossibleValue2
- the second possible valuepossibleValue3
- the third possible valuemorePossibleValues
- more possible valuespublic final Predicate in(Collection<? extends T> possibleValues)
queryParameter
of this operand contains any of the given possibleValues
.possibleValues
- the expected values (tested with OR semantics)public final Predicate in(Predicate innerSelectPredicate)
queryParameter
of this operand to be contained in any of the given inner select predicate matches.innerSelectPredicate
- the inner select predicatepublic final Predicate in(BasicOperand<?> operand, Predicate innerSelectPredicate)
queryParameter
of the given operand to be contained in any of the given inner select predicate matches.operand
- the operandinnerSelectPredicate
- the inner select predicatepublic final Ordering orderAsc()
public final Ordering orderDesc()
Copyright © 2010 - 2018 edorasware ag. All Rights Reserved.