@Override public Iterable<BatchRelationship> getRelationships( long nodeId ) { return delegate.getRelationships( nodeId ); }
@Test public void testMore() { BatchInserter graphDb = globalInserter; long startNode = graphDb.createNode( properties ); long[] endNodes = new long[25]; Set<Long> rels = new HashSet<>(); for ( int i = 0; i < 25; i++ ) { endNodes[i] = graphDb.createNode( properties ); rels.add( graphDb.createRelationship( startNode, endNodes[i], relTypeArray[i % 5], properties ) ); } for ( BatchRelationship rel : graphDb.getRelationships( startNode ) ) { assertTrue( rels.contains( rel.getId() ) ); assertEquals( rel.getStartNode(), startNode ); } graphDb.setNodeProperties( startNode, properties ); }
long relationship = graphDb.createRelationship( startNode, otherNode, relTypeArray[0], properties ); for ( BatchRelationship rel : graphDb.getRelationships( startNode ) )
@Override public Iterable<BatchRelationship> getRelationships( long nodeId ) { return delegate.getRelationships( nodeId ); }
public BatchInserterRelationshipIterator(long nodeId, BatchInserter batchInserter, Direction direction, RelationshipType... relationshipTypes) { this.nodeId = nodeId; this.batchInserter = batchInserter; this.batchRelationships = batchInserter.getRelationships(nodeId).iterator(); this.direction = direction; this.relationshipTypes = relationshipTypes; //empty = none }
public BatchInserterRelationshipIterator(long nodeId, BatchInserter batchInserter, Direction direction) { this.nodeId = nodeId; this.batchInserter = batchInserter; this.batchRelationships = batchInserter.getRelationships(nodeId).iterator(); this.direction = direction; this.relationshipTypes = null; // = any }