Java Code Examples for java.sql.CallableStatement.setFetchDirection()

The following are Jave code examples for showing how to use setFetchDirection() of the java.sql.CallableStatement class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: spwrap   File: ResultSetProps.java   Source Code and License Vote up 6 votes
public CallableStatement apply(Connection input, Object... args) {
    try {
        CallableStatement call;

        if (!skip) {
            log.debug("applying {} on input Connection", this);

            if (holdability == ResultSetHoldability.DEFAULT) {
                call = input.prepareCall((String) args[0], type.getValue(), concurrency.getValue());
            } else {
                call = input.prepareCall((String) args[0], type.getValue(), concurrency.getValue(), holdability.getValue());
            }

            call.setFetchDirection(fetchDirection.getValue());
            call.setFetchSize(fetchSize);
            call.setMaxFieldSize(maxFieldSize);
            call.setMaxRows(maxRows);
        } else {
            call = input.prepareCall((String) args[0]);
        }
        return call;
    } catch (SQLException e) {
        throw new CallException(e);
    }
}