Good Relationships

The Spring Data Neo4j Guide Book

Authors

Michael Hunger, David Montag

2.0.0.M1

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
II. Reference Documentation
Reference Documentation
1. Spring Data and Spring Data Neo4j
2. Reference Documentation Overview
17. Introduction to Neo4j
17.1. What is a graph database?
17.2. About Neo4j
17.3. GraphDatabaseService
17.4. Creating nodes and relationships
17.5. Graph traversal
17.6. Indexing
17.7. Querying with Cypher
17.8. Gremlin a Graph Traversal DSL
18. Programming model
18.1. AspectJ support
18.1.1. AspectJ IDE support
18.2. Defining node entities
18.2.1. @NodeEntity: The basic building block
18.2.2. @GraphProperty: Optional annotation for property fields
18.2.3. @Indexed: Making entities searchable by field value
18.2.4. @Query: fields as query result views
18.2.5. @GraphTraversal: fields as traversal result views
18.3. Relating node entities
18.3.1. @RelatedTo: Connecting node entities
18.3.2. @RelationshipEntity: Rich relationships
18.3.3. @RelatedToVia: Accessing relationship entities
18.4. Introduced methods
18.5. Indexing
18.5.1. Exact and numeric index
18.5.2. Fulltext indexes
18.5.3. Manual index access
18.5.4. Indexing in Neo4jTemplate
18.6. CRUD with repositories
18.6.1. CRUDRepository
18.6.2. IndexRepository and NamedIndexRepository
18.6.3. TraversalRepository
18.6.4. Cypher-Queries
18.6.4.1. Annotated Queries
18.6.4.2. Named Queries
18.6.4.3. Query results
18.6.4.4. Cypher Examples
18.6.4.5. Derived Finder Methods
18.6.5. Creating repositories
18.6.6. Composing repositories
18.7. Transactions
18.8. Detached node entities
18.8.1. Relating detached entities
18.9. Entity type representation
18.10. Projecting entities
18.11. Bean validation (JSR-303)
19. Environment setup
19.1. Gradle configuration
19.2. Ant/Ivy configuration
19.3. Maven configuration
19.3.1. Repositories
19.3.2. Dependencies
19.3.3. AspectJ build configuration
19.4. Spring configuration
19.4.1. XML namespace
19.4.2. Java-based bean configuration
20. Cross-store persistence
20.1. Partial entities
20.2. Cross-store annotations
20.2.1. @NodeEntity(partial = "true")
20.2.2. @GraphProperty
20.2.3. Example
20.3. Configuring cross-store persistence
21. Sample code
21.1. Introduction
21.2. Hello Worlds sample application
21.3. IMDB sample application
21.4. MyRestaurants sample application
21.5. MyRestaurant-Social sample application
22. Performance considerations
22.1. When is Spring Data Neo4j right
23. Neo4jTemplate
23.1. Basic operations
23.2. Result
23.3. Indexing
23.4. Graph traversal
23.5. Cypher Queries
23.6. Gremlin Scripts
23.7. Transactions
23.8. Neo4j REST Server
24. AspectJ details
25. Neo4j Server
25.1. Server Extension
25.2. Using Spring Data Neo4j as a REST client