Package org.nuclos.api.businessobject
Class SearchExpression<T>
java.lang.Object
org.nuclos.api.businessobject.SearchExpression<T>
SearchExpression
represents a search expression for a Query
. It enabled the user
to join other SearchExpressions and specify the query parameter that are used to retrieve results
- Author:
- Matthias Reichart
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) List<SearchExpressionPair<T>>
(package private) QueryOperation
(package private) QueryOperation
(package private) SearchExpression<T>
(package private) T
-
Constructor Summary
ConstructorsConstructorDescriptionSearchExpression
(Attribute<T> pSource, Attribute<T> pTarget, QueryOperation pOperator) This Constructor is used when there are two attributes to compareSearchExpression
(Attribute<T> pSource, QueryOperation pOperator) This Constructor is used when a attributes is checkd on Null or notNullSearchExpression
(Attribute<T> pSource, T pValue, QueryOperation pOperator) This Constructor is used when a attributes is compared to a given value with a given operatorSearchExpression
(SearchExpression<T> pParentSearchExpression, QueryOperation pOperator) -
Method Summary
Modifier and TypeMethodDescriptionand
(SearchExpression pSecondSearchExpression) This Constructor is used to join the current SearchExpression with a second SearchExpression using ANDGet all SearchExpressions that are added to the given SearchExpressionreturns the Operator used for comparisonreturns the Sourcereturns the TargetgetValue()
returns the Valueboolean
Returns true if there are any SearchExpressions added to this SearchExpression instanceor
(SearchExpression pSecondSearchExpression) This Constructor is used to join the current SearchExpression with a second SearchExpression using OR
-
Field Details
-
source
-
target
-
value
T value -
operator
QueryOperation operator -
parentOperator
QueryOperation parentOperator -
parentSearchExpression
SearchExpression<T> parentSearchExpression -
childSearchExpression
List<SearchExpressionPair<T>> childSearchExpression
-
-
Constructor Details
-
SearchExpression
This Constructor is used when there are two attributes to compare- Parameters:
pSource
-pTarget
-pOperator
-
-
SearchExpression
This Constructor is used when a attributes is compared to a given value with a given operator- Parameters:
pSource
-pValue
-pOperator
-
-
SearchExpression
This Constructor is used when a attributes is checkd on Null or notNull- Parameters:
pSource
-pOperator
-
-
SearchExpression
-
-
Method Details
-
and
This Constructor is used to join the current SearchExpression with a second SearchExpression using AND -
or
This Constructor is used to join the current SearchExpression with a second SearchExpression using OR- Parameters:
pSecondSearchExpression
-
-
getSource
returns the Source- Returns:
-
getTarget
returns the Target- Returns:
-
getValue
returns the Value- Returns:
-
getExpressionOperator
returns the Operator used for comparison- Returns:
-
getParentOperator
-
getParentSearchExpression
-
getChildSearchExpression
Get all SearchExpressions that are added to the given SearchExpression- Returns:
- List of all SearchExpressions
-
hasChildSearchExpression
public boolean hasChildSearchExpression()Returns true if there are any SearchExpressions added to this SearchExpression instance- Returns:
- true/false
-