//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public org.neo4j.graphdb.index.IndexHits<org.neo4j.graphdb.Node> query(org.neo4j.kernel.api.KernelTransaction ktx, String name, Object queryOrQueryObject, org.neo4j.graphdb.GraphDatabaseService graphDatabaseService) throws org.neo4j.internal.kernel.api.exceptions.explicitindex.ExplicitIndexNotFoundKernelException public IndexHits <Node> query(KernelTransaction ktx, string name, object queryOrQueryObject, GraphDatabaseService graphDatabaseService) { NodeExplicitIndexCursor cursor = ktx.Cursors().allocateNodeExplicitIndexCursor(); ktx.IndexRead().nodeExplicitIndexQuery(cursor, name, queryOrQueryObject); return(new CursorWrappingNodeIndexHits(cursor, graphDatabaseService, ktx, name)); }
internal CursorWrappingNodeIndexHits(NodeExplicitIndexCursor cursor, GraphDatabaseService graphDatabaseService, KernelTransaction ktx, string name) : base(cursor.ExpectedTotalNumberOfResults(), cursor.Score()) { this.Cursor = cursor; this.GraphDatabaseService = graphDatabaseService; this.Ktx = ktx; this.Name = name; }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public org.neo4j.graphdb.index.IndexHits<org.neo4j.graphdb.Node> get(org.neo4j.kernel.api.KernelTransaction ktx, String name, String key, Object value, org.neo4j.graphdb.GraphDatabaseService graphDatabaseService) throws org.neo4j.internal.kernel.api.exceptions.explicitindex.ExplicitIndexNotFoundKernelException public IndexHits <Node> get(KernelTransaction ktx, string name, string key, object value, GraphDatabaseService graphDatabaseService) { NodeExplicitIndexCursor cursor = ktx.Cursors().allocateNodeExplicitIndexCursor(); ktx.IndexRead().nodeExplicitIndexLookup(cursor, name, key, value); return(new CursorWrappingNodeIndexHits(cursor, graphDatabaseService, ktx, name)); }
public override NodeExplicitIndexCursor AllocateNodeExplicitIndexCursor() { NodeExplicitIndexCursor n = _cursors.allocateNodeExplicitIndexCursor(); _allCursors.Add(n); return(n); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldFindNodeByQuery() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void ShouldFindNodeByQuery() { // given using (NodeExplicitIndexCursor cursor = cursors.allocateNodeExplicitIndexCursor()) { MutableLongSet nodes = new LongHashSet(); // when indexRead.nodeExplicitIndexQuery(cursor, "foo", "bar:this*"); // then assertNodeCount(cursor, 1, nodes); // when nodes.clear(); indexRead.nodeExplicitIndexQuery(cursor, "foo", "bar", "this*"); // then assertNodeCount(cursor, 1, nodes); // when indexRead.nodeExplicitIndexQuery(cursor, "foo", "bar:that*"); // then assertNodeCount(cursor, 0, nodes); // when indexRead.nodeExplicitIndexQuery(cursor, "foo", "bar", "that*"); // then assertNodeCount(cursor, 0, nodes); } }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldFindNodeByLookup() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void ShouldFindNodeByLookup() { // given using (NodeExplicitIndexCursor cursor = cursors.allocateNodeExplicitIndexCursor()) { MutableLongSet nodes = new LongHashSet(); // when indexRead.nodeExplicitIndexLookup(cursor, "foo", "bar", "this is it"); // then assertNodeCount(cursor, 1, nodes); // when indexRead.nodeExplicitIndexLookup(cursor, "foo", "bar", "not that"); // then assertNodeCount(cursor, 0, nodes); } }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public final void nodeExplicitIndexQuery(org.neo4j.internal.kernel.api.NodeExplicitIndexCursor cursor, String index, String key, Object query) throws org.neo4j.internal.kernel.api.exceptions.explicitindex.ExplicitIndexNotFoundKernelException public override void NodeExplicitIndexQuery(NodeExplicitIndexCursor cursor, string index, string key, object query) { Ktx.assertOpen(); (( DefaultNodeExplicitIndexCursor )cursor).Read = this; ExplicitIndex(( DefaultNodeExplicitIndexCursor )cursor, ExplicitNodeIndex(index).query(key, query is Value ? (( Value )query).asObject() : query)); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public final void nodeExplicitIndexLookup(org.neo4j.internal.kernel.api.NodeExplicitIndexCursor cursor, String index, String key, Object value) throws org.neo4j.internal.kernel.api.exceptions.explicitindex.ExplicitIndexNotFoundKernelException public override void NodeExplicitIndexLookup(NodeExplicitIndexCursor cursor, string index, string key, object value) { Ktx.assertOpen(); (( DefaultNodeExplicitIndexCursor )cursor).Read = this; ExplicitIndex(( DefaultNodeExplicitIndexCursor )cursor, ExplicitNodeIndex(index).get(key, value)); }