getIdentifiers();
-
- /**
- * Signifies that the query was profiled, and that statistics from the profiling can
- * {@link #getProfilerStatistics() be retrieved}.
- *
- * The {@code PROFILE} directive in Cypher
- * ensures the presence of profiler statistics in the plan description.
- *
- * @return true, if {@link ProfilerStatistics} are available for this execution step
- */
- boolean hasProfilerStatistics();
-
- /**
- * Retrieve the statistics collected from profiling this query.
- *
- * If the query was not profiled, this method will throw {@link java.util.NoSuchElementException}.
- *
- * @return profiler statistics for this execution step iff available
- * @throws java.util.NoSuchElementException iff profiler statistics are not available
- */
- ProfilerStatistics getProfilerStatistics();
-
- /**
- * Instances describe statistics from the profiler of a particular step in the execution plan.
- */
- interface ProfilerStatistics
- {
- /**
- * @return number of rows processed by the associated execution step
- */
- long getRows();
-
- /**
- * @return number of database hits (potential disk accesses) caused by executing the associated execution step
- */
- long getDbHits();
- }
-}
diff --git a/spring-data-neo4j/src/main/java/org/neo4j/graphdb/QueryExecutionType.java b/spring-data-neo4j/src/main/java/org/neo4j/graphdb/QueryExecutionType.java
deleted file mode 100644
index d036ab485..000000000
--- a/spring-data-neo4j/src/main/java/org/neo4j/graphdb/QueryExecutionType.java
+++ /dev/null
@@ -1,228 +0,0 @@
-/*
- * Copyright (c) 2002-2015 "Neo Technology,"
- * Network Engine for Objects in Lund AB [http://neotechnology.com]
- *
- * This file is part of Neo4j.
- *
- * Neo4j is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package org.neo4j.graphdb;
-
-import static java.util.Objects.requireNonNull;
-
-/**
- * Signifies how a query is executed, as well as what side effects and results could be expected from the query.
- *
- * In Cypher there are three different modes of execution:
- *
- * Instances of this class contain the required information to be able to tell these different execution modes apart.
- * It also contains information about what effects the query could have, and whether it could yield any results, in
- * form
- * of the {@link QueryType QueryType enum}.
- *
- * Queries executed with the {@code PROFILE} directive can have side effects and produce results in the same way as a
- * normally executed method. The difference being that the user has expressed an interest in seeing the plan used to
- * execute the query, and that this plan will (after execution completes) be annotated with
- * {@linkplain org.neo4j.graphdb.ExecutionPlanDescription#getProfilerStatistics() profiling information} from the execution of the query.
- *
- * Queries executed with the {@code EXPLAIN} directive never have any side effects, nor do they ever yield any rows in
- * the results, the sole purpose of this mode of execution is to
- * {@linkplain org.neo4j.graphdb.Result#getExecutionPlanDescription() get a description of the plan} that would be executed
- * if/when the query is executed normally (or under {@code PROFILE}).
- */
-public final class QueryExecutionType
-{
- /**
- * Signifies what type of query an {@link QueryExecutionType} executes.
- */
- public enum QueryType
- {
- /** A read-only query, that does not change any data, but only produces a result. */
- READ_ONLY,
- /** A read/write query, that creates or updates data, and also produces a result. */
- READ_WRITE,
- /** A write-only query, that creates or updates data, but does not yield any rows in the result. */
- WRITE,
- /**
- * A schema changing query, that updates the schema but neither changes any data nor yields any rows in the
- * result.
- */
- SCHEMA_WRITE,;
- private final QueryExecutionType query, profiled, explained;
-
- QueryType()
- {
- this.query = new QueryExecutionType( Execution.QUERY, this );
- this.profiled = new QueryExecutionType( Execution.PROFILE, this );
- this.explained = new QueryExecutionType( Execution.EXPLAIN, this );
- }
- }
-
- /**
- * Get the {@link QueryExecutionType} that signifies normal execution of a query of the supplied type.
- *
- * @param type the type of query executed.
- * @return The instance that signifies normal execution of the supplied {@link QueryType}.
- */
- public static QueryExecutionType query( QueryType type )
- {
- return requireNonNull( type, "QueryType" ).query;
- }
-
- /**
- * Get the {@link QueryExecutionType} that signifies profiled execution of a query of the supplied type.
- *
- * @param type the type of query executed.
- * @return The instance that signifies profiled execution of the supplied {@link QueryType}.
- */
- public static QueryExecutionType profiled( QueryType type )
- {
- return requireNonNull( type, "QueryType" ).profiled;
- }
-
- /**
- * Get the {@link QueryExecutionType} that signifies explaining the plan of a query of the supplied type.
- *
- * @param type the type of query executed.
- * @return The instance that signifies explaining the plan of the supplied {@link QueryType}.
- */
- public static QueryExecutionType explained( QueryType type )
- {
- return requireNonNull( type, "QueryType" ).explained;
- }
-
- /**
- * Get the type of query this execution refers to.
- *
- * @return the type of query this execution refers to.
- */
- public QueryType queryType()
- {
- return type;
- }
-
- /**
- * Signifies whether results from this execution
- * {@linkplain org.neo4j.graphdb.ExecutionPlanDescription#getProfilerStatistics() contains profiling information}.
- *
- * This is {@code true} for queries executed with the
- * {@code PROFILE} directive.
- *
- * @return {@code true} if the results from this execution would contain profiling information.
- */
- public boolean isProfiled()
- {
- return execution == Execution.PROFILE;
- }
-
- /**
- * Signifies whether the supplied query contained a directive that asked for a
- * {@linkplain org.neo4j.graphdb.ExecutionPlanDescription description of the execution plan}.
- *
- * This is {@code true} for queries executed with either the
- * {@code EXPLAIN} or {@code PROFILE} directives.
- *
- * @return {@code true} if a description of the plan should be presented to the user.
- */
- public boolean requestedExecutionPlanDescription()
- {
- return execution != Execution.QUERY;
- }
-
- /**
- * Signifies that the query was executed with the
- * {@code EXPLAIN} directive.
- *
- * @return {@code true} if the query was executed using the {@code EXPLAIN} directive.
- */
- public boolean isExplained()
- {
- return execution == Execution.EXPLAIN;
- }
-
- /**
- * Signifies that the execution of the query could produce a result.
- *
- * This is an important distinction from the result being empty.
- *
- * @return {@code true} if the execution would yield rows in the result set.
- */
- public boolean canContainResults()
- {
- return (type == QueryType.READ_ONLY || type == QueryType.READ_WRITE) && execution != Execution.EXPLAIN;
- }
-
- /**
- * Signifies that the execution of the query could perform changes to the data.
- *
- * {@link org.neo4j.graphdb.Result}{@link org.neo4j.graphdb.Result#getQueryStatistics() .getQueryStatistics()}{@link org.neo4j.graphdb.QueryStatistics#containsUpdates()
- * .containsUpdates()} signifies whether the query actually performed any updates.
- *
- * @return {@code true} if the execution could perform changes to data.
- */
- public boolean canUpdateData()
- {
- return (type == QueryType.READ_WRITE || type == QueryType.WRITE) && execution != Execution.EXPLAIN;
- }
-
- /**
- * Signifies that the execution of the query updates the schema.
- *
- * @return {@code true} if the execution updates the schema.
- */
- public boolean canUpdateSchema()
- {
- return type == QueryType.SCHEMA_WRITE && execution != Execution.EXPLAIN;
- }
-
- private final Execution execution;
- private final QueryType type;
-
- private QueryExecutionType(Execution execution, QueryType type)
- {
- this.execution = execution;
- this.type = type;
- }
-
- @Override
- public String toString()
- {
- return execution.toString( type );
- }
-
- private enum Execution
- {
- QUERY
- {
- @Override
- String toString( QueryType type )
- {
- return type.name();
- }
- },
- PROFILE,
- EXPLAIN,;
-
- String toString( QueryType type )
- {
- return name() + ":" + type.name();
- }
- }
-}
diff --git a/spring-data-neo4j/src/main/java/org/neo4j/graphdb/QueryStatistics.java b/spring-data-neo4j/src/main/java/org/neo4j/graphdb/QueryStatistics.java
deleted file mode 100644
index 81564a233..000000000
--- a/spring-data-neo4j/src/main/java/org/neo4j/graphdb/QueryStatistics.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Copyright (c) 2002-2015 "Neo Technology,"
- * Network Engine for Objects in Lund AB [http://neotechnology.com]
- *
- * This file is part of Neo4j.
- *
- * Neo4j is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package org.neo4j.graphdb;
-
-/**
- * Represents statistics about the effects of a query.
- *
- * If the query did not perform any {@link #containsUpdates() updates}, all the methods of this interface will return
- * {@code 0}.
- */
-public interface QueryStatistics
-{
- /**
- * Returns the number of nodes created by this query.
- *
- * @return the number of nodes created by this query.
- */
- int getNodesCreated();
-
- /**
- * Returns the number of nodes deleted by this query.
- *
- * @return the number of nodes deleted by this query.
- */
- int getNodesDeleted();
-
- /**
- * Returns the number of relationships created by this query.
- *
- * @return the number of relationships created by this query.
- */
- int getRelationshipsCreated();
-
- /**
- * Returns the number of relationships deleted by this query.
- *
- * @return the number of relationships deleted by this query.
- */
- int getRelationshipsDeleted();
-
- /**
- * Returns the number of properties set by this query. Setting a property to the same value again still counts
- * towards this.
- *
- * @return the number of properties set by this query.
- */
- int getPropertiesSet();
-
- /**
- * Returns the number of labels added to any node by this query.
- *
- * @return the number of labels added to any node by this query.
- */
- int getLabelsAdded();
-
- /**
- * Returns the number of labels removed from any node by this query.
- *
- * @return the number of labels removed from any node by this query.
- */
- int getLabelsRemoved();
-
- /**
- * Returns the number of indexes added by this query.
- *
- * @return the number of indexes added by this query.
- */
- int getIndexesAdded();
-
- /**
- * Returns the number of indexes removed by this query.
- *
- * @return the number of indexes removed by this query.
- */
- int getIndexesRemoved();
-
- /**
- * Returns the number of constraints added by this query.
- *
- * @return the number of constraints added by this query.
- */
- int getConstraintsAdded();
-
- /**
- * Returns the number of constraints removed by this query.
- *
- * @return the number of constraints removed by this query.
- */
- int getConstraintsRemoved();
-
- /**
- * If the query updated the graph in any way, this method will return true.
- *
- * @return if the graph has been updated.
- */
- boolean containsUpdates();
-}
diff --git a/spring-data-neo4j/src/main/java/org/neo4j/graphdb/Result.java b/spring-data-neo4j/src/main/java/org/neo4j/graphdb/Result.java
deleted file mode 100644
index c72cddbeb..000000000
--- a/spring-data-neo4j/src/main/java/org/neo4j/graphdb/Result.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- * Copyright (c) 2002-2015 "Neo Technology,"
- * Network Engine for Objects in Lund AB [http://neotechnology.com]
- *
- * This file is part of Neo4j.
- *
- * Neo4j is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package org.neo4j.graphdb;
-
-import java.io.PrintWriter;
-import java.util.List;
-import java.util.Map;
-
-/**
- * Represents the result of {@link org.neo4j.graphdb.GraphDatabaseService#execute(String, java.util.Map) executing} a query.
- *
- * The result is comprised of a number of rows, potentially computed lazily, with this result object being an iterator
- * over those rows. Each row is represented as a {@link java.util.Map}<{@link String}, {@link Object}>, the
- * keys in this map are the names of the columns in the row, as specified by the {@code return} clause of the query,
- * and the values of the map is the corresponding computed value of the expression in the {@code return} clause. Each
- * row will thus have the same set of keys, and these keys can be retrieved using the
- * {@linkplain #columns() columns-method}.
- *
- * To ensure that any resource, including transactions bound to the query, are properly freed, the result must either
- * be fully exhausted, by means of the {@linkplain java.util.Iterator iterator protocol}, or the result has to be
- * explicitly closed, by invoking the {@linkplain #close() close-method}.
- *
- * Idiomatic use of the Result object would look like this:
- *
- * try ( Result result = graphDatabase.execute( query, parameters ) )
- * {
- * while ( result.hasNext() )
- * {
- * Map<String, Object> row = result.next();
- * for ( String key : result.columns() )
- * {
- * System.out.printf( "%s = %s%n", key, row.get( key ) );
- * }
- * }
- * }
- *
- * If the result consists of only a single column, or if only one of the columns is of interest, a projection can be
- * extracted using {@link #columnAs(String)}. This produces a new iterator over the values of the named column. It
- * should be noted that this iterator consumes the rows of the result in the same way as invoking {@link #next()} on
- * this object would, and that the {@link #close() close-method} on either iterator has the same effect. It is thus
- * safe to either close the projected column iterator, or this iterator, or both if all rows have not been consumed.
- *
- * In addition to the {@link #next() iteration methods} on this interface, {@link #close()}, and the
- * {@link #columnAs(String) column projection method}, there are two methods for getting a string representation of the
- * result that also consumes the entire result if invoked. {@link #resultAsString()} returns a single string
- * representation of all (remaining) rows in the result, and {@link #writeAsStringTo(java.io.PrintWriter)} does the same, but
- * streams the result to the provided {@link java.io.PrintWriter} instead, without allocating large string objects.
- *
- * The methods that do not consume any rows from the result, or in other ways alter the state of the result are safe to
- * invoke at any time, even after the result has been {@linkplain #close() closed} or fully exhausted. These methods
- * are:
- *
- * - {@link #columns()}
- * - {@link #getQueryStatistics()}
- * - {@link #getQueryExecutionType()}
- * - {@link #getExecutionPlanDescription()}
- *
- *
- * Not all queries produce an actual result, and some queries that do might yield an empty result set. In order to
- * distinguish between these cases the {@link org.neo4j.graphdb.QueryExecutionType} {@linkplain #getQueryExecutionType() of this result}
- * can be queried.
- */
-public interface Result extends ResourceIterator