Examples of SequenceDocument


Examples of org.hibernate.ogm.datastore.couchdb.dialect.backend.json.impl.SequenceDocument

  }

  public long nextValue(IdSourceKey key, int increment, int initialValue) {
    long value;
    try {
      SequenceDocument sequence = getSequence( key, initialValue );
      value = sequence.getValue();
      incrementValueAndSave( increment, sequence );
    }
    catch (ResteasyClientException crf) {
      throw logger.errorCalculatingNextValue( crf );
    }
View Full Code Here

Examples of org.hibernate.ogm.datastore.couchdb.dialect.backend.json.impl.SequenceDocument

      response = databaseClient.getKeyValueById( id );
      if ( response.getStatus() == Response.Status.OK.getStatusCode() ) {
        return response.readEntity( SequenceDocument.class );
      }
      else if ( response.getStatus() == Response.Status.NOT_FOUND.getStatusCode() ) {
        SequenceDocument identifier = new SequenceDocument( key.getMetadata().getValueColumnName(), initialValue );
        identifier.setId( id );
        return identifier;
      }
      else {
        GenericResponse responseEntity = response.readEntity( GenericResponse.class );
        throw logger.errorRetrievingKeyValue( response.getStatus(), responseEntity.getError(), responseEntity.getReason() );
View Full Code Here

Examples of org.hibernate.ogm.datastore.couchdb.dialect.backend.json.impl.SequenceDocument

  }

  public long nextValue(IdSourceKey key, int increment, int initialValue) {
    long value;
    try {
      SequenceDocument sequence = getSequence( key, initialValue );
      value = sequence.getValue();
      incrementValueAndSave( increment, sequence );
    }
    catch (ResteasyClientException crf) {
      throw logger.errorCalculatingNextValue( crf );
    }
View Full Code Here

Examples of org.hibernate.ogm.datastore.couchdb.dialect.backend.json.impl.SequenceDocument

      response = databaseClient.getKeyValueById( id );
      if ( response.getStatus() == Response.Status.OK.getStatusCode() ) {
        return response.readEntity( SequenceDocument.class );
      }
      else if ( response.getStatus() == Response.Status.NOT_FOUND.getStatusCode() ) {
        SequenceDocument identifier = new SequenceDocument( key.getMetadata().getValueColumnName(), initialValue );
        identifier.setId( id );
        return identifier;
      }
      else {
        GenericResponse responseEntity = response.readEntity( GenericResponse.class );
        throw logger.errorRetrievingKeyValue( response.getStatus(), responseEntity.getError(), responseEntity.getReason() );
View Full Code Here

Examples of org.hibernate.ogm.datastore.couchdb.dialect.backend.json.impl.SequenceDocument

  }

  public long nextValue(RowKey key, int increment, int initialValue) {
    long value;
    try {
      SequenceDocument identifier = getNextKeyValue( createId( key ), initialValue );
      value = identifier.getValue();
      saveIntegralIncreasedValue( increment, identifier );
    }
    catch (ResteasyClientException crf) {
      throw logger.errorCalculatingNextValue( crf );
    }
View Full Code Here

Examples of org.hibernate.ogm.datastore.couchdb.dialect.backend.json.impl.SequenceDocument

      response = databaseClient.getKeyValueById( id );
      if ( response.getStatus() == Response.Status.OK.getStatusCode() ) {
        return response.readEntity( SequenceDocument.class );
      }
      else if ( response.getStatus() == Response.Status.NOT_FOUND.getStatusCode() ) {
        SequenceDocument identifier = new SequenceDocument( initialValue );
        identifier.setId( id );
        return identifier;
      }
      else {
        GenericResponse responseEntity = response.readEntity( GenericResponse.class );
        throw logger.errorRetrievingKeyValue( response.getStatus(), responseEntity.getError(), responseEntity.getReason() );
View Full Code Here

Examples of org.hibernate.ogm.datastore.couchdb.dialect.backend.json.impl.SequenceDocument

  }

  public long nextValue(RowKey key, int increment, int initialValue) {
    long value;
    try {
      SequenceDocument identifier = getNextKeyValue( createId( key ), initialValue );
      value = identifier.getValue();
      saveIntegralIncreasedValue( increment, identifier );
    }
    catch (ResteasyClientException crf) {
      throw logger.errorCalculatingNextValue( crf );
    }
View Full Code Here

Examples of org.hibernate.ogm.datastore.couchdb.dialect.backend.json.impl.SequenceDocument

      response = databaseClient.getKeyValueById( id );
      if ( response.getStatus() == Response.Status.OK.getStatusCode() ) {
        return response.readEntity( SequenceDocument.class );
      }
      else if ( response.getStatus() == Response.Status.NOT_FOUND.getStatusCode() ) {
        SequenceDocument identifier = new SequenceDocument( initialValue );
        identifier.setId( id );
        return identifier;
      }
      else {
        GenericResponse responseEntity = response.readEntity( GenericResponse.class );
        throw logger.errorRetrievingKeyValue( response.getStatus(), responseEntity.getError(), responseEntity.getReason() );
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.