Class InExpression

java.lang.Object
io.ebeaninternal.server.expression.InExpression
All Implemented Interfaces:
Expression, SpiExpression, IdInCommon

public final class InExpression extends Object implements IdInCommon
  • Field Details

    • propName

      protected String propName
  • Method Details

    • property

      public String property()
    • idValues

      public Collection<?> idValues()
      Description copied from interface: IdInCommon
      Return the ids this expression is looking to fetch.
      Specified by:
      idValues in interface IdInCommon
    • removeIds

      public int removeIds(Set<Object> hitIds)
      Description copied from interface: IdInCommon
      Remove Ids that where obtained from l2 cache. Don't fetch these from DB.
      Specified by:
      removeIds in interface IdInCommon
    • naturalKey

      public boolean naturalKey(NaturalKeyQueryData<?> data)
      Description copied from interface: SpiExpression
      Check for match to a natural key query returning false if it doesn't match.
      Specified by:
      naturalKey in interface SpiExpression
    • prepareExpression

      public void prepareExpression(BeanQueryRequest<?> request)
      Description copied from interface: SpiExpression
      Prepare the expression. For example, compile sub-query expressions etc.
      Specified by:
      prepareExpression in interface SpiExpression
    • addBindValues

      public void addBindValues(SpiExpressionBind request)
      Description copied from interface: SpiExpression
      Add the parameter values to be set against query. For each ? place holder there should be a corresponding value that is added to the bindList.
      Specified by:
      addBindValues in interface SpiExpression
      Parameters:
      request - the associated request.
    • addSql

      public void addSql(SpiExpressionRequest request)
      Description copied from interface: SpiExpression
      Add some sql to the query.

      This will contain ? as a place holder for each associated bind values.

      The 'sql' added to the query can contain object property names rather than db tables and columns. This 'sql' is later parsed converting the logical property names to their full database column names.

      Specified by:
      addSql in interface SpiExpression
      Parameters:
      request - the associated request.
    • queryPlanHash

      public void queryPlanHash(StringBuilder builder)
      Based on the number of values in the in clause.
      Specified by:
      queryPlanHash in interface SpiExpression
    • queryBindKey

      public void queryBindKey(BindValuesKey key)
      Description copied from interface: SpiExpression
      Build the key for bind values of the query.
      Specified by:
      queryBindKey in interface SpiExpression
    • isSameByBind

      public boolean isSameByBind(SpiExpression other)
      Description copied from interface: SpiExpression
      Return true if the expression is the same with respect to bind values.
      Specified by:
      isSameByBind in interface SpiExpression
    • prefixProperty

      public void prefixProperty(String path)
      Description copied from interface: SpiExpression
      Apply property prefix when filterMany expressions included into main query.
      Specified by:
      prefixProperty in interface SpiExpression
    • simplify

      public void simplify()
      Description copied from interface: SpiExpression
      Simplify nested expressions if possible.
      Specified by:
      simplify in interface SpiExpression
    • getIdEqualTo

      public Object getIdEqualTo(String idName)
      Description copied from interface: SpiExpression
      Return the bind Id value if this is a "equal to" expression for the id property.
      Specified by:
      getIdEqualTo in interface SpiExpression
    • copyForPlanKey

      public SpiExpression copyForPlanKey()
      Description copied from interface: SpiExpression
      Return a copy of the expression for use in the query plan key.
      Specified by:
      copyForPlanKey in interface SpiExpression
    • containsMany

      public void containsMany(BeanDescriptor<?> desc, ManyWhereJoins manyWhereJoin)
      Description copied from interface: SpiExpression
      Process "Many" properties populating ManyWhereJoins.

      Predicates on Many properties require an extra independent join clause.

      Specified by:
      containsMany in interface SpiExpression
    • propertyContainsMany

      protected void propertyContainsMany(String propertyName, BeanDescriptor<?> desc, ManyWhereJoins manyWhereJoin)
      Check the logical property path for containing a 'many' property.
    • validate

      public void validate(SpiExpressionValidation validation)
      Description copied from interface: SpiExpression
      Validate all the properties/paths associated with this expression.
      Specified by:
      validate in interface SpiExpression
    • getElProp

      protected final ElPropertyValue getElProp(SpiExpressionBind request)