Package org.mule.module.db.internal.result.statement

Examples of org.mule.module.db.internal.result.statement.StatementResultIterator


        DefaultOutputQueryParam param1 = new DefaultOutputQueryParam(0, UnknownDbType.getInstance(), "param1");
        List<QueryParam> params = new LinkedList<QueryParam>();
        params.add(param1);

        QueryTemplate queryTemplate = new QueryTemplate("dummy", QueryType.STORE_PROCEDURE_CALL, params);
        StatementResultIterator iterator = new StatementResultIterator(null, statement, queryTemplate, null, null);

        boolean hasNext = iterator.hasNext();

        assertThat(hasNext, equalTo(true));
    }
View Full Code Here


        DefaultOutputQueryParam param1 = new DefaultOutputQueryParam(1, UnknownDbType.getInstance(), "param1");
        List<QueryParam> params = new LinkedList<QueryParam>();
        params.add(param1);

        QueryTemplate queryTemplate = new QueryTemplate("dummy", QueryType.STORE_PROCEDURE_CALL, params);
        StatementResultIterator iterator = new StatementResultIterator(null, statement, queryTemplate, null, null);

        Object nextResult = iterator.next();

        assertThat(nextResult, is(instanceOf(OutputParamResult.class)));
        OutputParamResult outputParamResult = (OutputParamResult) nextResult;
        assertThat(outputParamResult.getName(), equalTo("param1"));
        assertThat((Integer) outputParamResult.getResult(), equalTo(paramValue));
View Full Code Here

        List<QueryParam> params = new LinkedList<QueryParam>();
        params.add(param1);
        params.add(param2);

        QueryTemplate queryTemplate = new QueryTemplate("dummy", QueryType.STORE_PROCEDURE_CALL, params);
        StatementResultIterator iterator = new StatementResultIterator(connection, statement, queryTemplate, new NoAutoGeneratedKeyStrategy(), null);

        iterator.next();
        iterator.next();

        InOrder inOrder = inOrder(statement);
        inOrder.verify(statement).getObject(1);
        inOrder.verify(statement).getObject(2);
    }
View Full Code Here

TOP

Related Classes of org.mule.module.db.internal.result.statement.StatementResultIterator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.