Class ProcedureParameter

java.lang.Object
org.springframework.integration.jdbc.storedproc.ProcedureParameter

public class ProcedureParameter extends Object
Abstraction of Procedure parameters allowing to provide static parameters and SpEl Expression based parameters.
Since:
2.1
Author:
Gunnar Hillert, Artem Bilan
  • Constructor Details

    • ProcedureParameter

      public ProcedureParameter(String name, Object value, String expression)
      Instantiates a new Procedure Parameter.
      Parameters:
      name - Name of the procedure parameter, must not be null or empty
      value - If null, the expression property must be set
      expression - If null, the value property must be set
    • ProcedureParameter

      public ProcedureParameter()
      Default constructor.
  • Method Details

    • getName

      public String getName()
    • setName

      public void setName(String name)
    • getValue

      public Object getValue()
    • setValue

      public void setValue(Object value)
    • getExpression

      public String getExpression()
    • setExpression

      public void setExpression(String expression)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • convertExpressions

      public static Map<String,String> convertExpressions(Collection<ProcedureParameter> procedureParameters)
      Utility method that converts a Collection of ProcedureParameter to a Map containing only expression parameters.
      Parameters:
      procedureParameters - Must not be null.
      Returns:
      Map containing only the Expression bound parameters. Will never be null.
    • convertStaticParameters

      public static Map<String,Object> convertStaticParameters(Collection<ProcedureParameter> procedureParameters)
      Utility method that converts a Collection of ProcedureParameter to a Map containing only static parameters.
      Parameters:
      procedureParameters - Must not be null.
      Returns:
      Map containing only the static parameters. Will never be null.