Search in sources :

Example 11 with JpaParameter

use of org.springframework.integration.jpa.support.JpaParameter in project spring-integration by spring-projects.

the class ExpressionEvaluatingParameterSourceFactory method setParameters.

/**
 * Define the (optional) parameter values.
 * @param parameters the parameters to be set
 */
public void setParameters(List<JpaParameter> parameters) {
    Assert.notEmpty(parameters, "parameters must not be null or empty.");
    for (JpaParameter parameter : parameters) {
        Assert.notNull(parameter, "The provided list (parameters) cannot contain null values.");
    }
    this.parameters = parameters;
    this.expressionEvaluator.getEvaluationContext().setVariable("staticParameters", ExpressionEvaluatingParameterSourceUtils.convertStaticParameters(parameters));
}
Also used : JpaParameter(org.springframework.integration.jpa.support.JpaParameter)

Aggregations

JpaParameter (org.springframework.integration.jpa.support.JpaParameter)11 Test (org.junit.Test)7 ArrayList (java.util.ArrayList)4 JpaExecutor (org.springframework.integration.jpa.core.JpaExecutor)3 BeanFactory (org.springframework.beans.factory.BeanFactory)2 AbstractMessageChannel (org.springframework.integration.channel.AbstractMessageChannel)2 JpaOperations (org.springframework.integration.jpa.core.JpaOperations)2 PersistMode (org.springframework.integration.jpa.support.PersistMode)2 ExpressionEvaluatingParameterSourceFactory (org.springframework.integration.jpa.support.parametersource.ExpressionEvaluatingParameterSourceFactory)2 HashMap (java.util.HashMap)1