Examples of ListResponse


Examples of org.apache.cayenne.util.ListResponse

    }

    @Override
    protected boolean interceptPaginatedQuery() {
        if (metadata.getPageSize() > 0) {
            response = new ListResponse(new RemoteIncrementalFaultList(
                    actingContext,
                    query));
            return DONE;
        }
View Full Code Here

Examples of org.apache.cayenne.util.ListResponse

        return response;
    }

    private boolean interceptDataDomainQuery() {
        if (query instanceof DataDomainQuery) {
            response = new ListResponse(domain);
            return DONE;
        }

        return !DONE;
    }
View Full Code Here

Examples of org.apache.cayenne.util.ListResponse

            // special handling of temp ids... Return an empty list immediately so that
            // upstream code could throw FaultFailureException, etc. Don't attempt to
            // translate and run the query. See for instance CAY-1651
            if (oid.isTemporary() && !oid.isReplacementIdAttached()) {
                response = new ListResponse();
                return DONE;
            }

            DataRow row = null;

            if (cache != null && !oidQuery.isFetchMandatory()) {
                row = cache.getCachedSnapshot(oidQuery.getObjectId());
            }

            // refresh is forced or not found in cache
            if (row == null) {

                if (oidQuery.isFetchAllowed()) {

                    runQueryInTransaction();
                }
                else {
                    response = new ListResponse();
                }
            }
            else {
                response = new ListResponse(row);
            }

            return DONE;
        }
View Full Code Here

Examples of org.apache.cayenne.util.ListResponse

            List cachedResults = queryCache.get(metadata, factory);

            // response may already be initialized by the factory above ... it is null if
            // there was a preexisting cache entry
            if (response == null) {
                response = new ListResponse(cachedResults);
            }

            if (cachedResults instanceof ListWithPrefetches) {
                this.prefetchResultsByPath = ((ListWithPrefetches) cachedResults)
                        .getPrefetchResultsByPath();
View Full Code Here

Examples of org.apache.cayenne.util.ListResponse

        protected void updateResponse(List sourceObjects, List targetObjects) {
            if (response instanceof GenericResponse) {
                ((GenericResponse) response).replaceResult(sourceObjects, targetObjects);
            }
            else if (response instanceof ListResponse) {
                response = new ListResponse(targetObjects);
            }
            else {
                throw new IllegalStateException("Unknown response object: " + response);
            }
        }
View Full Code Here

Examples of org.apache.cayenne.util.ListResponse

    }

    @Override
    protected boolean interceptPaginatedQuery() {
        if (metadata.getPageSize() > 0) {
            response = new ListResponse(new RemoteIncrementalFaultList(
                    actingContext,
                    query));
            return DONE;
        }
View Full Code Here

Examples of org.apache.cayenne.util.ListResponse

                    // do not return hollow objects
                    else if (((Persistent) object).getPersistenceState() == PersistenceState.HOLLOW) {
                        return !DONE;
                    }

                    this.response = new ListResponse(object);
                    return DONE;
                }
            }
        }
View Full Code Here

Examples of org.apache.cayenne.util.ListResponse

                    ? new SimpleIdIncrementalFaultList<Object>(
                            (DataContext) actingContext,
                            query)
                    : new IncrementalFaultList<Object>((DataContext) actingContext, query);

            response = new ListResponse(paginatedList);
            return DONE;
        }

        return !DONE;
    }
View Full Code Here

Examples of org.apache.james.imap.message.response.ListResponse

        final String mailboxPatternString = request.getMailboxPattern();
        doProcess(baseReferenceName, mailboxPatternString, session, tag, command, responder, null);
    }

    protected ImapResponseMessage createResponse(boolean noInferior, boolean noSelect, boolean marked, boolean unmarked, boolean hasChildren, boolean hasNoChildren, String mailboxName, char delimiter, MailboxType type) {
        return new ListResponse(noInferior, noSelect, marked, unmarked, hasChildren, hasNoChildren, mailboxName, delimiter);
    }
View Full Code Here

Examples of org.apache.james.imap.message.response.ListResponse

        encoder = new ListResponseEncoder(mockNextEncoder);
    }

    @Test
    public void testIsAcceptable() {
        assertTrue(encoder.isAcceptable(new ListResponse(true, true, true,
                true, false, false, "name", '.')));
        assertFalse(encoder.isAcceptable(new LSubResponse("name", true, '.')));
        assertFalse(encoder.isAcceptable(context.mock(ImapMessage.class)));
        assertFalse(encoder.isAcceptable(null));
    }
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.