public class BasicValueImpl<V,W> extends BaseValueAccessor<V,W> implements BasicValue<V>
Constructor and Description |
---|
BasicValueImpl(String name,
ValueConverter<V,W> valueConverter,
BasicOperand<V> basicOperand,
boolean supportsOrderBy)
Constructs a new instance.
|
Modifier and Type | Method and Description |
---|---|
Predicate |
eq(BasicOperand<V> operand,
Predicate innerSelectPredicate)
Builds a predicate which tests that the value 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 that the value is equal to a single match
of the given inner select predicate.
|
Predicate |
eq(V expectedValue)
Builds a predicate for a
value == expectedValue comparison. |
Predicate |
exists()
Builds a predicate that checks if the value exists.
|
QueryParameter |
getQueryParameter()
Returns the query parameter defining the value to be queried.
|
Predicate |
in(BasicOperand<V> operand,
Predicate innerSelectPredicate)
Builds a predicate which tests that the value of the given operand is contained in any of the given inner select predicate matches.
|
Predicate |
in(Collection<? extends V> possibleValues)
Builds a predicate which tests that the value is one of the possible values.
|
Predicate |
in(Predicate innerSelectPredicate)
Builds a predicate which tests that the value is contained in any of the given inner select predicate matches.
|
Predicate |
in(V possibleValue)
Builds a predicate which tests that the value is one of the possible values.
|
Predicate |
in(V possibleValue1,
V possibleValue2)
Builds a predicate which tests that the value is one of the possible values.
|
Predicate |
in(V possibleValue1,
V possibleValue2,
V possibleValue3)
Builds a predicate which tests that the value is one of the possible values.
|
Predicate |
in(V possibleValue1,
V possibleValue2,
V possibleValue3,
V... morePossibleValues)
Builds a predicate which tests that the value is one of the possible values.
|
Predicate |
isNotNull()
Builds a predicate for a
value ! |
Predicate |
isNull()
Builds a predicate for a
value == null comparison. |
Predicate |
notEq(V expectedValue)
Builds a predicate for a
value ! |
Predicate |
notIn(Collection<? extends V> possibleValues)
Builds a predicate which tests that the value is not one of the possible values.
|
Predicate |
notIn(V possibleValue)
Builds a predicate which tests that the value is not one of the possible values.
|
Predicate |
notIn(V possibleValue1,
V possibleValue2)
Builds a predicate which tests that the value is not one of the possible values.
|
Predicate |
notIn(V possibleValue1,
V possibleValue2,
V possibleValue3)
Builds a predicate which tests that the value is not one of the possible values.
|
Predicate |
notIn(V possibleValue1,
V possibleValue2,
V possibleValue3,
V... morePossibleValues)
Builds a predicate which tests that the value is not one of the possible values.
|
Ordering |
orderAsc()
Builds an ordering criterion which sorts by the operand value in ascending order.
|
Ordering |
orderDesc()
Builds an ordering criterion which sorts by the operand value in descending order.
|
getName, getValueConverter
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getName, getValueConverter
public BasicValueImpl(String name, ValueConverter<V,W> valueConverter, BasicOperand<V> basicOperand, boolean supportsOrderBy)
Constructs a new instance.
name
- the value namevalueConverter
- a value converter to convert the 'external' typebasicOperand
- the operand implementationpublic QueryParameter getQueryParameter()
BasicOperand
Returns the query parameter defining the value to be queried.
getQueryParameter
in interface BasicOperand<V>
public Predicate exists()
BasicOperand
Builds a predicate that checks if the value exists.
For fields, this will always match. For variables it will match if a variable with the given name is present.
exists
in interface BasicOperand<V>
public Predicate eq(V expectedValue)
BasicOperand
Builds a predicate for a value == expectedValue
comparison.
eq
in interface BasicOperand<V>
expectedValue
- the expected value of the comparisonpublic Predicate notEq(V expectedValue)
BasicOperand
Builds a predicate for a value != expectedValue
comparison.
notEq
in interface BasicOperand<V>
expectedValue
- the expected value of the comparisonpublic Predicate eq(Predicate innerSelectPredicate)
BasicOperand
Builds a predicate which tests that the value is equal to a single match of the given inner select predicate.
eq
in interface BasicOperand<V>
innerSelectPredicate
- the inner select predicatepublic Predicate eq(BasicOperand<V> operand, Predicate innerSelectPredicate)
BasicOperand
Builds a predicate which tests that the value of the given operand is equal to a single match of the given inner select predicate.
eq
in interface BasicOperand<V>
operand
- the operandinnerSelectPredicate
- the inner select predicatepublic Predicate isNull()
BasicOperand
Builds a predicate for a value == null
comparison.
isNull
in interface BasicOperand<V>
public Predicate isNotNull()
BasicOperand
Builds a predicate for a value != null
comparison.
isNotNull
in interface BasicOperand<V>
public Predicate in(V possibleValue)
BasicOperand
Builds a predicate which tests that the value is one of the possible values.
in
in interface BasicOperand<V>
possibleValue
- the possible valuepublic Predicate notIn(V possibleValue)
BasicOperand
Builds a predicate which tests that the value is not one of the possible values.
notIn
in interface BasicOperand<V>
possibleValue
- the possible valuepublic Predicate in(V possibleValue1, V possibleValue2)
BasicOperand
Builds a predicate which tests that the value is one of the possible values.
in
in interface BasicOperand<V>
possibleValue1
- the first possible valuepossibleValue2
- the second possible valuepublic Predicate notIn(V possibleValue1, V possibleValue2)
BasicOperand
Builds a predicate which tests that the value is not one of the possible values.
notIn
in interface BasicOperand<V>
possibleValue1
- the first possible valuepossibleValue2
- the second possible valuepublic Predicate in(V possibleValue1, V possibleValue2, V possibleValue3)
BasicOperand
Builds a predicate which tests that the value is one of the possible values.
in
in interface BasicOperand<V>
possibleValue1
- the first possible valuepossibleValue2
- the second possible valuepossibleValue3
- the third possible valuepublic Predicate notIn(V possibleValue1, V possibleValue2, V possibleValue3)
BasicOperand
Builds a predicate which tests that the value is not one of the possible values.
notIn
in interface BasicOperand<V>
possibleValue1
- the first possible valuepossibleValue2
- the second possible valuepossibleValue3
- the third possible value@SafeVarargs public final Predicate in(V possibleValue1, V possibleValue2, V possibleValue3, V... morePossibleValues)
BasicOperand
Builds a predicate which tests that the value is one of the possible values.
in
in interface BasicOperand<V>
possibleValue1
- the first possible valuepossibleValue2
- the second possible valuepossibleValue3
- the third possible valuemorePossibleValues
- more possible values@SafeVarargs public final Predicate notIn(V possibleValue1, V possibleValue2, V possibleValue3, V... morePossibleValues)
BasicOperand
Builds a predicate which tests that the value is not one of the possible values.
notIn
in interface BasicOperand<V>
possibleValue1
- the first possible valuepossibleValue2
- the second possible valuepossibleValue3
- the third possible valuemorePossibleValues
- more possible valuespublic Predicate in(Collection<? extends V> possibleValues)
BasicOperand
Builds a predicate which tests that the value is one of the possible values.
in
in interface BasicOperand<V>
possibleValues
- a collection of possible valuespublic Predicate notIn(Collection<? extends V> possibleValues)
BasicOperand
Builds a predicate which tests that the value is not one of the possible values.
notIn
in interface BasicOperand<V>
possibleValues
- a collection of possible valuespublic Predicate in(Predicate innerSelectPredicate)
BasicOperand
Builds a predicate which tests that the value is contained in any of the given inner select predicate matches.
in
in interface BasicOperand<V>
innerSelectPredicate
- the inner select predicatepublic Predicate in(BasicOperand<V> operand, Predicate innerSelectPredicate)
BasicOperand
Builds a predicate which tests that the value of the given operand is contained in any of the given inner select predicate matches.
in
in interface BasicOperand<V>
operand
- the operandinnerSelectPredicate
- the inner select predicatepublic Ordering orderAsc()
BasicOperand
Builds an ordering criterion which sorts by the operand value in ascending order.
orderAsc
in interface BasicOperand<V>
public Ordering orderDesc()
BasicOperand
Builds an ordering criterion which sorts by the operand value in descending order.
orderDesc
in interface BasicOperand<V>
Copyright © 2010 - 2019 edorasware ag. All Rights Reserved.