Examples of database()


Examples of com.couchace.core.api.CouchServer.database()

            File keystoreFile = new File(moduleDir, "src/test/resources/couch-test.jks");
            couchSetup.ssl(keystoreFile.getAbsolutePath(), TestSetup.storePass);
        }

        CouchServer couchServer = new CouchServer(couchSetup);
        couchDatabase = couchServer.database(TestSetup.databaseName);

        byte[] imageBytes = TestSetup.singleton().getImageBytes();
        personEntityOne = new PersonEntity(eventBus, logger, documentOneId, null, "OPEN", "Fish", "Farmer", attachmentHtml, imageBytes, addressEntityRef);
        personEntityTwo = new PersonEntity(eventBus, logger, documentTwoId, null, "OPEN", "Elephant", "Farmer", attachmentHtml, imageBytes, addressEntityRef);
        personEntityThree = new PersonEntity(eventBus, logger, documentThreeId, null, "CLOSED", "Duck", "Hunter", attachmentHtml, imageBytes, addressEntityRef);
View Full Code Here

Examples of com.github.zhongl.hs4j.kit.annotations.Repository.database()

  private void scanAndMapMethodToInvacationHandlerWith(Class<?> clazz) {
    final Repository repository = clazz.getAnnotation(Repository.class);
    if (repository == null)
      throw new IllegalArgumentException(Repository.class + " should be annotated to class: " + clazz);
    final String database = repository.database();
    final String table = repository.table();
    Method[] methods = clazz.getMethods();
    for (Method method : methods) {
      InvocationHandler handler = createInvocationHandlerWith(method, database, table);
      if ((handler == null)) continue; // no need to map, so skip.
View Full Code Here

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

        Enumeration cosEnum = osc.cooperatingObjectStores().objectEnumerator();
        while (cosEnum.hasMoreElements()) {
          EOCooperatingObjectStore cos = (EOCooperatingObjectStore) cosEnum.nextElement();
          if (cos instanceof ERXDatabaseContext) {
            EODatabaseContext dbc = (EODatabaseContext) cos;
            ERXDatabase db = (ERXDatabase) dbc.database();
            NSArray cacheChanges = ERXObjectStoreCoordinatorSynchronizer.dequeueCacheChanges(db);
            if (cacheChanges != null) {
              _localCacheChanges.addObjectsFromArray(cacheChanges);
            }
          }
View Full Code Here

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

     */
    public static void clearSnapshotForRelationshipNamed(EOEnterpriseObject eo, String relationshipName) {
        EOEditingContext ec = eo.editingContext();
        EOModel model = EOUtilities.entityForObject(ec, eo).model();
        EODatabaseContext dbc = EODatabaseContext.registeredDatabaseContextForModel(model, ec);
        EODatabase database = dbc.database();
        ERXEOControlUtilities.clearSnapshotForRelationshipNamedInDatabase(eo, relationshipName, database);
    }

    /**
     * Clears snapshot the relationship of a given enterprise so it will be read again when next accessed.
View Full Code Here

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

            aggregateValue = __aggregateFunctionWithQualifierAndAggregateAttribute(dbc, ec, entityName, qualifier, aggregateAttribute);
        }
        catch (Exception localException) {
            if (dbc._isDroppedConnectionException(localException)) {
                try {
                    dbc.database().handleDroppedConnection();
                    aggregateValue = __aggregateFunctionWithQualifierAndAggregateAttribute(dbc, ec, entityName, qualifier, aggregateAttribute);
                }
                catch(Exception ex) {
                    throw NSForwardException._runtimeExceptionForThrowable(ex);
                }
View Full Code Here

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

              }
              catch (Exception localException) {
                if (willRetryAfterHandlingDroppedConnection &&
                    dbContext._isDroppedConnectionException(localException)) {
                      try {
                        dbContext.database().handleDroppedConnection();
                         
                      }
                      catch(Exception ex) {
                          throw NSForwardException._runtimeExceptionForThrowable(ex);
                      }
View Full Code Here

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

            String entityName = (String)entitiesEnumerator.nextElement();
            if (! ERCNSnapshot.shouldSynchronizeEntity(entityName))   continue;

            EOEntity entity = EOModelGroup.defaultGroup().entityNamed(entityName);
            EODatabaseContext dbContext = ERCNNotificationCoordinator.databaseContextForEntityNamed(entityName, ec);
            EODatabase database = dbContext.database();
            NSArray snapshots = (NSArray)ercnSnapshot.shapshotsForUpdateGroupedByEntity().objectForKey(entityName);
            Enumeration snapshotsEnumerator = snapshots.objectEnumerator();
            while (snapshotsEnumerator.hasMoreElements()) {
                NSDictionary snapshot = (NSDictionary)snapshotsEnumerator.nextElement();
                if (NSLog.debug.isEnabled())
View Full Code Here

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

        EODatabaseContext dbc = (EODatabaseContext) dbcs.objectForKey(key);
        if (dbc == null) {
          dbc = ERXEOAccessUtilities.databaseContextForEntityNamed(osc, entityName);
          dbcs.setObjectForKey(dbc, key);
        }
        EODatabase database = dbc.database();
        NSMutableDictionary snapshotsByGlobalID = new NSMutableDictionary();
        for (Enumeration snapshotsEnumerator = snapshots.objectEnumerator(); snapshotsEnumerator.hasMoreElements();) {
          NSDictionary snapshot = (NSDictionary) snapshotsEnumerator.nextElement();
          EOGlobalID globalID = entity.globalIDForRow(snapshot);
          snapshotsByGlobalID.setObjectForKey(snapshot, globalID);
View Full Code Here

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

        Enumeration cacheChangeEnum = remoteChange.remoteCacheChanges().objectEnumerator();
        while (cacheChangeEnum.hasMoreElements()) {
          ERXDatabase.CacheChange cacheChange = (ERXDatabase.CacheChange) cacheChangeEnum.nextElement();
          EOKeyGlobalID gid = (EOKeyGlobalID) cacheChange.gid();
          EODatabaseContext dbc = ERXEOAccessUtilities.databaseContextForEntityNamed(osc, gid.entityName());
          EODatabase database = dbc.database();
          dbc.lock();
          try {
            if (cacheChange instanceof ERXDatabase.SnapshotInserted) {
              _insertCacheChangeProcessor.processCacheChange(dbc, database, cacheChange);
            }
View Full Code Here

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

            results = _rawRowsForSQLExpression(dbc, expression, attributes);
        }
        catch (Exception localException) {
            if (dbc._isDroppedConnectionException(localException)) {
                try {
                    dbc.database().handleDroppedConnection();
                    results = _rawRowsForSQLExpression(dbc, expression, attributes);
                }
                catch(Exception ex) {
                    throw NSForwardException._runtimeExceptionForThrowable(ex);
                }
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.