public interface NodeBacked extends GraphBacked<org.neo4j.graphdb.Node,NodeBacked>
Neo4jNodeBacking
aspect.
annotation, to hold underlying Neo4j Node state.Modifier and Type | Method and Description |
---|---|
<T> Iterable<T> |
findAllByQuery(String query,
Class<T> targetType,
Map<String,Object> params) |
Iterable<Map<String,Object>> |
findAllByQuery(String query,
Map<String,Object> params) |
<T> Iterable<T> |
findAllByTraversal(Class<T> targetType,
org.neo4j.graphdb.traversal.TraversalDescription traversalDescription)
Perform a traversal from this entity's underlying node with the given traversal description.
|
<S extends NodeBacked,E extends NodeBacked> |
findAllPathsByTraversal(org.neo4j.graphdb.traversal.TraversalDescription traversalDescription)
Perform a traversal from this entity's underlying node with the given traversal description.
|
<T> T |
findByQuery(String query,
Class<T> targetType,
Map<String,Object> params) |
Long |
getNodeId() |
<R extends RelationshipBacked> |
getRelationshipTo(NodeBacked target,
Class<R> relationshipClass,
String type)
Finds the relationship of the specified type, from this entity's underlying node to the target entity's
underlying node.
|
org.neo4j.graphdb.Relationship |
getRelationshipTo(NodeBacked target,
String type)
Finds the relationship of the specified type, from this entity's underlying node to the target entity's
underlying node.
|
<T extends NodeBacked> |
persist()
Attach the entity inside a running transaction.
|
<T extends NodeBacked> |
projectTo(Class<T> targetType)
Reify this entity as another node backed type.
|
<R extends RelationshipBacked,N extends NodeBacked> |
relateTo(N target,
Class<R> relationshipClass,
String relationshipType)
delegates to relateTo with allowDuplicates set to false
|
<R extends RelationshipBacked,N extends NodeBacked> |
relateTo(N target,
Class<R> relationshipClass,
String relationshipType,
boolean allowDuplicates)
Creates a relationship to the target node, returning a relationship entity representing the created
relationship.
|
org.neo4j.graphdb.Relationship |
relateTo(NodeBacked target,
String type)
delegates to relateTo with allowDuplicates set to false
|
org.neo4j.graphdb.Relationship |
relateTo(NodeBacked target,
String type,
boolean allowDuplicates)
Creates a relationship to the target node entity with the given relationship type.
|
void |
removeRelationshipTo(NodeBacked target,
String relationshipType)
Removes the all relationships of the given type between this entity's underlying node and the target
entity's underlying node.
|
getPersistentState, hasPersistentState, remove, setPersistentState
getEntityState
<T extends NodeBacked> T persist()
persist
in interface ManagedEntity<org.neo4j.graphdb.Node,NodeBacked>
<R extends RelationshipBacked,N extends NodeBacked> R relateTo(N target, Class<R> relationshipClass, String relationshipType, boolean allowDuplicates)
Creates a relationship to the target node, returning a relationship entity representing the created relationship.
Example:
public class Person { ... public Friendship knows(Person p) { return relateTo(p, Friendship.class, "knows"); } ... }
target
- other entityrelationshipClass
- relationship entity classrelationshipType
- type of relationship to be createdallowDuplicates
- duplication relationships of the same type are allowed between two entities<R extends RelationshipBacked,N extends NodeBacked> R relateTo(N target, Class<R> relationshipClass, String relationshipType)
<T extends NodeBacked> T projectTo(Class<T> targetType)
targetType
- type to project toLong getNodeId()
<T> Iterable<T> findAllByTraversal(Class<T> targetType, org.neo4j.graphdb.traversal.TraversalDescription traversalDescription)
targetType
- node entity type for new entitiestraversalDescription
- traversal description usedIterable
over the traversal results, converted to the expected node
entity instances<S extends NodeBacked,E extends NodeBacked> Iterable<EntityPath<S,E>> findAllPathsByTraversal(org.neo4j.graphdb.traversal.TraversalDescription traversalDescription)
traversalDescription
- traversal description usedIterable
over the traversal result paths, wrapped as entity paths @{link EntityPath}
entity instancesvoid removeRelationshipTo(NodeBacked target, String relationshipType)
RelatedTo
fields,
single-relationship non-annotated fields, and
RelatedToVia
fields.target
- other node entityrelationshipType
- type to be removed<R extends RelationshipBacked> R getRelationshipTo(NodeBacked target, Class<R> relationshipClass, String type)
target
- end node of relationshiprelationshipClass
- class of the relationship entitytype
- type of the sought relationship<T> Iterable<T> findAllByQuery(String query, Class<T> targetType, Map<String,Object> params)
org.neo4j.graphdb.Relationship getRelationshipTo(NodeBacked target, String type)
target
- end node of relationshiptype
- type of the sought relationshiporg.neo4j.graphdb.Relationship relateTo(NodeBacked target, String type, boolean allowDuplicates)
target
- entitytype
- neo4j relationship type for the underlying relationshipallowDuplicates
- duplication relationships of the same type are allowed between two entitiesorg.neo4j.graphdb.Relationship relateTo(NodeBacked target, String type)
Copyright © 2012 SpringSource. All Rights Reserved.