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

Examples of org.hibernate.ogm.datastore.couchdb.utils.backend.json.AssociationCountResponse


  public Map<AssociationStorageType, Long> getNumberOfAssociations(DatabaseTestClient databaseTestClient) {
    Response response = null;
    try {
      response = databaseTestClient.getNumberOfAssociations( true );
      if ( response.getStatus() == Response.Status.OK.getStatusCode() ) {
        AssociationCountResponse countResponse = response.readEntity( AssociationCountResponse.class );

        Map<AssociationStorageType, Long> countsByType = new HashMap<AssociationStorageType, Long>( 2 );
        countsByType.put( AssociationStorageType.IN_ENTITY, countResponse.getInEntityAssociationCount() );
        countsByType.put( AssociationStorageType.ASSOCIATION_DOCUMENT, countResponse.getAssociationDocumentCount() );

        return countsByType;
      }
      else {
        GenericResponse responseEntity = response.readEntity( GenericResponse.class );
View Full Code Here

TOP

Related Classes of org.hibernate.ogm.datastore.couchdb.utils.backend.json.AssociationCountResponse

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.