Saravanan Ramamoorthy
Saravanan Ramamoorthy

Reputation: 139

jdbc:stored-proc-outbound-gateway cursor - constructor argument

I am using jdbc:stored-proc-outbound-gateway to fetch the result from stored procedure. I have a cursor return type which is working fine with static constructor argument.

<int-jdbc:sql-parameter-definition name="O_TEST_RC" type="#{T(oracle.jdbc.OracleTypes).CURSOR}" direction="OUT"  return-type="testCursor"/>

<bean id="testCursor" class="package.TestCursor">
    <constructor-arg>
        <value>2015/10/14</value>
    </constructor-arg>
</bean>

How can make this constructor argument dynamic with payload. Please suggest.

Upvotes: 1

Views: 65

Answers (1)

Artem Bilan
Artem Bilan

Reputation: 121177

For the CURSOR you should use <int-jdbc:returning-resultset> and provide some RawMapper to build the target domain object already and avoid such a low-level API like extension of Oracle -specific Cursor type.

Upvotes: 1

Related Questions