Package org.apache.cayenne.util

Examples of org.apache.cayenne.util.ListResponse


    }

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


    }

    private boolean interceptObjectFromDataRowsQuery() {
        if (query instanceof ObjectsFromDataRowsQuery) {
            ObjectsFromDataRowsQuery objectsFromDataRowsQuery = (ObjectsFromDataRowsQuery) query;
            response = new ListResponse(actingDataContext.objectsFromDataRows(
                    objectsFromDataRowsQuery.getDescriptor(),
                    objectsFromDataRowsQuery.getDataRows()));
            return DONE;
        }
        return !DONE;
View Full Code Here

                    // 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

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

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

        return !DONE;
    }
View Full Code Here

                    if (oidQuery.isFetchingDataRows()) {
                        object = ((DataContext) actingContext)
                                .currentSnapshot((DataObject) object);
                    }

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

        return !DONE;
    }

    private boolean interceptPaginatedQuery() {
        if (metadata.getPageSize() > 0) {
            response = new ListResponse(new IncrementalFaultList(
                    (DataContext) actingContext,
                    query));
            return DONE;
        }
View Full Code Here

        ObjectStore objectStore = ((DataContext) actingContext).getObjectStore();
        if (cache) {

            List cachedResults = objectStore.getCachedQueryResult(cacheKey);
            if (cachedResults != null) {
                response = new ListResponse(cachedResults);
                return DONE;
            }
        }

        runQuery();
View Full Code Here

                if (oidQuery.isFetchAllowed()) {

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

            return DONE;
        }
View Full Code Here

        if (cache) {
            List cachedRows = this.cache.getCachedSnapshots(cacheKey);

            if (cachedRows != null) {
                // decorate result immutable list to avoid messing up the cache
                this.response = new ListResponse(Collections.unmodifiableList(cachedRows));

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

                if (response instanceof GenericResponse) {
                    ((GenericResponse) response).replaceResult(mainRows, objects);
                }
                else if (response instanceof ListResponse) {
                    this.response = new ListResponse(objects);
                }
                else {
                    throw new IllegalStateException("Unknown response object: "
                            + this.response);
                }
View Full Code Here

TOP

Related Classes of org.apache.cayenne.util.ListResponse

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.