Good Relationships

The Spring Data Neo4j Guide Book

Authors

Michael Hunger, David Montag

2.0.0.RC1

Copies of this document may be made for your own use and for distribution to others, provided that you do not charge any fee for such copies and further provided that each copy contains this Copyright Notice, whether distributed in print or electronically.

Copyright 2010-2011 Neo Technology


Foreword by Rod Johnson
Foreword by Emil Eifrem
About this guide book
1. The Spring Data Neo4j Project
2. Feedback
3. Format of the Book
4. Acknowledgements
I. Tutorial
1. Introducing our project
2. The Spring stack
2.1. Required setup
3. The domain model
4. Learning Neo4j
5. Spring Data Neo4j
6. Annotating the domain
7. Indexing
8. Repositories
9. Relationships
9.1. Creating relationships
9.2. Accessing related entities
9.3. Accessing the relationship entities
10. Get it running
10.1. Populating the database
10.2. Inspecting the datastore
10.2.1. Neoclipse visualization
10.2.2. The Neo4j Shell
11. Web views
11.1. Searching
11.2. Listing results
12. Adding social
12.1. Users
12.2. Ratings for movies
13. Adding Security
14. More UI
15. Importing Data
16. Recommendations
17. Neo4j Server
17.1. Getting Neo4j-Server
17.2. Other approaches
18. Conclusion
II. Reference Documentation
Reference Documentation
1. Spring Data and Spring Data Neo4j
2. Reference Documentation Overview
19. Introduction to Neo4j
19.1. What is a graph database?
19.2. About Neo4j
19.3. GraphDatabaseService
19.4. Creating nodes and relationships
19.5. Graph traversal
19.6. Indexing
19.7. Querying with Cypher
19.8. Gremlin a Graph Traversal DSL
20. Programming model
20.1. Object Graph Mapping
20.2. AspectJ support
20.2.1. AspectJ IDE support
20.3. Simple Object Graph Mapping
20.4. Defining node entities
20.4.1. @NodeEntity: The basic building block
20.4.2. @GraphProperty: Optional annotation for property fields
20.4.3. @Indexed: Making entities searchable by field value
20.4.4. @Query: fields as query result views
20.4.5. @GraphTraversal: fields as traversal result views
20.5. Relating node entities
20.5.1. @RelatedTo: Connecting node entities
20.5.2. @RelationshipEntity: Rich relationships
20.5.3. @RelatedToVia: Accessing relationship entities
20.6. Indexing
20.6.1. Exact and numeric index
20.6.2. Fulltext indexes
20.6.3. Manual index access
20.6.4. Indexing in Neo4jTemplate
20.7. Neo4jTemplate
20.7.1. Basic operations
20.7.2. Result
20.7.3. Indexing
20.7.4. Graph traversal
20.7.5. Cypher Queries
20.7.6. Gremlin Scripts
20.7.7. Transactions
20.7.8. Neo4j REST Server
20.8. CRUD with repositories
20.8.1. CRUDRepository
20.8.2. IndexRepository and NamedIndexRepository
20.8.3. TraversalRepository
20.8.4. Cypher-Queries
20.8.4.1. Annotated Queries
20.8.4.2. Named Queries
20.8.4.3. Query results
20.8.4.4. Cypher Examples
20.8.4.5. Derived Finder Methods
20.8.5. Creating repositories
20.8.6. Composing repositories
20.9. Projecting entities
20.10. Geospatial Queries
20.11. Introduced methods
20.12. Transactions
20.13. Detached node entities
20.13.1. Relating detached entities
20.14. Entity type representation
20.15. Bean validation (JSR-303)
21. Environment setup
21.1. Gradle configuration
21.2. Ant/Ivy configuration
21.3. Maven configuration
21.3.1. Repositories
21.3.2. Dependencies
21.3.3. AspectJ build configuration
21.4. Spring configuration
21.4.1. XML namespace
21.4.2. Java-based bean configuration
22. Cross-store persistence
22.1. Partial entities
22.2. Cross-store annotations
22.2.1. @NodeEntity(partial = "true")
22.2.2. @GraphProperty
22.2.3. Example
22.3. Configuring cross-store persistence
23. Sample code
23.1. Introduction
23.2. Hello Worlds sample application
23.3. IMDB sample application
23.4. MyRestaurants sample application
23.5. MyRestaurant-Social sample application
24. Performance considerations
24.1. When is Spring Data Neo4j right
25. AspectJ details
26. Neo4j Server
26.1. Server Extension
26.2. Using Spring Data Neo4j as a REST client