Package org.mule.module.db.internal.domain.query

Examples of org.mule.module.db.internal.domain.query.Query


            if (type != QueryType.SELECT && type != QueryType.STORE_PROCEDURE_CALL)
            {
                try
                {
                    Query query = new Query(queryTemplate, null);
                    new SelectMessageProcessor(null, null, null, null, false);
                    fail("SelectMessageProcessor should accept SELECT and DYNAMIC queries only");
                }
                catch (IllegalArgumentException expected)
                {
View Full Code Here


            if (type != QueryType.UPDATE && type != QueryType.STORE_PROCEDURE_CALL)
            {
                try
                {
                    Query query = new Query(queryTemplate, null);
                    new UpdateMessageProcessor(null, null, null, null, null);
                    fail("UpdateMessageProcessor should accept UPDATE query only");
                }
                catch (IllegalArgumentException expected)
                {
View Full Code Here

        SelectExecutor selectExecutor = new SelectExecutor(statementFactory, resultHandler);

        QueryTemplate queryTemplate = new QueryTemplate(sqlText, QueryType.SELECT, Collections.<QueryParam>emptyList());
        Mockito.when(statementFactory.create(connection, queryTemplate)).thenReturn(statement);

        Query query = new Query(queryTemplate, null);
        Object result = selectExecutor.execute(connection, query);

        assertEquals(processedResult, result);
    }
View Full Code Here

        DbConnection connection = mock(DbConnection.class);
        UpdateExecutor updateExecutor = new UpdateExecutor(statementFactory);

        QueryTemplate queryTemplate = new QueryTemplate(sqlText, QueryType.UPDATE, Collections.<QueryParam>emptyList());
        Mockito.when(statementFactory.create(connection, queryTemplate)).thenReturn(statement);
        Query query = new Query(queryTemplate, null);

        Object result = updateExecutor.execute(connection, query);

        assertEquals(1, result);
    }
View Full Code Here

TOP

Related Classes of org.mule.module.db.internal.domain.query.Query

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.