Package org.apache.cayenne

Examples of org.apache.cayenne.MockDataChannelFilter


        DataDomain domain = runtime.getDataDomain();

        final List<String> results = new ArrayList<String>();

        DataChannelFilter f1 = new MockDataChannelFilter() {

            @Override
            public QueryResponse onQuery(
                    ObjectContext originatingContext,
                    Query query,
                    DataChannelFilterChain filterChain) {

                results.add("f1start");
                QueryResponse response = filterChain.onQuery(originatingContext, query);
                results.add("f1end");
                return response;
            }
        };

        DataChannelFilter f2 = new MockDataChannelFilter() {

            @Override
            public QueryResponse onQuery(
                    ObjectContext originatingContext,
                    Query query,
View Full Code Here


        DataDomain domain = runtime.getDataDomain();

        final List<String> results = new ArrayList<String>();

        DataChannelFilter f1 = new MockDataChannelFilter() {

            @Override
            public GraphDiff onSync(
                    ObjectContext originatingContext,
                    GraphDiff changes,
                    int syncType,
                    DataChannelFilterChain filterChain) {

                results.add("f1start");
                GraphDiff response = filterChain.onSync(
                        originatingContext,
                        changes,
                        syncType);
                results.add("f1end");
                return response;
            }
        };

        DataChannelFilter f2 = new MockDataChannelFilter() {

            @Override
            public GraphDiff onSync(
                    ObjectContext originatingContext,
                    GraphDiff changes,
View Full Code Here

        DataDomain domain = runtime.getDataDomain();

        final QueryResponse r1 = new ListResponse();
        final QueryResponse r2 = new ListResponse();

        DataChannelFilter f1 = new MockDataChannelFilter() {

            @Override
            public QueryResponse onQuery(
                    ObjectContext originatingContext,
                    Query query,
                    DataChannelFilterChain filterChain) {

                return r1;
            }
        };

        DataChannelFilter f2 = new MockDataChannelFilter() {

            @Override
            public QueryResponse onQuery(
                    ObjectContext originatingContext,
                    Query query,
View Full Code Here

TOP

Related Classes of org.apache.cayenne.MockDataChannelFilter

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.