@Override public Node endNode() { return new NodeProxy( proxySPI, nodes[nodes.length - 1] ); }
@Override public Node startNode() { return new NodeProxy( proxySPI, nodes[0] ); }
@Override public Node node() { return new NodeProxy( proxySpi, nodeId ); }
@Override public Node entity() { return new NodeProxy( proxySpi, nodeId ); }
@Override public NodeProxy newNodeProxy( long nodeId ) { return new NodeProxy( this, nodeId ); }
@Override public NodeProxy newNodeProxy( long nodeId ) { return new NodeProxy( this, nodeId ); }
private NodeProxy createNodeProxy( int nodeId ) { return new NodeProxy( spi, nodeId ); }
@Override public Node mapNode( VirtualNodeValue value ) { assert !(value instanceof NodeReference); if ( value instanceof NodeProxyWrappingNodeValue ) { // this is the back door through which "virtual nodes" slip return ((NodeProxyWrappingNodeValue) value).nodeProxy(); } return new NodeProxy( proxySPI, value.id() ); }
private Iterable<Node> map2Nodes( LongIterable ids ) { return ids.asLazy().collect( id -> new NodeProxy( proxySpi, id ) ); }
private TxStateTransactionDataSnapshot snapshot() { EmbeddedProxySPI spi = mock( EmbeddedProxySPI.class ); when( spi.newNodeProxy( anyLong() ) ).thenAnswer( invocation -> new NodeProxy( spi, invocation.getArgument( 0 ) ) ); when( spi.newRelationshipProxy( anyLong() ) ).thenAnswer( invocation -> new RelationshipProxy( spi, invocation.getArgument( 0 ) ) ); when( spi.newRelationshipProxy( anyLong(), anyLong(), anyInt(), anyLong() ) ).thenAnswer( invocation -> new RelationshipProxy( spi, invocation.getArgument( 0 ), invocation.getArgument( 1 ), invocation.getArgument( 2 ), invocation.getArgument( 3 ) ) ); return new TxStateTransactionDataSnapshot( state, spi, ops, transaction ); } }
@Override public Node startNode() { return new NodeProxy( proxySPI, nodes[0] ); }
@Override public Node endNode() { return new NodeProxy( proxySPI, nodes[nodes.length - 1] ); }
@Override public Node node() { return new NodeProxy( proxySpi, nodeId ); }
@Override public NodeProxy newNodeProxy( long nodeId ) { return new NodeProxy( this, nodeId ); }
@Override public Node entity() { return new NodeProxy( proxySpi, nodeId ); }
@Override public Node mapNode( VirtualNodeValue value ) { assert !(value instanceof NodeReference); if ( value instanceof NodeProxyWrappingNodeValue ) { // this is the back door through which "virtual nodes" slip return ((NodeProxyWrappingNodeValue) value).nodeProxy(); } return new NodeProxy( proxySPI, value.id() ); }
private Iterable<Node> map2Nodes( LongIterable ids ) { return ids.asLazy().collect( id -> new NodeProxy( proxySpi, id ) ); }