renamed base repository interfaces

This commit is contained in:
Michael Hunger
2011-04-07 13:08:54 +02:00
parent d506b73211
commit b27980c242
23 changed files with 55 additions and 58 deletions

View File

@@ -44,13 +44,13 @@ class Person {
}
GraphRepository<Person> graphRepository = graphRepositoryFactory.createNodeEntityRepository(Person.class);
GraphRepository<Person> graphRepository = graphRepositoryFactory.createGraphRepository(Person.class);
// exact graphRepository
Person mark = graphRepository.findByProperyValue("people","name","mark");
// numeric range queries
for (Person middleAgedDeveloper : graphRepository.findAllByRange(null, "age", 20, 40)) {
for (Person middleAgedDeveloper : graphRepository.findAllByRange( "age", 20, 40)) {
Developer developer=middleAgedDeveloper.projectTo(Developer.class);
}
]]></programlisting>
@@ -76,7 +76,7 @@ class Person {
String name;
}
GraphRepository<Person> graphRepository = graphRepositoryFactory.createNodeEntityRepository(Person.class);
GraphRepository<Person> graphRepository = graphRepositoryFactory.createGraphRepository(Person.class);
// exact graphRepository
Person mark = graphRepository.findAllByQuery("people-search","name","ma*");

View File

@@ -94,7 +94,7 @@
<example>
<title>Using GraphRepositories</title>
<programlisting language="java"><![CDATA[
GraphRepository<Person> graphRepository = graphRepositoryFactory.createNodeEntityRepository(Person.class);
GraphRepository<Person> graphRepository = graphRepositoryFactory.createGraphRepository(Person.class);
Person michael = graphRepository.save(new Person("Michael",36));
@@ -102,13 +102,13 @@ Person dave=graphRepository.findOne(123);
Long numberOfPeople = graphRepository.count();
Person mark = graphRepository.findByPropertyValue(null,"name", "mark");
Person mark = graphRepository.findByPropertyValue("name", "mark");
Iterable<Person> devs = graphRepository.findAllByProperyValue(null, "occupation","developer");
Iterable<Person> devs = graphRepository.findAllByProperyValue("occupation","developer");
Iterable<Person> middleAgedPeople = graphRepository.findAllByRange(null, "age",20,40);
Iterable<Person> middleAgedPeople = graphRepository.findAllByRange("age",20,40);
Iterable<Person> aTeam = graphRepository.findAllByQuery(null, "name","A*");
Iterable<Person> aTeam = graphRepository.findAllByQuery("name","A*");
Iterable<Person> davesFriends = graphRepository.findAllByTraversal(dave,
Traversal.description().pruneAfterDepth(1)
@@ -155,9 +155,9 @@ PersonRepository personRepository;
Person dave=personRepository.findOne(123);
Iterable<Person> devs = personRepository.findAllByProperyValue(null, "occupation","developer");
Iterable<Person> devs = personRepository.findAllByProperyValue("occupation","developer");
Iterable<Person> aTeam = graphRepository.findAllByQuery(null, "name","A*");
Iterable<Person> aTeam = graphRepository.findAllByQuery( "name","A*");
Iterable<Person> friends = personRepository.findFriends(dave);
]]></programlisting>