Example usage for org.springframework.integration.jpa.support JpaParameter getValue

List of usage examples for org.springframework.integration.jpa.support JpaParameter getValue

Introduction

In this page you can find the example usage for org.springframework.integration.jpa.support JpaParameter getValue.

Prototype

@Nullable
    public Object getValue() 

Source Link

Usage

From source file:org.springframework.integration.jpa.support.parametersource.ExpressionEvaluatingParameterSource.java

public Object getValueByPosition(int position) {

    Assert.isTrue(position >= 0, "The position must be be non-negative.");

    if (position <= parameters.size()) {

        final JpaParameter parameter = parameters.get(position);

        if (parameter.getValue() != null) {
            return parameter.getValue();
        }/*from  w  ww. ja va 2  s .  co  m*/

        if (parameter.getExpression() != null) {
            String expression = parameter.getExpression();

            if (input instanceof Collection<?>) {
                expression = "#root.![" + expression + "]";
            }

            final Object value = this.expressionEvaluator.evaluateExpression(expression, input);
            //FIXME values.put(paramName, value);
            if (logger.isDebugEnabled()) {
                logger.debug("Resolved expression " + expression + " to " + value);
            }
            return value;

        }

    }

    return null;

}