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

Examples of org.mule.module.db.internal.domain.param.InputQueryParam


        assertTrue(queryTemplateBean instanceof QueryTemplate);
        QueryTemplate queryTemplate = (QueryTemplate) queryTemplateBean;
        assertEquals(QueryType.SELECT, queryTemplate.getType());
        assertEquals("SELECT * FROM PLANET WHERE POSITION = ?", queryTemplate.getSqlText());
        assertEquals(1, queryTemplate.getInputParams().size());
        InputQueryParam param1 = queryTemplate.getInputParams().get(0);
        assertEquals(UnknownDbType.getInstance(), param1.getType());
        assertEquals("position", param1.getName());
        assertEquals(paramValue, param1.getValue());
        assertEquals(1, param1.getIndex());
    }
View Full Code Here


        assertTrue(queryTemplateBean instanceof QueryTemplate);
        QueryTemplate queryTemplate = (QueryTemplate) queryTemplateBean;
        assertEquals(QueryType.SELECT, queryTemplate.getType());
        assertEquals(1, queryTemplate.getInputParams().size());

        InputQueryParam inputSqlParam = queryTemplate.getInputParams().get(0);
        assertEquals(UnknownDbType.getInstance(), inputSqlParam.getType());
    }
View Full Code Here

        QueryTemplate createdQueryTemplate = factoryBean.getObject();

        assertThat(createdQueryTemplate.getSqlText(), equalTo(PARSED_PARAMETERIZED_QUERY));
        assertThat(createdQueryTemplate.getType(), equalTo(QueryType.SELECT));
        assertThat(createdQueryTemplate.getParams().size(), equalTo(1));
        InputQueryParam inputQueryParam = createdQueryTemplate.getInputParams().get(0);
        assertThat(inputQueryParam.getValue(), IsEqual.<Object>equalTo(TEMPLATE_PARAM_VALUE));
    }
View Full Code Here

        QueryTemplate createdQueryTemplate = doOverriddenParamTest(JdbcTypes.INTEGER_DB_TYPE, new DefaultInputQueryParam(1, JdbcTypes.INTEGER_DB_TYPE, OVERRIDDEN_PARAM_VALUE, POSITION_PARAM_NAME));

        assertThat(createdQueryTemplate.getSqlText(), equalTo(PARSED_PARAMETERIZED_QUERY));
        assertThat(createdQueryTemplate.getType(), equalTo(QueryType.SELECT));
        assertThat(createdQueryTemplate.getParams().size(), equalTo(1));
        InputQueryParam inputQueryParam = createdQueryTemplate.getInputParams().get(0);
        assertThat(inputQueryParam.getValue(), IsEqual.<Object>equalTo(OVERRIDDEN_PARAM_VALUE));
    }
View Full Code Here

        QueryParam overriddenParam = new DefaultInputQueryParam(2, overriddenParamType, OVERRIDDEN_PARAM_VALUE, POSITION_PARAM_NAME);

        QueryTemplate createdQueryTemplate = doOverriddenParamTest(templateParamType, overriddenParam);

        assertThat(createdQueryTemplate.getParams().size(), equalTo(1));
        InputQueryParam inputQueryParam = createdQueryTemplate.getInputParams().get(0);
        assertThat(inputQueryParam.getIndex(), equalTo(1));
        assertThat(inputQueryParam.getType(), equalTo(expectedParamType));
        assertThat(inputQueryParam.getName(), equalTo(POSITION_PARAM_NAME));
        assertThat(inputQueryParam.getValue(), IsEqual.<Object>equalTo(OVERRIDDEN_PARAM_VALUE));
    }
View Full Code Here

        assertTrue(queryTemplateBean instanceof QueryTemplate);
        QueryTemplate queryTemplate = (QueryTemplate) queryTemplateBean;
        assertEquals(QueryType.UPDATE, queryTemplate.getType());
        assertEquals(1, queryTemplate.getInputParams().size());

        InputQueryParam inputSqlParam = queryTemplate.getInputParams().get(0);
        assertEquals(UnknownDbType.getInstance(), inputSqlParam.getType());
    }
View Full Code Here

TOP

Related Classes of org.mule.module.db.internal.domain.param.InputQueryParam

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.