Class AbstractExpression
- java.lang.Object
-
- io.ebeaninternal.server.expression.AbstractExpression
-
- All Implemented Interfaces:
Expression
,SpiExpression
- Direct Known Subclasses:
AbstractTextExpression
,AbstractValueExpression
,ArrayContainsExpression
,ArrayIsEmptyExpression
public abstract class AbstractExpression extends Object implements SpiExpression
Base class for simple expressions.
-
-
Field Summary
-
Fields inherited from interface io.ebeaninternal.api.SpiExpression
SQL_FALSE, SQL_TRUE
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
containsMany(BeanDescriptor<?> desc, ManyWhereJoins manyWhereJoin)
Process "Many" properties populating ManyWhereJoins.SpiExpression
copyForPlanKey()
Return a copy of the expression for use in the query plan key.Object
getIdEqualTo(String idName)
Return the bind Id value if this is a "equal to" expression for the id property.boolean
naturalKey(NaturalKeyQueryData<?> data)
Check for match to a natural key query returning false if it doesn't match.String
nestedPath(BeanDescriptor<?> desc)
Return the nested path for this expression.void
prepareExpression(BeanQueryRequest<?> request)
Prepare the expression.void
simplify()
Simplify nested expressions if possible.void
validate(SpiExpressionValidation validation)
Validate all the properties/paths associated with this expression.-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.ebeaninternal.api.SpiExpression
addBindValues, addSql, isSameByBind, queryBindHash, queryPlanHash, writeDocQuery
-
-
-
-
Method Detail
-
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 interfaceSpiExpression
-
simplify
public void simplify()
Description copied from interface:SpiExpression
Simplify nested expressions if possible.- Specified by:
simplify
in interfaceSpiExpression
-
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 interfaceSpiExpression
-
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 interfaceSpiExpression
-
nestedPath
public String nestedPath(BeanDescriptor<?> desc)
Description copied from interface:SpiExpression
Return the nested path for this expression.- Specified by:
nestedPath
in interfaceSpiExpression
-
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 interfaceSpiExpression
-
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 interfaceSpiExpression
-
validate
public void validate(SpiExpressionValidation validation)
Description copied from interface:SpiExpression
Validate all the properties/paths associated with this expression.- Specified by:
validate
in interfaceSpiExpression
-
-