- All Superinterfaces:
Expression
- All Known Subinterfaces:
SpiExpressionList<T>
- All Known Implementing Classes:
DefaultExpressionList,FilterExpressionList,IdInExpression,InExpression,SimpleExpression
An expression that becomes part of a Where clause or Having clause.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBindValues(SpiExpressionBind request) Add the parameter values to be set against query.voidaddSql(SpiExpressionRequest request) Add some sql to the query.voidcontainsMany(BeanDescriptor<?> desc, ManyWhereJoins whereManyJoins) Process "Many" properties populating ManyWhereJoins.default SpiExpressioncopy()Return a copy of the expression (as part of creating a query copy).Return a copy of the expression for use in the query plan key.getIdEqualTo(String idName) Return the bind Id value if this is a "equal to" expression for the id property.booleanisSameByBind(SpiExpression other) Return true if the expression is the same with respect to bind values.booleannaturalKey(NaturalKeyQueryData<?> data) Check for match to a natural key query returning false if it doesn't match.voidprefixProperty(String path) Apply property prefix when filterMany expressions included into main query.voidprepareExpression(BeanQueryRequest<?> request) Prepare the expression.voidBuild the key for bind values of the query.voidqueryPlanHash(StringBuilder builder) Calculate a hash value used to identify a query for AutoTune tuning.voidsimplify()Simplify nested expressions if possible.voidvalidate(SpiExpressionValidation validation) Validate all the properties/paths associated with this expression.
-
Field Details
-
SQL_TRUE
- See Also:
-
SQL_FALSE
- See Also:
-
-
Method Details
-
simplify
void simplify()Simplify nested expressions if possible. -
containsMany
Process "Many" properties populating ManyWhereJoins.Predicates on Many properties require an extra independent join clause.
-
prepareExpression
Prepare the expression. For example, compile sub-query expressions etc. -
queryPlanHash
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
Build the key for bind values of the query. -
isSameByBind
Return true if the expression is the same with respect to bind values. -
addSql
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
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
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
Return the bind Id value if this is a "equal to" expression for the id property. -
naturalKey
Check for match to a natural key query returning false if it doesn't match. -
prefixProperty
Apply property prefix when filterMany expressions included into main query. -
copy
Return a copy of the expression (as part of creating a query copy).
-