Class JdbcMetadataParameter
- java.lang.Object
-
- com.adaptris.core.jdbc.AbstractParameter
-
- com.adaptris.core.jdbc.NullableParameter
-
- com.adaptris.core.jdbc.JdbcMetadataParameter
-
- All Implemented Interfaces:
InOutParameter,InParameter,JdbcParameter,OutParameter
- Direct Known Subclasses:
JdbcObjectMetadataParameter
public class JdbcMetadataParameter extends NullableParameter
Stored Procedure parameter implementation, can be used for all IN, INOUT and OUT Stored Procedure parameters.If this implementation is used for an IN or an INOUT parameter, then the metadata will be pulled from the
AdaptrisMessageand used as the parameter value. If this implementation is used for an OUT or an INOUT parameter, then the value of the matching parameter after the Stored Procedure has run, will be reapplied into theAdaptrisMessageas metadata. You will simply set the metadataKey, to both retrieve a value or to set a new value as above.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
ParameterValueTypeIn the adapter configuration file this class is aliased as jdbc-metadata-parameter which is the preferred alternative to the fully qualified classname when building your configuration.
-
-
Constructor Summary
Constructors Constructor Description JdbcMetadataParameter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectapplyInputParam(AdaptrisMessage msg)voidapplyOutputParam(java.lang.Object dbValue, AdaptrisMessage msg)protected voidcheckMetadataKey()java.lang.StringgetMetadataKey()voidsetMetadataKey(java.lang.String metadataKey)-
Methods inherited from class com.adaptris.core.jdbc.NullableParameter
getNullConverter, normalize, setNullConverter
-
-
-
-
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
-
checkMetadataKey
protected void checkMetadataKey() throws JdbcParameterException- Throws:
JdbcParameterException
-
getMetadataKey
public java.lang.String getMetadataKey()
-
setMetadataKey
public void setMetadataKey(java.lang.String metadataKey)
-
-