public class StringQueryParameterBinder extends ParameterBinder
ParameterBinder
that takes StringQuery.LikeParameterBinding
s encapsulated in a StringQuery
into account.Constructor and Description |
---|
StringQueryParameterBinder(JpaParameters parameters,
Object[] values,
org.springframework.data.jpa.repository.query.StringQuery query,
EvaluationContextProvider evaluationContextProvider)
Creates a new
StringQueryParameterBinder from the given Parameters , method arguments and
StringQuery . |
Modifier and Type | Method and Description |
---|---|
protected void |
bind(javax.persistence.Query jpaQuery,
org.springframework.data.jpa.repository.query.JpaParameters.JpaParameter methodParameter,
Object value,
int position)
Perform the actual query parameter binding.
|
protected boolean |
canBindParameter(org.springframework.data.jpa.repository.query.JpaParameters.JpaParameter parameter)
Returns true if the given parameter can be bound.
|
protected Object |
evaluateExpression(Expression expr)
Evaluates the given SpEL
Expression . |
protected Object |
evaluateExpression(String expressionString)
Evaluates the given
expressionString as a SpEL Expression . |
protected EvaluationContext |
getEvaluationContext()
Returns the
StandardEvaluationContext to use for evaluation. |
protected Expression |
parseExpressionString(String expressionString)
Parses the given
expressionString into a SpEL Expression . |
bind, bindAndPrepare, getPageable, getSort
public StringQueryParameterBinder(JpaParameters parameters, Object[] values, org.springframework.data.jpa.repository.query.StringQuery query, EvaluationContextProvider evaluationContextProvider)
StringQueryParameterBinder
from the given Parameters
, method arguments and
StringQuery
.parameters
- must not be null.values
- must not be null.query
- must not be null.evaluationContextProvider
- must not be null.protected void bind(javax.persistence.Query jpaQuery, org.springframework.data.jpa.repository.query.JpaParameters.JpaParameter methodParameter, Object value, int position)
ParameterBinder
bind
in class ParameterBinder
protected boolean canBindParameter(org.springframework.data.jpa.repository.query.JpaParameters.JpaParameter parameter)
ParameterBinder
canBindParameter
in class ParameterBinder
protected Expression parseExpressionString(String expressionString)
expressionString
into a SpEL Expression
.expressionString
- protected Object evaluateExpression(String expressionString)
expressionString
as a SpEL Expression
.expressionString
- protected Object evaluateExpression(Expression expr)
Expression
.expr
- protected EvaluationContext getEvaluationContext()
StandardEvaluationContext
to use for evaluation.Copyright © 2011-2014–2014 Pivotal Software, Inc.. All rights reserved.