Package org.neo4j.graphdb

Examples of org.neo4j.graphdb.Transaction.finish()


            unitOfWork.doWork();
            tx.success();
        }
        finally
        {
            tx.finish();
        }

    }
}
View Full Code Here


      metadataNodeRelationship.delete();
      metadataNode.delete();
   
      tx.success();
    } finally {
      tx.finish();
    }   
   
    countSaved = false;
    totalGeometryCount = 0;       
  }
View Full Code Here

          visitor.onIndexReference(rel.getEndNode());
        }
     
        tx.success();
      } finally {
        tx.finish();
      }
    }
  }
 
  private void initIndexMetadata() {
View Full Code Here

      try {
        getMetadataNode().setProperty("totalGeometryCount", totalGeometryCount);
        countSaved = true;
        tx.success();
      } finally {
        tx.finish();
      }
    }
  } 
 
  private boolean nodeIsLeaf(Node node) {
View Full Code Here

            tx.success();
        }
        finally
        {
            tx.finish();
        }
  }

    private void acquireLock(){
      Relationship rel = treeRoot.getUnderlyingNode().getSingleRelationship(RelTypes.TREE_ROOT, Direction.INCOMING);
View Full Code Here

            flushDirty();
            tx.success();
            return result;
        } finally {
            tx.finish();
        }
    }
}
View Full Code Here

            subThing = new SubThing(subThingNode);
            nodeTypeRepresentationStrategy.postEntityCreation(subThingNode, SubThing.class);
            subThing.setName("subThing");
            tx.success();
        } finally {
            tx.finish();
        }
    }

    private static Node node(Thing thing) {
        return thing.getPersistentState();
View Full Code Here

            AssertionError error = new AssertionError("transactionManager not correctly configured, please refer to the manual, setup section");
            error.initCause(e);
            throw error;
        } finally {
            try {
            if (tx != null) tx.finish();
            } catch(Exception e) {
                // ignore
            }
        }
    }
View Full Code Here

        Person spouse = persistedPerson("Tina", 36);
        p.setSpouse(spouse);
        long id = spouse.getId();
        graphDatabaseContext.removeNodeEntity(spouse);
        tx.success();
        tx.finish();
        Assert.assertNull("spouse removed " + p.getSpouse(), p.getSpouse());
        Person spouseFromIndex = personRepository.findByPropertyValue(Person.NAME_INDEX, "name", "Tina");
        Assert.assertNull("spouse not found in index",spouseFromIndex);
        Assert.assertNull("node deleted " + id, graphDatabaseContext.getNodeById(id));
    }
View Full Code Here

        Person spouse = persistedPerson("Tina", 36);
        p.setSpouse(spouse);
        long id = spouse.getId();
        spouse.remove();
        tx.success();
        tx.finish();
        Assert.assertNull("spouse removed " + p.getSpouse(), p.getSpouse());
        Person spouseFromIndex = personRepository.findByPropertyValue(Person.NAME_INDEX, "name", "Tina");
        Assert.assertNull("spouse not found in index", spouseFromIndex);
        Assert.assertNull("node deleted " + id, graphDatabaseContext.getNodeById(id));
    }
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.