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.ResultSummary
consume()
boolean
hasNext()
List<String>
keys()
List<org.neo4j.driver.Record>
list()
<T> List<T>
list(Function<org.neo4j.driver.Record,T> function)
org.neo4j.driver.Record
next()
org.neo4j.driver.Record
peek()
org.neo4j.driver.Record
single()
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:
single
in interfaceorg.neo4j.driver.Result
- Throws:
org.neo4j.driver.exceptions.NoSuchRecordException
-
peek
public org.neo4j.driver.Record peek()
- Specified by:
peek
in interfaceorg.neo4j.driver.Result
-
stream
public Stream<org.neo4j.driver.Record> stream()
- Specified by:
stream
in interfaceorg.neo4j.driver.Result
-
list
public List<org.neo4j.driver.Record> list()
- Specified by:
list
in interfaceorg.neo4j.driver.Result
-
list
public <T> List<T> list(Function<org.neo4j.driver.Record,T> function)
- Specified by:
list
in interfaceorg.neo4j.driver.Result
-
consume
public org.neo4j.driver.summary.ResultSummary consume()
- Specified by:
consume
in interfaceorg.neo4j.driver.Result
-
-