Spring Data Neo4j

org.springframework.data.neo4j.fieldaccess
Class GraphBackedEntityIterableWrapper<STATE extends org.neo4j.graphdb.PropertyContainer,ENTITY>

java.lang.Object
  extended by org.neo4j.helpers.collection.IterableWrapper<ENTITY,STATE>
      extended by org.springframework.data.neo4j.fieldaccess.GraphBackedEntityIterableWrapper<STATE,ENTITY>
All Implemented Interfaces:
Iterable<ENTITY>

public class GraphBackedEntityIterableWrapper<STATE extends org.neo4j.graphdb.PropertyContainer,ENTITY>
extends org.neo4j.helpers.collection.IterableWrapper<ENTITY,STATE>

Simple wrapper to create an Iterable over @NodeEntities or @RelationshipEntities from an iterable over Nodes or Relationships. Creates NodeEntities on the fly while iterating the Iterator from original iterable.


Constructor Summary
GraphBackedEntityIterableWrapper(Iterable<STATE> iterable, Class<ENTITY> targetType, Neo4jTemplate template)
           
 
Method Summary
static
<S extends org.neo4j.graphdb.PropertyContainer,E>
GraphBackedEntityIterableWrapper<S,E>
create(Iterable<S> iterable, Class<E> targetType, Neo4jTemplate template)
           
protected  ENTITY underlyingObjectToObject(STATE s)
           
 
Methods inherited from class org.neo4j.helpers.collection.IterableWrapper
iterator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphBackedEntityIterableWrapper

public GraphBackedEntityIterableWrapper(Iterable<STATE> iterable,
                                        Class<ENTITY> targetType,
                                        Neo4jTemplate template)
Method Detail

underlyingObjectToObject

protected ENTITY underlyingObjectToObject(STATE s)
Specified by:
underlyingObjectToObject in class org.neo4j.helpers.collection.IterableWrapper<ENTITY,STATE extends org.neo4j.graphdb.PropertyContainer>

create

public static <S extends org.neo4j.graphdb.PropertyContainer,E> GraphBackedEntityIterableWrapper<S,E> create(Iterable<S> iterable,
                                                                                                             Class<E> targetType,
                                                                                                             Neo4jTemplate template)

Spring Data Neo4j

Copyright © 2011 SpringSource. All Rights Reserved.