public class SearchExpression<T>
extends java.lang.Object
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
Modifier and Type | Field and Description |
---|---|
(package private) java.util.List<SearchExpressionPair<T>> |
childSearchExpression |
(package private) QueryOperation |
operator |
(package private) QueryOperation |
parentOperator |
(package private) SearchExpression<T> |
parentSearchExpression |
(package private) Attribute<T> |
source |
(package private) Attribute<T> |
target |
(package private) T |
value |
Constructor and Description |
---|
SearchExpression(Attribute<T> pSource,
Attribute<T> pTarget,
QueryOperation pOperator)
This Constructor is used when there are two attributes to compare
|
SearchExpression(Attribute<T> pSource,
QueryOperation pOperator)
This Constructor is used when a attributes is checkd on Null or notNull
|
SearchExpression(Attribute<T> pSource,
T pValue,
QueryOperation pOperator)
This Constructor is used when a attributes is compared to a given value with a given operator
|
SearchExpression(SearchExpression<T> pParentSearchExpression,
QueryOperation pOperator) |
Modifier and Type | Method and Description |
---|---|
SearchExpression |
and(SearchExpression pSecondSearchExpression)
This Constructor is used to join the current SearchExpression with a second SearchExpression using AND
|
java.util.List<SearchExpressionPair<T>> |
getChildSearchExpression()
Get all SearchExpressions that are added to the given SearchExpression
|
QueryOperation |
getExpressionOperator()
returns the Operator used for comparison
|
QueryOperation |
getParentOperator() |
SearchExpression<T> |
getParentSearchExpression() |
Attribute<T> |
getSource()
returns the Source
|
Attribute<T> |
getTarget()
returns the Target
|
T |
getValue()
returns the Value
|
boolean |
hasChildSearchExpression()
Returns true if there are any SearchExpressions added to this SearchExpression instance
|
SearchExpression |
or(SearchExpression pSecondSearchExpression)
This Constructor is used to join the current SearchExpression with a second SearchExpression using OR
|
T value
QueryOperation operator
QueryOperation parentOperator
SearchExpression<T> parentSearchExpression
java.util.List<SearchExpressionPair<T>> childSearchExpression
public SearchExpression(Attribute<T> pSource, Attribute<T> pTarget, QueryOperation pOperator)
pSource
- pTarget
- pOperator
- public SearchExpression(Attribute<T> pSource, T pValue, QueryOperation pOperator)
pSource
- pValue
- pOperator
- public SearchExpression(Attribute<T> pSource, QueryOperation pOperator)
pSource
- pOperator
- public SearchExpression(SearchExpression<T> pParentSearchExpression, QueryOperation pOperator)
public SearchExpression and(SearchExpression pSecondSearchExpression)
public SearchExpression or(SearchExpression pSecondSearchExpression)
pSecondSearchExpression
- public T getValue()
public QueryOperation getExpressionOperator()
public QueryOperation getParentOperator()
public SearchExpression<T> getParentSearchExpression()
public java.util.List<SearchExpressionPair<T>> getChildSearchExpression()
public boolean hasChildSearchExpression()
Copyright © 2024. All rights reserved.