diff --git a/src/docbkx/programming-model.xml b/src/docbkx/programming-model.xml index 9154413d3..bc038ffb2 100644 --- a/src/docbkx/programming-model.xml +++ b/src/docbkx/programming-model.xml @@ -162,12 +162,12 @@ public class Actor { Finder implementation that provides methods for locating nodes and relationships: - using direct access findById(id) , - iterating over all nodes of a node entity type (findAll), - counting the instances of a node entity type (count), - iterating over all indexed instances with a certain property value (findAllByPropertyValue), - getting a single instance with a certain property value (findByPropertyValue), - iterating over a traversal result (findAllByTraversal). + using direct access findById(id) , + iterating over all nodes of a node entity type (findAll), + counting the instances of a node entity type (count), + iterating over all indexed instances with a certain property value (findAllByPropertyValue), + getting a single instance with a certain property value (findByPropertyValue), + iterating over a traversal result (findAllByTraversal). The Finder instances are created via a FinderFactory to be bound to a concrete node or relationship entity class. @@ -325,6 +325,7 @@ for (Person person : finder.findAllByProperyValue("occupation","developer")) { } } ]]> +
Dynamic Typing - Projection to unrelated, fitting types @@ -368,13 +369,42 @@ for (Person person : finder.findAllByProperyValue("occupation","developer")) {
Neo4jTemplate - + The Neo4jTemplate offers the convenient API of Spring templates for the Neo4j graph database. + + There are methods for creating nodes and relationships that automatically set provided properties and optionally + index certain fields. Other methods (index, autoindex) will index them. + + For the querying operations Neo4jTemplate unifies the result with the Path abstraction that comes from Neo4j. + Much like a resultset a path contains nodes() and relationships() + starting at a startNode() and + ending with a endNode(), the lastRelationship() is also available separately. + Using this Path abstraction also wraps results that contain just nodes or relationships. + Using implementations of PathMapper<T> and PathMapper.WithoutResult (comparable with RowMapper and + RowCallbackHandler) the paths can be converted to other Java or domain objects. + + Query methods either take a field / value combination to look for exact matches in the index or a lucene query + object or string to handle more complex queries. + + Traversal methods are the bread and butter of graph operations. So they are fully supported in the Neo4jTemplate. + The traverseNext method traverses to the direct neighbours of the start node filtering the relationships according + to its parameters. + + The traverse method covers the full fledged traversal operation that takes a powerful TraversalDescription + (most probably built from the Traversal.description() DSL) and + + The Neo4jTemplate provides configurable implicit transactions for all its methods. By default it creates a transaction + for each call (which is a no-op if there is already a transaction running). If you call the constructor + with the useExplicitTransactions parameter set to true, it won't create any transactions so you have to + provide them using @Transactional or the TransactionTemplate. +