@FunctionalInterface public interface Neo4jCallback<T>
Neo4jTemplate
's
execution methods, often as anonymous classes within a method implementation.
A typical implementation will call Session.load/find/update
to perform
some operations on persistent objects.Neo4jTemplate
,
Neo4jTransactionManager
Modifier and Type | Method and Description |
---|---|
T |
doInNeo4jOgm(org.neo4j.ogm.session.Session session)
Gets called by
Neo4jTemplate.doExecute with an active
OGM Session . |
T doInNeo4jOgm(org.neo4j.ogm.session.Session session)
Neo4jTemplate.doExecute
with an active
OGM Session
. Does not need to care about activating
or closing the Session
, or handling transactions.
Allows for returning a result object created within the callback, i.e. a domain object or a collection of domain objects. A thrown custom RuntimeException is treated as an application exception: It gets propagated to the caller of the template.
session
- active Neo4j sessionnull
if noneCopyright © 2011–2017 Pivotal Software, Inc.. All rights reserved.