|
Spring Data Neo4j | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface NodeBacked
Interface introduced to objects annotated with @NodeEntity by the Neo4jNodeBacking
aspect.
annotation, to hold underlying Neo4j Node state.
Method Summary | ||
---|---|---|
|
findAllByQuery(String query,
Class<T> targetType,
Map<String,Object> params)
|
|
Iterable<Map<String,Object>> |
findAllByQuery(String query,
Map<String,Object> params)
|
|
|
findAllByTraversal(Class<T> targetType,
org.neo4j.graphdb.traversal.TraversalDescription traversalDescription)
Perform a traversal from this entity's underlying node with the given traversal description. |
|
|
findAllPathsByTraversal(org.neo4j.graphdb.traversal.TraversalDescription traversalDescription)
Perform a traversal from this entity's underlying node with the given traversal description. |
|
|
findByQuery(String query,
Class<T> targetType,
Map<String,Object> params)
|
|
Long |
getNodeId()
|
|
|
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. |
|
|
persist()
Attach the entity inside a running transaction. |
|
|
projectTo(Class<T> targetType)
Reify this entity as another node backed type. |
|
|
relateTo(N target,
Class<R> relationshipClass,
String relationshipType)
delegates to relateTo with allowDuplicates set to false |
|
|
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. |
Methods inherited from interface org.springframework.data.neo4j.aspects.core.GraphBacked |
---|
getPersistentState, hasPersistentState, remove, setPersistentState |
Methods inherited from interface org.springframework.data.neo4j.mapping.ManagedEntity |
---|
getEntityState |
Method Detail |
---|
<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 to
Long getNodeId()
<T> Iterable<T> findAllByTraversal(Class<T> targetType, org.neo4j.graphdb.traversal.TraversalDescription traversalDescription)
targetType
- node entity type for new entitiestraversalDescription
- traversal description used
Iterable
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 used
Iterable
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)
Iterable<Map<String,Object>> findAllByQuery(String query, Map<String,Object> params)
<T> T findByQuery(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 relationship
org.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 entities
org.neo4j.graphdb.Relationship relateTo(NodeBacked target, String type)
|
Spring Data Neo4j | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |