Spring Data Neo4j
Spring Data Neo4j enables POJO based development for the Graph Database
Neo4j. It maps annotated entity classes to the Neo4j Graph Database with advanced mapping functionality.
The template programming model is equivalent to well known Spring templates and builds the basis for interaction
with the graph and is also used for the advanced repository support. Spring Data Neo4j enables POJO based development for the Graph Database
Neo4j. It maps annotated entity classes to the Neo4j Graph Database with advanced mapping functionality.
The template programming model is equivalent to well known Spring templates and builds the basis for interaction
with the graph and is also used for the advanced repository support.
http://www.springsource.com/download/community?project=Spring%20Data%20Neo4j
#maven
"I’m excited about Spring Data Neo4j ... Spring Data Neo4j makes working with Neo4j amazingly easy, and therefore has the potential to make you more successful as a developer. ... I encourage you to explore Spring Data, and — better still — become involved in the community and contribute." Rod Johnson, Founder, Spring and SVP, Application Platform, VMware Spring Data Neo4j is released under the Apache Software License. Its source code is hosted on
github.
Several examples can also be found there.
A set of developer notes as quick-lookup reference card provides essential information.
Latest News
Webinars
Here is an overview of Spring Data Neo4j features
Getting StartedFor a quick introduction please have a look at the five
minute introduction and check out the examples.
For a more comprehensive tutorial enjoy our Spring Data Neo4j Guide Book
"Good Relationships" and glance at our
Developer Notes.
Example
@NodeEntity
public class Movie {
@GraphId Long id;
@Indexed(type = FULLTEXT, indexName = "search")
String title;
Person director;
@RelatedTo(type="ACTS_IN", direction = INCOMING)
Set<Person> actors;
@RelatedToVia(type = "RATED")
Iterable<Rating> ratings;
@Query("start movie=node({self}) match
movie-->genre<--similar return similar")
Iterable<Movie> similarMovies;
}
Repositories
interface MovieRepository extends GraphRepository<Movie> {
@Query("start movie={0} match m<-[rating:RATED]-user
return rating")
Iterable<Rating> getRatings(Movie movie);
// Co-Actors
Iterable<Person> findByActorsMoviesActorName(name)
}
<neo4j:repositories base-package="com.example.dao"/>
@Autowired MovieRepository repo;
Iterable<Movie> movies = repo.findAll();
Movie movie = repo.findByPropertyValue("title","Matrix");
repo.save(movie);
Iterable<Rating> ratings = repo.getRatings(movie);
Social movie database tutorial - cineasts.netThe Social Movie Database Webapp uses the Spring Framework, Spring Data Neo4j and
Neo4j based on data from themoviedb.org. Spring Data Neo4j Guide Book - "Good Relationships"Despite being just a library Spring Data Neo4j comes with a real Guide Book, featuring:
Blogs
Maven ArtifactsStable Release
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-neo4j</artifactId>
<version>2.2.0.RELEASE</version>
</dependency>
Milestone Release<repository> <id>spring-snapshot</id> <name>Spring Maven SNAPSHOT Repository</name> <url>http://repo.springsource.org/libs-milestone</url> </repository> <dependency> <groupId>org.springframework.data</groupId> <artifactId>spring-data-neo4j</artifactId> <version>2.2.0.RELEASE</version> </dependency>
Snapshot Release<repository> <id>spring-snapshot</id> <name>Spring Maven SNAPSHOT Repository</name> <url>http://repo.springsource.org/libs-snapshot</url> </repository> <dependency> <groupId>org.springframework.data</groupId> <artifactId>spring-data-neo4j</artifactId> <version>2.3.0.BUILD-SNAPSHOT</version> </dependency>
Current Stable Release (2.2.0.RELEASE)
Nightly Builds (2.3.0.BUILD-SNAPSHOT)
|
Quick Jump
DocumentationCurrent Stable Release (2.2.0.RELEASE)
Nightly Builds (2.3.0.BUILD-SNAPSHOT)
Other Resources
Related Discussions
|





