java.lang.Object
io.ebeaninternal.server.expression.SimpleExpression
- All Implemented Interfaces:
Expression,SpiExpression
-
Field Summary
FieldsFields inherited from interface io.ebeaninternal.api.SpiExpression
SQL_FALSE, SQL_TRUE -
Constructor Summary
Constructors -
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 manyWhereJoin) Process "Many" properties populating ManyWhereJoins.Return a copy of the expression for use in the query plan key.protected final ElPropertyValuegetElProp(SpiExpressionBind request) getIdEqualTo(String idName) Return the bind Id value if this is a "equal to" expression for the id property.getValue()booleanbooleanisSameByBind(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.protected voidpropertyContainsMany(String propertyName, BeanDescriptor<?> desc, ManyWhereJoins manyWhereJoin) Check the logical property path for containing a 'many' property.voidBuild the key for bind values of the query.voidqueryPlanHash(StringBuilder builder) Based on the type and propertyName.voidsimplify()Simplify nested expressions if possible.protected StringstrValue()Return the String bind value taking into account named parameters.voidvalidate(SpiExpressionValidation validation) Validate all the properties/paths associated with this expression.protected Objectvalue()Return the bind value taking into account named parameters.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.ebeaninternal.api.SpiExpression
copy
-
Field Details
-
bindValue
-
propName
-
-
Constructor Details
-
SimpleExpression
-
-
Method Details
-
getIdEqualTo
Description copied from interface:SpiExpressionReturn the bind Id value if this is a "equal to" expression for the id property.- Specified by:
getIdEqualToin interfaceSpiExpression
-
naturalKey
Description copied from interface:SpiExpressionCheck for match to a natural key query returning false if it doesn't match.- Specified by:
naturalKeyin interfaceSpiExpression
-
getPropName
-
isOpEquals
public boolean isOpEquals() -
getValue
-
addBindValues
Description copied from interface:SpiExpressionAdd 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.
-
addSql
Description copied from interface:SpiExpressionAdd 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.
-
queryPlanHash
Based on the type and propertyName. -
queryBindKey
Description copied from interface:SpiExpressionBuild the key for bind values of the query. -
isSameByBind
Description copied from interface:SpiExpressionReturn true if the expression is the same with respect to bind values. -
value
Return the bind value taking into account named parameters. -
strValue
Return the String bind value taking into account named parameters. -
prefixProperty
Description copied from interface:SpiExpressionApply property prefix when filterMany expressions included into main query.- Specified by:
prefixPropertyin interfaceSpiExpression
-
simplify
public void simplify()Description copied from interface:SpiExpressionSimplify nested expressions if possible.- Specified by:
simplifyin interfaceSpiExpression
-
copyForPlanKey
Description copied from interface:SpiExpressionReturn a copy of the expression for use in the query plan key.- Specified by:
copyForPlanKeyin interfaceSpiExpression
-
containsMany
Description copied from interface:SpiExpressionProcess "Many" properties populating ManyWhereJoins.Predicates on Many properties require an extra independent join clause.
- Specified by:
containsManyin interfaceSpiExpression
-
propertyContainsMany
protected void propertyContainsMany(String propertyName, BeanDescriptor<?> desc, ManyWhereJoins manyWhereJoin) Check the logical property path for containing a 'many' property. -
prepareExpression
Description copied from interface:SpiExpressionPrepare the expression. For example, compile sub-query expressions etc.- Specified by:
prepareExpressionin interfaceSpiExpression
-
validate
Description copied from interface:SpiExpressionValidate all the properties/paths associated with this expression.- Specified by:
validatein interfaceSpiExpression
-
getElProp
-