Package org.springframework.data.neo4j.core

Examples of org.springframework.data.neo4j.core.GraphDatabase.beginTx()


    assertThat(repository, is(notNullValue()));

    Person person = null;
    Person result = null;

    try (Transaction tx = database.beginTx()) {
      repository.deleteAll();

      person = new Person("Simon", 28);
      result = repository.save(person);
      tx.success();
View Full Code Here


      person = new Person("Simon", 28);
      result = repository.save(person);
      tx.success();
    }

        try (Transaction tx = database.beginTx()) {
            assertThat(result, is(notNullValue()));
            Long resultId = result.getId();
            Person lookedUpPerson = repository.findOne(person.getId());
            assertThat(lookedUpPerson.getId(), is(resultId));
            tx.success();
View Full Code Here

    assertThat(repository, is(notNullValue()));

    Person person = null;
    Person result = null;

    try (Transaction tx = database.beginTx()) {
      repository.deleteAll();

      person = new Person("Simon", 28);
      result = repository.save(person);
      tx.success();
View Full Code Here

      person = new Person("Simon", 28);
      result = repository.save(person);
      tx.success();
    }

        try (Transaction tx = database.beginTx()) {
            assertThat(result, is(notNullValue()));
            Long resultId = result.getId();
            Person lookedUpPerson = repository.findOne(person.getId());
            assertThat(lookedUpPerson.getId(), is(resultId));
            tx.success();
View Full Code Here

    assertThat(repository, is(notNullValue()));

    Person person = null;
    Person result = null;

    try (Transaction tx = database.beginTx()) {
      repository.deleteAll();

      person = new Person("Simon", 28);
      result = repository.save(person);
      tx.success();
View Full Code Here

      person = new Person("Simon", 28);
      result = repository.save(person);
      tx.success();
    }

        try (Transaction tx = database.beginTx()) {
            assertThat(result, is(notNullValue()));
            Long resultId = result.getId();
            Person lookedUpPerson = repository.findOne(person.getId());
            assertThat(lookedUpPerson.getId(), is(resultId));
            tx.success();
View Full Code Here

  @Test
  public void returnOneFromCustomImpl() {

    GraphDatabase database = container.getInstance(GraphDatabase.class);

    try (Transaction tx = database.beginTx()) {

      RepositoryClient client = container.getInstance(RepositoryClient.class);
      assertThat(client.samplePersonRepository.returnOne(), is(1));
    }
  }
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.