Good Relationships

The Spring Data Graph Guidebook

Authors

Michael Hunger, David Montag, Mark Pollack, Thomas Risberg

1.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.


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. Spring Data
18. Introduction to Neo4j
18.1. What is a graph database?
18.2. About Neo4j
18.3. GraphDatabaseService
18.4. Creating Nodes and Relationships
18.5. Graph traversal
18.6. Indexing
19. Programming model for Spring Data Graph
19.1. Overview of the AspectJ support
19.1.1. IDE-AspectJ Support
19.2. Using annotations to define POJO Node Entities
19.2.1. @NodeEntity: The basic building block
19.2.2. @GraphProperty: Optional Annotation for Property Fields
19.2.3. @Indexed: Making entities searchable by field value
19.2.4. @GraphTraversal: fields providing direct access to traversal results
19.3. How to relate Node Entities using Relationships
19.3.1. @RelatedTo: Connecting NodeEntities
19.3.2. @RelationshipEntity: Rich relationships
19.3.3. @RelatedToVia: Connecting Node Entitites via Relationship Entities
19.4. Indexing
19.4.1. Exact and Numeric Index
19.4.2. Fulltext Indexes
19.4.3. Raw Index Access
19.4.4. Indexing in Neo4jTemplate
19.5. GraphRepositories for basic CRUD and find-operations
19.5.1. Composing Repositories
19.6. Transactions in Spring Data Graph
19.7. Session handling - attached and detached entities
19.8. Storing type information in the graph
19.9. Methods added to entity classes
19.10. Dynamic typing - Projection to unrelated, fitting types
19.11. Bean Validation - JSR-303
20. Setup required for Spring Data Graph
20.1. Maven Configuration
20.1.1. Repositories
20.1.2. Dependencies
20.1.3. AspectJ build configuration
20.2. Setting Up Spring Data Graph - Spring Configuration
20.2.1. XML-Namespace
20.2.2. Java based Configuration
21. Cross-store persistence with a graph database
21.1. Partial graph persistence
21.1.1. @NodeEntity(partial = "true")
21.1.2. @GraphProperty
21.2. Configuring cross-store persistence
22. Samples
22.1. Introduction
22.2. Hello Worlds sample
22.3. IMDB sample
22.4. MyRestaurant sample
22.5. MyRestaurant-Social sample
23. Performance considerations
23.1. When to use SDG?
24. Neo4jTemplate
24.1. Basic operations
24.2. Indexing
24.3. Traversal
24.4. Path abstraction and PathMapper
24.5. Transaction handling/management
25. AspectJ introduction
26. Neo4j Server
26.1. Server Extension
26.2. Using Spring Data Graph as a REST-Client