Package science.aist.neo4j.transaction
Class ResultClone
- java.lang.Object
-
- science.aist.neo4j.transaction.ResultClone
-
- All Implemented Interfaces:
Iterator<org.neo4j.driver.Record>,org.neo4j.driver.Result
public class ResultClone extends Object implements org.neo4j.driver.Result
Helper Class for Neo4J 4 that copies all Results, to prevent them becoming unavailable after the transaction is closed. This class is only needed when you load Results that should become available OUTSIDE of a transaction. Preferrably you should use the science.aist.neo4j.annotation.Transaction annotation.- Since:
- 1.0
- Author:
- Oliver Krauss
-
-
Constructor Summary
Constructors Constructor Description ResultClone(org.neo4j.driver.Result apply)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.neo4j.driver.summary.ResultSummaryconsume()booleanhasNext()List<String>keys()List<org.neo4j.driver.Record>list()<T> List<T>list(Function<org.neo4j.driver.Record,T> function)org.neo4j.driver.Recordnext()org.neo4j.driver.Recordpeek()org.neo4j.driver.Recordsingle()Stream<org.neo4j.driver.Record>stream()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining, remove
-
-
-
-
Method Detail
-
hasNext
public boolean hasNext()
-
next
public org.neo4j.driver.Record next()
-
single
public org.neo4j.driver.Record single() throws org.neo4j.driver.exceptions.NoSuchRecordException- Specified by:
singlein interfaceorg.neo4j.driver.Result- Throws:
org.neo4j.driver.exceptions.NoSuchRecordException
-
peek
public org.neo4j.driver.Record peek()
- Specified by:
peekin interfaceorg.neo4j.driver.Result
-
stream
public Stream<org.neo4j.driver.Record> stream()
- Specified by:
streamin interfaceorg.neo4j.driver.Result
-
list
public List<org.neo4j.driver.Record> list()
- Specified by:
listin interfaceorg.neo4j.driver.Result
-
list
public <T> List<T> list(Function<org.neo4j.driver.Record,T> function)
- Specified by:
listin interfaceorg.neo4j.driver.Result
-
consume
public org.neo4j.driver.summary.ResultSummary consume()
- Specified by:
consumein interfaceorg.neo4j.driver.Result
-
-