Examples of firstList()


Examples of org.apache.cayenne.QueryResponse.firstList()

        }

        // skip context cache lookup, go directly to its channel
        Query query = new ObjectIdQuery((ObjectId) nodeId);
        QueryResponse response = context.getChannel().onQuery(context, query);
        List objects = response.firstList();

        if (objects.size() == 0) {
            throw new CayenneRuntimeException("No object for ID exists: " + nodeId);
        }
        else if (objects.size() > 1) {
View Full Code Here

Examples of org.apache.cayenne.QueryResponse.firstList()

        }

        // skip context cache lookup, go directly to its channel
        Query query = new ObjectIdQuery((ObjectId) nodeId);
        QueryResponse response = context.getChannel().onQuery(context, query);
        List objects = response.firstList();

        if (objects.size() == 0) {
            throw new CayenneRuntimeException("No object for ID exists: " + nodeId);
        }
        else if (objects.size() > 1) {
View Full Code Here

Examples of org.apache.cayenne.QueryResponse.firstList()

        ObjectIdQuery query = new ObjectIdQuery(
                object.getObjectId(),
                true,
                ObjectIdQuery.CACHE);
        QueryResponse response = context.getChannel().onQuery(null, query);
        List<?> result = response.firstList();
        if (result == null || result.size() == 0) {
            return null;
        }

        DataRow snapshot = (DataRow) result.get(0);
View Full Code Here

Examples of org.apache.cayenne.QueryResponse.firstList()

        }

        // skip context cache lookup, go directly to its channel
        Query query = new ObjectIdQuery((ObjectId) nodeId);
        QueryResponse response = context.getChannel().onQuery(context, query);
        List objects = response.firstList();

        if (objects.size() == 0) {
            throw new CayenneRuntimeException("No object for ID exists: " + nodeId);
        }
        else if (objects.size() > 1) {
View Full Code Here

Examples of org.apache.cayenne.QueryResponse.firstList()

        ObjectIdQuery query = new ObjectIdQuery(
                object.getObjectId(),
                true,
                ObjectIdQuery.CACHE);
        QueryResponse response = context.getChannel().onQuery(null, query);
        List<?> result = response.firstList();
        if (result == null || result.size() == 0) {
            return null;
        }

        DataRow snapshot = (DataRow) result.get(0);
View Full Code Here

Examples of org.apache.cayenne.QueryResponse.firstList()

        // select directly from the channel, bypassing the context. Otherwise our query
        // wrapper can be intercepted incorrectly
        QueryResponse response = context.getChannel().onQuery(context, query);

        List firstPage = response.firstList();

        // sanity check
        if (firstPage.size() > pageSize) {
            throw new IllegalArgumentException("Returned page size ("
                    + firstPage.size()
View Full Code Here

Examples of org.apache.cayenne.QueryResponse.firstList()

        ObjectIdQuery query = new ObjectIdQuery(
                object.getObjectId(),
                true,
                ObjectIdQuery.CACHE);
        QueryResponse response = context.getChannel().onQuery(null, query);
        List<?> result = response.firstList();
        if (result == null || result.size() == 0) {
            return null;
        }

        DataRow snapshot = (DataRow) result.get(0);
View Full Code Here

Examples of org.apache.cayenne.QueryResponse.firstList()

        // select directly from the channel, bypassing the context. Otherwise our query
        // wrapper can be intercepted incorrectly
        QueryResponse response = context.getChannel().onQuery(context, query);

        List firstPage = response.firstList();

        // sanity check
        if (firstPage.size() > pageSize) {
            throw new IllegalArgumentException("Returned page size ("
                    + firstPage.size()
View Full Code Here

Examples of org.apache.cayenne.QueryResponse.firstList()

        }

        // skip context cache lookup, go directly to its channel
        Query query = new ObjectIdQuery((ObjectId) nodeId);
        QueryResponse response = context.getChannel().onQuery(context, query);
        List objects = response.firstList();

        if (objects.size() == 0) {
            throw new CayenneRuntimeException("No object for ID exists: " + nodeId);
        }
        else if (objects.size() > 1) {
View Full Code Here

Examples of org.apache.cayenne.QueryResponse.firstList()

        Query query = new SelectQuery("MtTable1");
        QueryResponse response = new ClientServerChannel(context).onQuery(null, query);

        assertNotNull(response);

        List results = response.firstList();

        assertNotNull(results);
        assertEquals(1, results.size());

        Object result = results.get(0);
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.