Class SearchExpression<T>

java.lang.Object
org.nuclos.api.businessobject.SearchExpression<T>

public class SearchExpression<T> extends 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

Author:
Matthias Reichart
  • Field Details

  • Constructor Details

    • SearchExpression

      public SearchExpression(Attribute<T> pSource, Attribute<T> pTarget, QueryOperation pOperator)
      This Constructor is used when there are two attributes to compare
      Parameters:
      pSource -
      pTarget -
      pOperator -
    • SearchExpression

      public 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
      Parameters:
      pSource -
      pValue -
      pOperator -
    • SearchExpression

      public SearchExpression(Attribute<T> pSource, QueryOperation pOperator)
      This Constructor is used when a attributes is checkd on Null or notNull
      Parameters:
      pSource -
      pOperator -
    • SearchExpression

      public SearchExpression(SearchExpression<T> pParentSearchExpression, QueryOperation pOperator)
  • Method Details

    • and

      public SearchExpression and(SearchExpression pSecondSearchExpression)
      This Constructor is used to join the current SearchExpression with a second SearchExpression using AND
    • or

      public SearchExpression or(SearchExpression pSecondSearchExpression)
      This Constructor is used to join the current SearchExpression with a second SearchExpression using OR
      Parameters:
      pSecondSearchExpression -
    • getSource

      public Attribute<T> getSource()
      returns the Source
      Returns:
    • getTarget

      public Attribute<T> getTarget()
      returns the Target
      Returns:
    • getValue

      public T getValue()
      returns the Value
      Returns:
    • getExpressionOperator

      public QueryOperation getExpressionOperator()
      returns the Operator used for comparison
      Returns:
    • getParentOperator

      public QueryOperation getParentOperator()
    • getParentSearchExpression

      public SearchExpression<T> getParentSearchExpression()
    • getChildSearchExpression

      public List<SearchExpressionPair<T>> 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