Interface SpiExpression

All Superinterfaces:
Expression
All Known Subinterfaces:
SpiExpressionList<T>
All Known Implementing Classes:
DefaultExpressionList, FilterExpressionList, IdInExpression, InExpression, SimpleExpression

public interface SpiExpression extends Expression
An expression that becomes part of a Where clause or Having clause.
  • Field Details

  • Method Details

    • simplify

      void simplify()
      Simplify nested expressions if possible.
    • containsMany

      void containsMany(BeanDescriptor<?> desc, ManyWhereJoins whereManyJoins)
      Process "Many" properties populating ManyWhereJoins.

      Predicates on Many properties require an extra independent join clause.

    • prepareExpression

      void prepareExpression(BeanQueryRequest<?> request)
      Prepare the expression. For example, compile sub-query expressions etc.
    • queryPlanHash

      void queryPlanHash(StringBuilder builder)
      Calculate a hash value used to identify a query for AutoTune tuning.

      That is, if the hash changes then the query will be considered different from an AutoTune perspective and get different tuning.

    • queryBindKey

      void queryBindKey(BindValuesKey key)
      Build the key for bind values of the query.
    • isSameByBind

      boolean isSameByBind(SpiExpression other)
      Return true if the expression is the same with respect to bind values.
    • addSql

      void addSql(SpiExpressionRequest request)
      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.

      Parameters:
      request - the associated request.
    • addBindValues

      void addBindValues(SpiExpressionBind request)
      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.
      Parameters:
      request - the associated request.
    • validate

      void validate(SpiExpressionValidation validation)
      Validate all the properties/paths associated with this expression.
    • copyForPlanKey

      SpiExpression copyForPlanKey()
      Return a copy of the expression for use in the query plan key.
    • getIdEqualTo

      Object getIdEqualTo(String idName)
      Return the bind Id value if this is a "equal to" expression for the id property.
    • naturalKey

      boolean naturalKey(NaturalKeyQueryData<?> data)
      Check for match to a natural key query returning false if it doesn't match.
    • prefixProperty

      void prefixProperty(String path)
      Apply property prefix when filterMany expressions included into main query.
    • copy

      default SpiExpression copy()
      Return a copy of the expression (as part of creating a query copy).