Package com.webobjects.eoaccess

Examples of com.webobjects.eoaccess.EODatabaseContext.snapshotForGlobalID()


        String aModelName = anEntity.model().name();
        EODatabaseContext aDatabaseContext = EOUtilities
            .databaseContextForModelNamed(anEditingContext,
                aModelName);
        aDatabaseContext.lock();
        NSDictionary aRow = aDatabaseContext
            .snapshotForGlobalID(aGlobalID);
        aDatabaseContext.unlock();
        EOQualifier aQualifier = aRelationship
            .qualifierWithSourceRow(aRow);
View Full Code Here


          if (snapshotsForEntity == null) {
            snapshotsForEntity = new NSMutableArray();
            result.setObjectForKey(snapshotsForEntity, entityName);
          }
          synchronized (snapshotsForEntity) {
            Object o = dbc.snapshotForGlobalID(globalID);
            if (o != null) {
              snapshotsForEntity.addObject(o);
            }
          }
        }
View Full Code Here

                NSMutableArray snapshotsForEntity = (NSMutableArray)result.objectForKey(entityName);
                if (snapshotsForEntity == null) {
                    snapshotsForEntity = new NSMutableArray();
                    result.setObjectForKey(snapshotsForEntity, entityName);
                }
                NSDictionary snapshot = dbContext.snapshotForGlobalID(globalID);
                if (snapshot != null) {
                    snapshotsForEntity.addObject(snapshot);
                    _entryCount++;
                }
            }
View Full Code Here

          EOAttribute attribute = relationship.sourceAttributes().lastObject();
          EODatabaseContext context = EOUtilities.databaseContextForModelNamed(ec, entity.model().name());
          String name = attribute.name();
          for (Enumeration e = eos.objectEnumerator(); e.hasMoreElements();) {
            EOEnterpriseObject target = (EOEnterpriseObject) e.nextElement();
            Object value = (context.snapshotForGlobalID(ec.globalIDForObject(target))).valueForKey(name);
            result.addObject(value);
          }
        } else {
          throw new IllegalArgumentException("Has more than one relationship attribute: " + relKey);
        }
View Full Code Here

              else {
                NSDictionary row;
                    EODatabaseContext databaseContext = (EODatabaseContext) ((EOObjectStoreCoordinator) ec.rootObjectStore()).objectStoreForGlobalID(g);
                    databaseContext.lock();
                    try {
                  row = databaseContext.snapshotForGlobalID(g, ec.fetchTimestamp());
                    }
                    finally {
                      databaseContext.unlock();
                    }
                if (row == null) {
View Full Code Here

        NSDictionary snapshot = ERXEOAccessUtilities.executeDatabaseContextOperation(dbc, 2,
                new DatabaseContextOperation<NSDictionary>() {
                    public NSDictionary execute(EODatabaseContext databaseContext) throws Exception {
                        // Search for and return the snapshot
                        return dbc.snapshotForGlobalID(gid, ec.fetchTimestamp());
                    }
                });
        return snapshot;
    }
   
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.