Package org.apache.cayenne.access

Examples of org.apache.cayenne.access.ObjectStore$SnapshotEventDecorator


                .getSharedSnapshotCache() : new DataRowStore(
                dataDomain.getName(),
                dataDomain.getProperties(),
                eventManager);

        DataContext context = new DataContext(parent, new ObjectStore(snapshotCache));
        context.setValidatingObjectsOnCommit(dataDomain.isValidatingObjectsOnCommit());
        context.setQueryCache(injector.getInstance(Key.get(
                QueryCache.class,
                BaseContext.QUERY_CACHE_INJECTION_KEY)));
        return context;
View Full Code Here


    }

    protected ObjectContext createFromDataContext(DataContext parent) {
        // child ObjectStore should not have direct access to snapshot cache, so do not
        // pass it in constructor.
        ObjectStore objectStore = new ObjectStore();

        DataContext context = new DataContext(parent, objectStore);

        context.setValidatingObjectsOnCommit(parent.isValidatingObjectsOnCommit());
        context.setUsingSharedSnapshotCache(parent.isUsingSharedSnapshotCache());
View Full Code Here

        // it makes it easier to track the event subject
        DataRowStore snapshotCache = (parent.isSharedCacheEnabled()) ? parent
                .getSharedSnapshotCache() : new DataRowStore(parent.getName(), parent
                .getProperties(), eventManager);

        DataContext context = new DataContext(parent, new ObjectStore(snapshotCache));
        context.setValidatingObjectsOnCommit(parent.isValidatingObjectsOnCommit());
        context.setQueryCache(injector.getInstance(Key.get(
                QueryCache.class,
                BaseContext.QUERY_CACHE_INJECTION_KEY)));
        return context;
View Full Code Here

    protected ObjectMapRetainStrategy retainStrategy;
   
    public ObjectStore createObjectStore(DataRowStore dataRowCache) {
        boolean sync = runtimeProperties.getBoolean(SYNC_PROPERTY, true);
       
        return sync ? new ObjectStore(dataRowCache, retainStrategy.createObjectMap())
                : new NoSyncObjectStore(dataRowCache, retainStrategy.createObjectMap());
    }
View Full Code Here

    }

    protected ObjectContext createFromDataContext(DataContext parent) {
        // child ObjectStore should not have direct access to snapshot cache, so do not
        // pass it in constructor.
        ObjectStore objectStore = objectStoreFactory.createObjectStore(null);

        DataContext context = new DataContext(parent, objectStore);

        context.setValidatingObjectsOnCommit(parent.isValidatingObjectsOnCommit());
        context.setUsingSharedSnapshotCache(parent.isUsingSharedSnapshotCache());
View Full Code Here

                .getSharedSnapshotCache() : new DataRowStore(
                dataDomain.getName(),
                dataDomain.getProperties(),
                eventManager);

        DataContext context = new DataContext(parent, new ObjectStore(snapshotCache));
        context.setValidatingObjectsOnCommit(dataDomain.isValidatingObjectsOnCommit());

        injector.injectMembers(context);

        return context;
View Full Code Here

    }

    protected ObjectContext createFromDataContext(DataContext parent) {
        // child ObjectStore should not have direct access to snapshot cache, so do not
        // pass it in constructor.
        ObjectStore objectStore = new ObjectStore();

        DataContext context = new DataContext(parent, objectStore);

        context.setValidatingObjectsOnCommit(parent.isValidatingObjectsOnCommit());
        context.setUsingSharedSnapshotCache(parent.isUsingSharedSnapshotCache());
View Full Code Here

        // it makes it easier to track the event subject
        DataRowStore snapshotCache = (parent.isSharedCacheEnabled()) ? parent
                .getSharedSnapshotCache() : new DataRowStore(parent.getName(), parent
                .getProperties(), eventManager);

        DataContext context = new DataContext(parent, new ObjectStore(snapshotCache));
        context.setValidatingObjectsOnCommit(parent.isValidatingObjectsOnCommit());

        injector.injectMembers(context);

        return context;
View Full Code Here

     * environment.
     */
    protected ObjectContext createObjectContext() {
        DataChannelCallbackInterceptor postInterceptor = new DataChannelCallbackInterceptor();
        postInterceptor.setChannel(domain);
        ObjectStore objectStore = new ObjectStore(domain.getSharedSnapshotCache());

        ObjectContextCallbackInterceptor preInterceptor = new ObjectContextCallbackInterceptor();
        preInterceptor.setContext(new DataContext(postInterceptor, objectStore));

        return preInterceptor;
View Full Code Here

                            public ObjectContext createContext(DataChannel parent) {
                                return null;
                            }

                            public ObjectContext createContext() {
                                return new DataContext(channel, new ObjectStore());
                            }
                        });
            }
        };
View Full Code Here

TOP

Related Classes of org.apache.cayenne.access.ObjectStore$SnapshotEventDecorator

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.