Class DefaultExpressionRequest
- java.lang.Object
-
- io.ebeaninternal.server.expression.DefaultExpressionRequest
-
- All Implemented Interfaces:
SpiExpressionRequest
public class DefaultExpressionRequest extends Object implements SpiExpressionRequest
-
-
Constructor Summary
Constructors Constructor Description DefaultExpressionRequest(SpiOrmQueryRequest<?> queryRequest, DeployParser deployParser, Binder binder, SpiExpressionList<?> expressionList)
DefaultExpressionRequest(BeanDescriptor<?> beanDescriptor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addBindEncryptKey(Object bindValue)
Add an encryption key to bind to this request.void
addBindValue(Object bindValue)
Add a bind value to this request.SpiExpressionRequest
append(String sqlExpression)
Append text the underlying sql expression.void
appendInExpression(boolean not, List<Object> bindValues)
Append IN expression taking into account platform and type support for Multi-value.void
appendLike(boolean rawLikeExpression)
Append the database platform like clause.void
bind(DataBind dataBind)
Bind the values from the underlying expression list.String
buildSql()
Build sql for the underlying expression list.String
escapeLikeString(String value)
Escapes a string to use it as exact match in Like clause.BeanDescriptor<?>
getBeanDescriptor()
Return the bean descriptor for the root type.String
getBindLog()
List<Object>
getBindValues()
Return the ordered list of bind values for all expressions in this request.DbExpressionHandler
getDbPlatformHandler()
Return the DB specific handler for JSON and ARRAY expressions.SpiOrmQueryRequest<?>
getQueryRequest()
Return the associated QueryRequest.String
getSql()
Return the accumulated expression sql for all expressions in this request.int
nextParameter()
Increments the parameter index and returns that value.String
parseDeploy(String logicalProp)
Parse the logical property name to the deployment name.
-
-
-
Constructor Detail
-
DefaultExpressionRequest
public DefaultExpressionRequest(SpiOrmQueryRequest<?> queryRequest, DeployParser deployParser, Binder binder, SpiExpressionList<?> expressionList)
-
DefaultExpressionRequest
public DefaultExpressionRequest(BeanDescriptor<?> beanDescriptor)
-
-
Method Detail
-
bind
public void bind(DataBind dataBind) throws SQLException
Bind the values from the underlying expression list.- Throws:
SQLException
-
getDbPlatformHandler
public DbExpressionHandler getDbPlatformHandler()
Description copied from interface:SpiExpressionRequest
Return the DB specific handler for JSON and ARRAY expressions.- Specified by:
getDbPlatformHandler
in interfaceSpiExpressionRequest
-
parseDeploy
public String parseDeploy(String logicalProp)
Description copied from interface:SpiExpressionRequest
Parse the logical property name to the deployment name.- Specified by:
parseDeploy
in interfaceSpiExpressionRequest
-
appendLike
public void appendLike(boolean rawLikeExpression)
Append the database platform like clause.- Specified by:
appendLike
in interfaceSpiExpressionRequest
-
escapeLikeString
public String escapeLikeString(String value)
Description copied from interface:SpiExpressionRequest
Escapes a string to use it as exact match in Like clause.- Specified by:
escapeLikeString
in interfaceSpiExpressionRequest
-
nextParameter
public int nextParameter()
Increments the parameter index and returns that value.- Specified by:
nextParameter
in interfaceSpiExpressionRequest
-
getBeanDescriptor
public BeanDescriptor<?> getBeanDescriptor()
Description copied from interface:SpiExpressionRequest
Return the bean descriptor for the root type.- Specified by:
getBeanDescriptor
in interfaceSpiExpressionRequest
-
getQueryRequest
public SpiOrmQueryRequest<?> getQueryRequest()
Description copied from interface:SpiExpressionRequest
Return the associated QueryRequest.- Specified by:
getQueryRequest
in interfaceSpiExpressionRequest
-
append
public SpiExpressionRequest append(String sqlExpression)
Append text the underlying sql expression.- Specified by:
append
in interfaceSpiExpressionRequest
-
addBindEncryptKey
public void addBindEncryptKey(Object bindValue)
Description copied from interface:SpiExpressionRequest
Add an encryption key to bind to this request.- Specified by:
addBindEncryptKey
in interfaceSpiExpressionRequest
-
addBindValue
public void addBindValue(Object bindValue)
Description copied from interface:SpiExpressionRequest
Add a bind value to this request.- Specified by:
addBindValue
in interfaceSpiExpressionRequest
-
getBindLog
public String getBindLog()
-
getSql
public String getSql()
Description copied from interface:SpiExpressionRequest
Return the accumulated expression sql for all expressions in this request.- Specified by:
getSql
in interfaceSpiExpressionRequest
-
getBindValues
public List<Object> getBindValues()
Description copied from interface:SpiExpressionRequest
Return the ordered list of bind values for all expressions in this request.- Specified by:
getBindValues
in interfaceSpiExpressionRequest
-
appendInExpression
public void appendInExpression(boolean not, List<Object> bindValues)
Description copied from interface:SpiExpressionRequest
Append IN expression taking into account platform and type support for Multi-value.- Specified by:
appendInExpression
in interfaceSpiExpressionRequest
-
-