Class JdbcConstantParameter
- java.lang.Object
-
- com.adaptris.core.jdbc.AbstractParameter
-
- com.adaptris.core.jdbc.JdbcConstantParameter
-
- All Implemented Interfaces:
InOutParameter
,InParameter
,JdbcParameter
,OutParameter
public class JdbcConstantParameter extends AbstractParameter
Stored Procedure parameter implementation, can be used only for IN Stored Procedure parameters.When this implementation is used for an IN parameter, then the constant value will be used as the parameter value. You will simply set the constant to be the value you wish to use as the Stored Procedure parameter value.
Additionally you will set one or both of "name" and/or "order". "name" will map this parameter to a Stored Procedure parameter using the Stored Procedures method signature. "order" will map this parameter according to the parameter number using the Stored Procedures method signature. Note that the "order" starts from 1 and not 0, so the first parameter would be order 1. You will also need to set the data type of the parameter; you may use any of the string types defined in
ParameterValueType
In the adapter configuration file this class is aliased as jdbc-constant-parameter which is the preferred alternative to the fully qualified classname when building your configuration.
-
-
Constructor Summary
Constructors Constructor Description JdbcConstantParameter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
applyInputParam(AdaptrisMessage msg)
void
applyOutputParam(java.lang.Object dbValue, AdaptrisMessage msg)
java.lang.String
getConstant()
void
setConstant(java.lang.String constant)
-
-
-
Method Detail
-
applyInputParam
public java.lang.Object applyInputParam(AdaptrisMessage msg) throws JdbcParameterException
- Throws:
JdbcParameterException
-
applyOutputParam
public void applyOutputParam(java.lang.Object dbValue, AdaptrisMessage msg) throws JdbcParameterException
- Throws:
JdbcParameterException
-
getConstant
public java.lang.String getConstant()
-
setConstant
public void setConstant(java.lang.String constant)
-
-