Examples of CouchDBDataStore


Examples of org.hibernate.ogm.datastore.couchdb.dialect.backend.impl.CouchDBDatastore

  }

  @Override
  public Map<String, Object> extractEntityTuple(SessionFactory sessionFactory, EntityKey key) {
    Map<String, Object> tupleMap = new HashMap<String, Object>();
    CouchDBDatastore dataStore = getDataStore( sessionFactory );
    EntityDocument entity = dataStore.getEntity( Identifier.createEntityId( key ) );
    CouchDBTupleSnapshot snapshot = new CouchDBTupleSnapshot( entity.getProperties() );
    Set<String> columnNames = snapshot.getColumnNames();
    for ( String columnName : columnNames ) {
      tupleMap.put( columnName, snapshot.get( columnName ) );
    }
View Full Code Here

Examples of org.hibernate.ogm.datastore.couchdb.dialect.backend.impl.CouchDBDatastore

  }

  @Override
  public void initializeSchema(Configuration configuration, SessionFactoryImplementor factory) {
    CouchDBDatastoreProvider datastoreProvider = (CouchDBDatastoreProvider) factory.getServiceRegistry().getService( DatastoreProvider.class );
    CouchDBDatastore dataStore = datastoreProvider.getDataStore();

    // create tuple design document if required
    if ( !dataStore.exists( TuplesDesignDocument.DOCUMENT_ID, true ) ) {
      dataStore.saveDocument( new TuplesDesignDocument() );
    }
  }
View Full Code Here

Examples of org.hibernate.ogm.datastore.couchdb.dialect.backend.impl.CouchDBDatastore

  }

  @Override
  public void initializeSchema(Configuration configuration, SessionFactoryImplementor factory) {
    CouchDBDatastoreProvider datastoreProvider = (CouchDBDatastoreProvider) factory.getServiceRegistry().getService( DatastoreProvider.class );
    CouchDBDatastore dataStore = datastoreProvider.getDataStore();

    // create tuple design document if required
    if ( !dataStore.exists( TuplesDesignDocument.DOCUMENT_ID, true ) ) {
      dataStore.saveDocument( new TuplesDesignDocument() );
    }
  }
View Full Code Here

Examples of org.jboss.aerogear.simplepush.server.datastore.CouchDBDataStore

    public synchronized void start(StartContext context) throws StartException {
    }

    @Override
    public synchronized DataStore getValue() throws IllegalStateException, IllegalArgumentException {
        return new CouchDBDataStore(url, dbName);
    }
View Full Code Here

Examples of org.jboss.aerogear.simplepush.server.datastore.CouchDBDataStore

        if (redis != null) {
            return new RedisDataStore(redis.get("host").asText(), redis.get("port").asInt());
        }
        final JsonNode couchdb = dataStore.get("couchdb");
        if (couchdb != null) {
            return new CouchDBDataStore(couchdb.get("url").asText(), couchdb.get("dbName").asText());
        }
        final JsonNode jpa = dataStore.get("jpa");
        if (jpa != null) {
            return new JpaDataStore(jpa.get("persistenceUnit").asText());
        }
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.