renamed getId to getNodeId

This commit is contained in:
Michael Hunger
2010-09-09 09:07:51 +02:00
parent 69a9240aec
commit cc4205a415
2 changed files with 3 additions and 3 deletions

View File

@@ -131,7 +131,7 @@ public aspect Neo4jNodeBacking extends AbstractTypeAnnotatingMixinFields<GraphEn
return this.underlyingNode.createRelationshipTo(nb.getUnderlyingNode(), type);
}
public Long NodeBacked.getId() {
public Long NodeBacked.getNodeId() {
if (!hasUnderlyingNode()) return null;
return underlyingNode.getId();
}

View File

@@ -65,7 +65,7 @@ public class Neo4jGraphPersistenceTest {
Person p = new Person("Rod", 39);
Assert.assertEquals(p.getName(), p.getUnderlyingNode().getProperty("Person.name"));
Assert.assertEquals(p.getAge(), p.getUnderlyingNode().getProperty("Person.age"));
Person found = graphEntityInstantiator.createEntityFromState(graphDatabaseService.getNodeById(p.getId()), Person.class);
Person found = graphEntityInstantiator.createEntityFromState(graphDatabaseService.getNodeById(p.getNodeId()), Person.class);
Assert.assertEquals("Rod", found.getUnderlyingNode().getProperty("Person.name"));
Assert.assertEquals(39, found.getUnderlyingNode().getProperty("Person.age"));
}
@@ -297,7 +297,7 @@ public class Neo4jGraphPersistenceTest {
public void testFinderFindById() {
Person p = new Person("Michael", 35);
Finder<Person> finder = finderFactory.getFinderForClass(Person.class);
Person pById = finder.findById(p.getId());
Person pById = finder.findById(p.getNodeId());
Assert.assertEquals(p, pById);
}