Class WhereClauseCondition

java.lang.Object
de.hybris.platform.integrationservices.search.WhereClauseCondition
Direct Known Subclasses:
NavigationPropertyWhereClauseCondition, NavigationPropertyWithIntegrationKeyWhereClauseCondition, NoResultWhereClauseCondition, SimplePropertyWhereClauseCondition

public class WhereClauseCondition extends Object
Represents a where clause condition (e.g. "{code} = abc"). It doesn't include the keyword 'WHERE' in the condition. The WhereClauseCondition can also store the conjunctive operator (AND, OR, etc.) to the next WhereClauseCondition.
  • Constructor Details

    • WhereClauseCondition

      protected WhereClauseCondition(String conditionTemplate, String attributeName, String compareOperator, String attributeValue)
      Creates an instance of a where clause condition
      Parameters:
      conditionTemplate - - condition template
      attributeName - - attribute name
      compareOperator - - compare operator (e.g. "=" or "IN")
      attributeValue - - attribute value
    • WhereClauseCondition

      protected WhereClauseCondition(String conditionTemplate, String attributeName, String compareOperator, String attributeValue, ConjunctiveOperator conjunctiveOperator)
      Creates an instance of a where clause condition with a conjunctive operator
      Parameters:
      conditionTemplate - - condition template
      attributeName - - attribute name
      compareOperator - - compare operator (e.g. "=" or "IN")
      attributeValue - - attribute value
      conjunctiveOperator - - conjunctive operator
    • WhereClauseCondition

      protected WhereClauseCondition(WhereClauseCondition whereCC, ConjunctiveOperator operator)
      Creates a duplicate of the @param whereCC with the @param operator
      Parameters:
      whereCC - - where clause condition
      operator - - conjunctive operator
  • Method Details

    • getCondition

      public String getCondition()
    • getAttributeName

      public String getAttributeName()
      Extracts the attributeName from the condition. Example filter condition: "{supercategories} = 8796093055118" -> returns "supercategories"
      Returns:
      attributeName or "" if no attributeName is not found
    • getConjunctiveOperator

      public ConjunctiveOperator getConjunctiveOperator()
    • toWhereClauseConditions

      public WhereClauseConditions toWhereClauseConditions()
    • getCompareOperator

      protected String getCompareOperator()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object