Examples of SelectExecutor


Examples of org.apache.openjpa.jdbc.sql.SelectExecutor

        }

        // select the mappings in the given fields set, or based on fetch
        // configuration if no fields given
        FieldMapping[] fms = mapping.getDefinedFieldMappings();
        SelectExecutor esel;
        int fseld;
        for (int i = 0; i < fms.length; i++) {
            // skip eager to-many select; we do that separately in calling
            // method
            if (fms[i] == eagerToMany)
View Full Code Here

Examples of org.apache.openjpa.jdbc.sql.SelectExecutor

        }

        // select the mappings in the given fields set, or based on fetch
        // configuration if no fields given
        FieldMapping[] fms = mapping.getDefinedFieldMappings();
        SelectExecutor esel;
        int fseld;
        for (int i = 0; i < fms.length; i++) {
            // skip eager to-many select; we do that separately in calling
            // method
            if (fms[i] == eagerToMany)
View Full Code Here

Examples of org.apache.openjpa.jdbc.sql.SelectExecutor

        }

        // select the mappings in the given fields set, or based on fetch
        // configuration if no fields given
        FieldMapping[] fms = mapping.getDefinedFieldMappings();
        SelectExecutor esel;
        int fseld;
        for (int i = 0; i < fms.length; i++) {
            // skip eager to-many select; we do that separately in calling
            // method
            if (fms[i] == eagerToMany)
View Full Code Here

Examples of org.apache.openjpa.jdbc.sql.SelectExecutor

     */
    public Exclusion initialize(Object result) {
        if (isInitialized())
            return null;
        Object[] extract = extractSelectExecutor(result);
        SelectExecutor selector = (SelectExecutor)extract[0];
        if (selector == null)
            return new PreparedQueryCacheImpl.StrongExclusion(_id, ((Localizer.Message)extract[1]).getMessage());
        if (selector == null || selector.hasMultipleSelects()
            || ((selector instanceof Union)
            && (((Union)selector).getSelects().length != 1)))
            return new PreparedQueryCacheImpl.StrongExclusion(_id, _loc.get("exclude-multi-select").getMessage());
        select = extractImplementation(selector);
        if (select == null)
            return new PreparedQueryCacheImpl.StrongExclusion(_id, _loc.get("exclude-no-select").getMessage());
        SQLBuffer buffer = selector.getSQL();
        if (buffer == null)
            return new PreparedQueryCacheImpl.StrongExclusion(_id, _loc.get("exclude-no-sql").getMessage());;
        setTargetQuery(buffer.getSQL());
        setParameters(buffer.getParameters());
        setUserParameterPositions(buffer.getUserParameters());
View Full Code Here

Examples of org.apache.openjpa.jdbc.sql.SelectExecutor

        }

        // select the mappings in the given fields set, or based on fetch
        // configuration if no fields given
        FieldMapping[] fms = mapping.getDefinedFieldMappings();
        SelectExecutor esel;
        int fseld;
        for (int i = 0; i < fms.length; i++) {
            // skip eager to-many select; we do that separately in calling
            // method
            if (fms[i] == eagerToMany)
View Full Code Here

Examples of org.jruby.util.io.SelectExecutor

            double tmp = _timeout.convertToFloat().getDoubleValue();
            if (tmp < 0) throw context.runtime.newArgumentError("negative timeout");
            timeout = (long)(tmp * 1000); // ms
        }

        SelectExecutor args = new SelectExecutor(read, write, except, timeout);

        return args.go(context);
    }
View Full Code Here

Examples of org.mule.module.db.internal.domain.executor.SelectExecutor

    public void testCommitsWorkIfNoTransactionDefined() throws Exception
    {
        DbConnection connection = mock(DbConnection.class);
        DbConnectionFactory dbConnectionFactory = mock(DbConnectionFactory.class);
        when(dbConnectionFactory.createConnection(TransactionalAction.JOIN_IF_POSSIBLE)).thenReturn(connection);
        SelectExecutor selectExecutor = mock(SelectExecutor.class);

        SelectMessageProcessor processor = new SelectMessageProcessor(null, null, null, null, false);
        MuleEvent event = mock(MuleEvent.class);
        MuleMessage muleMessage = mock(MuleMessage.class);
        when(event.getMessage()).thenReturn(muleMessage);
View Full Code Here

Examples of org.mule.module.db.internal.domain.executor.SelectExecutor

        DbConnection connection = mock(DbConnection.class);

        ResultSetHandler resultHandler = mock(ResultSetHandler.class);
        List<Object> processedResult = new ArrayList<Object>();
        when(resultHandler.processResultSet(connection, resultSet)).thenReturn(processedResult);
        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
TOP
Copyright © 2018 www.massapi.com. 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.