With Spring Data, the ever popular Spring Framework has cultivated a new patch of ground, bringing Big Data and NOSQL technology like Neo4j to enterprise developers. This guide introduces you to Spring Data Neo4j, using the fast, powerful and scalable graph database Neo4j to enjoy the benefits of having good relationships in your data.
Written by the project lead, Good Relationships provides all the practical details you need for developing enterprise applications with Spring Data Neo4j. The book starts with a narrative tutorial about implementing Cineasts.net, a full social web-app for movie enthusiasts. Then, a thorough reference part details core Neo4j concepts, querying, and the simple annotated POJO programming model of Spring Data Neo4j.
Free download
Buy the print version for $ 9.95
If you enjoyed reading the free download version, please support the author and InfoQ's book series by purchasing the print version.
Table of Contents
Foreword by Rod Johnson
Foreword by Emil Eifrem
About this guide book
- The Spring Data Neo4j Project
- Feedback
- Format of the Book
- Acknowledgements
I. Tutorial
- Introducing our project
- The Spring stack
- Required setup
- The domain model
- Learning Neo4j
- Spring Data Neo4j
- Annotating the domain
- Indexing
- Repositories
- Relationships Creating relationships
- Get it running Populating the database
- Web views Searching
- Adding social Users
- Adding Security
- More UI
- Importing Data
- Recommendations
- Neo4j Server Getting Neo4j-Server
- Conclusion
Accessing related entities
Accessing the relationship entities
Inspecting the datastore
Neoclipse visualization
The Neo4j Shell
Listing results
Ratings for movies
Other approaches
II. Reference Documentation
- Reference Documentation Spring Data and Spring Data Neo4j
- Introduction to Neo4j What is a graph database?
- Programming model Object Graph Mapping
- Environment setup Dependencies for Spring Data Neo4j Simple Mapping
- Cross-store persistence Partial entities
- Sample code Introduction
- Heroku: Seeding the Cloud Create a Self-Hosted Web Application
- Performance considerations
When to use Spring Data Neo4j - AspectJ details
- Neo4j Server Server Extension
Reference Documentation Overview
About Neo4j
GraphDatabaseService
Creating nodes and relationships
Graph traversal
Indexing
Querying the Graph with Cypher
Gremlin a Graph Traversal DSL
Advanced Mapping with AspectJ
AspectJ IDE support
Simple Object Graph Mapping
Defining node entities
@NodeEntity: The basic building block
@GraphId: Neo4j -id field
@GraphProperty: Optional annotation for property fields
@Indexed: Making entities searchable by field value
@Query: fields as query result views
@GraphTraversal: fields as traversal result views
Relating node entities
@RelatedTo: Connecting node entities
@RelationshipEntity: Rich relationships
@RelatedToVia: Accessing relationship entities
Indexing
Exact and numeric index
Fulltext indexes
Manual index access
Index queries in Neo4jTemplate
Neo4j Auto Indexes
Spatial Indexes
Neo4jTemplate
Basic operations
Result
Indexing
Graph traversal
Cypher Queries
Gremlin Scripts
Transactions
Neo4j REST Server
CRUD with repositories
CRUDRepository
IndexRepository and NamedIndexRepository
TraversalRepository
Query and Finder Methods
CypherDSL repository
Creating repositories
Composing repositories
Projecting entities
Geospatial Queries
Active Record Methods for Advanced Mapping Mode
Transactions
Detached node entities in advanced mapping mode
Relating detached entities
Entity type representation
Bean validation (JSR-303)
Gradle configuration for Advanced Mapping (AspectJ)
Ant/Ivy configuration for Advanced Mapping (AspectJ)
Maven configuration for Advanced Mapping
Repositories
Dependencies
Maven AspectJ build configuration
Spring configuration
XML namespace
Repository Configuration
Java-based bean configuration
Cross-store annotations
@NodeEntity(partial = "true")
@GraphProperty
Example
Configuring cross-store persistence
Hello Worlds sample application
IMDB sample application
MyRestaurants sample application
MyRestaurant-Social sample application
Cineasts social movie database
Deploy to Heroku
Using Spring Data Neo4j as a REST client