Updated README

This commit is contained in:
David Montag
2011-04-18 15:13:50 -07:00
parent 9914128d87
commit 29da57dd96

View File

@@ -2,7 +2,34 @@ h1. Spring Data Graph - Quick start
The primary goal of the "Spring Data":http://www.springsource.org/spring-data project is to make it easier to build Spring-powered applications that use new data access technologies such as non-relational databases, map-reduce frameworks, and cloud based data services. As the name implies, the **Graph** project provides integration with graph value stores. The only supported Graph Database now is "Neo4j":http://neo4j.org/.
The Spring Data Graph project provides a simplified POJO based programming model that reduces that amount of boilerplate code needed to create neo4j applications. it also provides a 'cross store' persistence solution that can extend existing JPA data models with new parts (properties, entities, relationships) that are stored exclusively in the graph while being transparently integrated with the JPA entities. This enables for easy and seamless addition of new features that were not available before to JPA-based applications.
The Spring Data Graph project provides a simplified POJO based programming model that reduces that amount of boilerplate code needed to create neo4j applications. It also provides a cross-store persistence solution that can extend existing JPA data models with new parts (properties, entities, relationships) that are stored exclusively in the graph while being transparently integrated with the JPA entities. This enables for easy and seamless addition of new features that were not available before to JPA-based applications.
<pre>
@NodeEntity
class Person {
@Indexed
private String name;
@RelatedTo(direction = Direction.BOTH, elementClass = Person.class)
private Set<Person> friends;
public Person() {}
public Person(String name) { this.name = name; }
private void knows(Person friend) { friends.add(friend); }
}
Person jon = new Person("Jon").persist();
Person emil = new Person("Emil").persist();
Person rod = new Person("Rod").persist();
emil.knows(jon);
emil.knows(rod);
for(Person friend : emil.getFriends()) {
System.out.println("Friend: " + friend);
}
</pre>
h2. Maven configuration