Spring Data Neo4j

org.springframework.data.neo4j.repository
Class NodeGraphRepositoryImpl<T>

java.lang.Object
  extended by org.springframework.data.neo4j.repository.AbstractGraphRepository<org.neo4j.graphdb.Node,T>
      extended by org.springframework.data.neo4j.repository.NodeGraphRepositoryImpl<T>
All Implemented Interfaces:
CRUDRepository<T>, CypherDslRepository<T>, GraphRepository<T>, IndexRepository<T>, NamedIndexRepository<T>, RelationshipOperationsRepository<T>, SpatialRepository<T>, TraversalRepository<T>, org.springframework.data.repository.CrudRepository<T,Long>, org.springframework.data.repository.PagingAndSortingRepository<T,Long>, org.springframework.data.repository.Repository<T,Long>

public class NodeGraphRepositoryImpl<T>
extends AbstractGraphRepository<org.neo4j.graphdb.Node,T>
implements GraphRepository<T>, RelationshipOperationsRepository<T>


Field Summary
 
Fields inherited from class org.springframework.data.neo4j.repository.AbstractGraphRepository
clazz, EMPTY_CLOSABLE_ITERABLE, template
 
Constructor Summary
NodeGraphRepositoryImpl(Class<T> clazz, Neo4jTemplate template)
           
 
Method Summary
<R> R
createRelationshipBetween(T start, Object end, Class<R> relationshipEntityClass, String relationshipType)
           
 void deleteRelationshipBetween(T start, Object end, String type)
           
<N> Iterable<T>
findAllByTraversal(N start, org.neo4j.graphdb.traversal.TraversalDescription traversalDescription)
          Traversal based finder that returns a lazy Iterable over the traversal results
protected  org.neo4j.graphdb.Node getById(long id)
           
<R> R
getRelationshipBetween(T start, Object end, Class<R> relationshipEntityClass, String relationshipType)
           
 Iterable<T> save(Iterable<? extends T> entities)
          persists the provided entities by forwarding to their entity.persist() methods
 T save(T entity)
          persists an entity by forwarding to entity.persist()
 
Methods inherited from class org.springframework.data.neo4j.repository.AbstractGraphRepository
count, createEntity, createInclusiveRangeQuery, delete, delete, delete, deleteAll, exists, findAll, findAll, findAll, findAllByPropertyValue, findAllByPropertyValue, findAllByQuery, findAllByQuery, findAllByRange, findAllByRange, findByPropertyValue, findByPropertyValue, findOne, findWithinBoundingBox, findWithinDistance, findWithinWellKnownText, getIndex, query, query
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.springframework.data.neo4j.repository.CRUDRepository
count, delete, delete, deleteAll, exists, findAll, findAll, findAll, findOne
 
Methods inherited from interface org.springframework.data.repository.CrudRepository
delete
 
Methods inherited from interface org.springframework.data.neo4j.repository.IndexRepository
findAllByPropertyValue, findAllByQuery, findAllByRange, findByPropertyValue
 

Constructor Detail

NodeGraphRepositoryImpl

public NodeGraphRepositoryImpl(Class<T> clazz,
                               Neo4jTemplate template)
Method Detail

getById

protected org.neo4j.graphdb.Node getById(long id)
Specified by:
getById in class AbstractGraphRepository<org.neo4j.graphdb.Node,T>

findAllByTraversal

public <N> Iterable<T> findAllByTraversal(N start,
                                          org.neo4j.graphdb.traversal.TraversalDescription traversalDescription)
Description copied from interface: TraversalRepository
Traversal based finder that returns a lazy Iterable over the traversal results

Specified by:
findAllByTraversal in interface TraversalRepository<T>
Type Parameters:
N - Start node entity type
Parameters:
start - the node to start the traversal from
Returns:
Iterable over traversal result

save

public T save(T entity)
Description copied from interface: CRUDRepository
persists an entity by forwarding to entity.persist()

Specified by:
save in interface CRUDRepository<T>
Specified by:
save in interface org.springframework.data.repository.CrudRepository<T,Long>
Parameters:
entity - to be persisted
Returns:
the saved entity (being the same reference as the parameter)

save

public Iterable<T> save(Iterable<? extends T> entities)
Description copied from interface: CRUDRepository
persists the provided entities by forwarding to their entity.persist() methods

Specified by:
save in interface CRUDRepository<T>
Specified by:
save in interface org.springframework.data.repository.CrudRepository<T,Long>
Parameters:
entities - to be persisted
Returns:
the input iterable

createRelationshipBetween

public <R> R createRelationshipBetween(T start,
                                       Object end,
                                       Class<R> relationshipEntityClass,
                                       String relationshipType)
Specified by:
createRelationshipBetween in interface RelationshipOperationsRepository<T>

getRelationshipBetween

public <R> R getRelationshipBetween(T start,
                                    Object end,
                                    Class<R> relationshipEntityClass,
                                    String relationshipType)
Specified by:
getRelationshipBetween in interface RelationshipOperationsRepository<T>

deleteRelationshipBetween

public void deleteRelationshipBetween(T start,
                                      Object end,
                                      String type)
Specified by:
deleteRelationshipBetween in interface RelationshipOperationsRepository<T>

Spring Data Neo4j

Copyright © 2011 SpringSource. All Rights Reserved.