Package org.apache.cayenne.access

Examples of org.apache.cayenne.access.ObjectStore


    protected ObjectMapRetainStrategy retainStrategy;
   
    public ObjectStore createObjectStore(DataRowStore dataRowCache) {
        boolean sync = runtimeProperties.getBoolean(Constants.SERVER_CONTEXTS_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 = newInstance(parent, objectStore);

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

  public DataContext getDataContext()
  {
    if (dataContext == null)
    {
      DataDomain domain = cayenneConfiguration.getDomain();
      dataContext = new DataContext(domain, new ObjectStore(domain.getSharedSnapshotCache()));

      dataContext.setValidatingObjectsOnCommit(true);

      LogUtil.debug(getClass(), "Opened Cayenne session $0.", dataContext);
    }
View Full Code Here

TOP

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

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.