Good Relationships

The Spring Data Graph Guidebook

Authors

Michael Hunger, David Montag, Mark Pollack, Thomas Risberg

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.


Preface
1. Foreword: Rod Johnson, CEO of SpringSource
2. Foreword: Emil Eifrem, CEO of Neo Technology
3. About this Guide Book
I. Tutorial
1. Allow me to introduce - Cineasts.net
2. Scope: Spring
2.1. Preparations - Required Setup
3. Setting the Stage - Movies Domain
4. Graphs ahead - Learning Neo4j
5. Conjuring Magic - Spring Data Graph
6. Decorations - Annotated Domain
7. Do I know you? - Indexing
8. Serving a good cause - Repository
9. A convincing act - Relationships
9.1. Value in Relationships - Creating them
9.2. Who's there ? - Accessing related entities
9.3. May I introduce ? - Accessing Relationships themselves
10. Curtains Up! - Get it running
10.1. Requisites - Populating the database
10.2. Behind the scenes - Peeking at the Datastore
10.2.1. Eye candy - Neoclipse visualization
10.2.2. Hardcore "Hacking" - Neo4j Shell
11. Showing off - Web views
11.1. What was his name? - Searching
11.2. Look what we've found - Listing Results
12. Movies 2.0 - Adding social
12.1. Look, mom a Cineast! - Users
12.2. Beware, Critics - Rating
13. Protecting Assets - Adding Security
14. Oh the Glamour - More UI
15. The dusty archives - Importing Data
16. Movies! Friends! Bargains! - Recommendations
II. Reference
Preface
17. Introduction to Neo4j
17.1. What is a graph database?
17.2. GraphDatabaseService
17.3. Creating Nodes and Relationships
17.4. Graph traversal
17.5. Indexing
18. Programming model for Spring Data Graph
18.1. Overview of the AspectJ support
18.2. Using annotations to define POJO entities and relationships
18.2.1. @NodeEntity: The basic building block
18.2.2. @RelatedTo: Connecting NodeEntities
18.2.3. @RelationshipEntity: Rich relationships
18.2.4. @RelatedToVia: Connecting NodeEntitites via RelationshipEntities
18.2.5. @StartNode: Starting NodeEntity of RelationshipEntity
18.2.6. @EndNode: Ending NodeEntity of RelationshipEntity
18.2.7. @Indexed: Making entities searchable by field value
18.2.8. @GraphTraversal
18.2.9. @GraphProperty: Cross-store persisted fields
18.3. Indexing
18.4. Finding nodes with finders
18.5. Transactions in Spring Data Graph
18.6. Session handling - attached and detached entities
18.7. Reified types for entities
18.8. Methods added to entity classes
18.9. Dynamic typing - Projection to unrelated, fitting types
18.10. Neo4jTemplate
18.11. Bean Validation - JSR-303
19. Setup required for Spring Data Graph
19.1. Maven Configuration
19.1.1. Repositories
19.1.2. Dependencies
19.1.3. AspectJ build configuration
19.2. Setting Up Spring Data Graph - Spring Configuration
19.2.1. XML-Namespace
19.2.2. Java based Configuration
20. Cross-store persistence with a graph database
20.1. Partial graph persistence
20.1.1. @NodeEntity(partial = "true")
20.1.2. @GraphProperty
20.2. Configuring cross-store persistence
21. Samples
21.1. Introduction
21.2. Hello Worlds sample
21.3. IMDB sample
21.4. MyRestaurant sample
21.5. MyRestaurant-Social sample
22. Performance considerations
22.1. When to use SDG?
23. Neo4jTemplate
23.1. Transaction handling/management
23.2. Basic operations
23.3. Indexing
23.4. Traversal
23.5. PathMapper
24. Annotation-driven persistence
24.1. Annotations
24.2. Introduced methods
24.3. Finders
24.4. GraphDatabaseContext
24.5. Indexing
24.6. Traversal
24.7. EntityMapper and Path
25. AspectJ introduction
26. Neo4j introduction
27. Spring Data
28. Neo4j Server