Package org.springframework.data.couchbase.core

Examples of org.springframework.data.couchbase.core.CouchbaseTemplate


    populateTestData(client);
    createAndWaitForDesignDocs(client);
  }

  private void populateTestData(final CouchbaseClient client) {
    CouchbaseTemplate template = new CouchbaseTemplate(client);
    for (int i = 0; i < 100; i++) {
      template.save(new User("testuser-" + i, "uname-" + i));
    }
  }
View Full Code Here


   *
   * @throws Exception on Bean construction failure.
   */
  @Bean
  public CouchbaseTemplate couchbaseTemplate() throws Exception {
    return new CouchbaseTemplate(couchbaseClient(), mappingCouchbaseConverter(), translationService());
  }
View Full Code Here

    populateTestData(client);
    createAndWaitForDesignDocs(client);
  }

  private void populateTestData(CouchbaseClient client) {
    CouchbaseTemplate template = new CouchbaseTemplate(client);

    for (int i = 0; i < 100; i++) {
      User u = new User("testuser-" + i, "uname-" + i);
      template.save(u, PersistTo.MASTER, ReplicateTo.ZERO);
    }

  }
View Full Code Here

    return super.couchbaseClient();
  }

  @Override
  public CouchbaseTemplate couchbaseTemplate() throws Exception {
    CouchbaseTemplate template = super.couchbaseTemplate();
    template.setWriteResultChecking(WriteResultChecking.LOG);
    return template;
  }
View Full Code Here

TOP

Related Classes of org.springframework.data.couchbase.core.CouchbaseTemplate

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.