Package org.hibernate.ogm.datastore.couchdb.utils.backend.facade

Examples of org.hibernate.ogm.datastore.couchdb.utils.backend.facade.DatabaseTestClient


  public long getNumberOfEntities(SessionFactory sessionFactory) {
    return getNumberOfEntities( getDataStore( sessionFactory ) );
  }

  public long getNumberOfEntities(CouchDBDatastore dataStore) {
    DatabaseTestClient databaseTestClient = getDatabaseTestClient( dataStore );

    Response response = null;

    try {
      response = databaseTestClient.getNumberOfEntities();
      if ( response.getStatus() == Response.Status.OK.getStatusCode() ) {
        return response.readEntity( EntityCountResponse.class ).getCount();
      }
      else {
        GenericResponse responseEntity = response.readEntity( GenericResponse.class );
View Full Code Here


    }
  }

  @Override
  public long getNumberOfAssociations(SessionFactory sessionFactory, AssociationStorageType type) {
    DatabaseTestClient databaseTestClient = getDatabaseTestClient( getDataStore( sessionFactory ) );
    Long count = getNumberOfAssociations( databaseTestClient ).get( type );
    return count != null ? count : 0;
  }
View Full Code Here

    return count != null ? count : 0;
  }

  @Override
  public long getNumberOfAssociations(SessionFactory sessionFactory) {
    DatabaseTestClient databaseTestClient = getDatabaseTestClient( getDataStore( sessionFactory ) );

    Map<AssociationStorageType, Long> associationCountByType = getNumberOfAssociations( databaseTestClient );
    long totalCount = 0;
    for ( long count : associationCountByType.values() ) {
      totalCount += count;
View Full Code Here

TOP

Related Classes of org.hibernate.ogm.datastore.couchdb.utils.backend.facade.DatabaseTestClient

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.