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

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


        {
            overriddenParam = new DefaultInputQueryParam(templateParam.getIndex(), paramType, ((InputQueryParam) queryParam).getValue(), templateParam.getName());
        }
        else
        {
            overriddenParam = new DefaultOutputQueryParam(templateParam.getIndex(), paramType, templateParam.getName());
        }

        return overriddenParam;
    }
View Full Code Here


            {
                newParam = new DefaultInputQueryParam(originalParam.getIndex(), type, ((InputQueryParam) originalParam).getValue(), originalParam.getName());
            }
            else if (originalParam instanceof OutputQueryParam)
            {
                newParam = new DefaultOutputQueryParam(originalParam.getIndex(), type, originalParam.getName());
            }
            else
            {
                throw new IllegalArgumentException("Unknown parameter type: " + originalParam.getClass().getName());
View Full Code Here

    {
        when(statement.getResultSet()).thenReturn(null);
        when(statement.getUpdateCount()).thenReturn(StatementResultIterator.NO_UPDATE_COUNT);
        when(statement.getObject(1)).thenReturn(7);

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

        QueryTemplate queryTemplate = new QueryTemplate("dummy", QueryType.STORE_PROCEDURE_CALL, params);
View Full Code Here

        return factoryBean.getObject();
    }

    private void doOutputParamOverrideTest(DbType templateParamType, DbType overriddenParamType, DbType expectedParamType) throws Exception
    {
        QueryParam overriddenParam = new DefaultOutputQueryParam(2, overriddenParamType, POSITION_PARAM_NAME);

        List<QueryParam> defaultParams = Collections.<QueryParam>singletonList(new DefaultInputQueryParam(1, templateParamType, TEMPLATE_PARAM_VALUE, POSITION_PARAM_NAME));
        QueryTemplate queryTemplate = new QueryTemplate(PARSED_PARAMETERIZED_QUERY, QueryType.SELECT, defaultParams);

        QueryTemplateParser queryParser = mock(QueryTemplateParser.class);
View Full Code Here

    public void detectHasOutputParam() throws Exception
    {
        when(statement.getResultSet()).thenReturn(null);
        when(statement.getUpdateCount()).thenReturn(StatementResultIterator.NO_UPDATE_COUNT);

        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);
View Full Code Here

        int paramValue = 7;
        when(statement.getResultSet()).thenReturn(null);
        when(statement.getUpdateCount()).thenReturn(StatementResultIterator.NO_UPDATE_COUNT);
        when(statement.getObject(1)).thenReturn(7);

        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);
View Full Code Here

TOP

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

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.