diff --git a/src/main/java/com/arangodb/ArangoCollection.java b/src/main/java/com/arangodb/ArangoCollection.java index 298182b85..8c0b3935c 100644 --- a/src/main/java/com/arangodb/ArangoCollection.java +++ b/src/main/java/com/arangodb/ArangoCollection.java @@ -79,7 +79,7 @@ public interface ArangoCollection extends ArangoSerializationAccessor { /** * Creates new documents from the given documents, unless there is already a document with the _key given. If no * _key is given, a new unique _key is generated automatically. - * + *

* Limitations: * - the fields having {@code null} value are always removed during serialization * @@ -94,7 +94,7 @@ public interface ArangoCollection extends ArangoSerializationAccessor { /** * Creates new documents from the given documents, unless there is already a document with the _key given. If no * _key is given, a new unique _key is generated automatically. - * + *

* Limitations: * - the fields having {@code null} value are always removed during serialization * @@ -110,7 +110,7 @@ MultiDocumentEntity> insertDocuments( /** * Bulk imports the given values into the collection. - * + *

* Limitations: * - the fields having {@code null} value are always removed during serialization * @@ -122,7 +122,7 @@ MultiDocumentEntity> insertDocuments( /** * Bulk imports the given values into the collection. - * + *

* Limitations: * - the fields having {@code null} value are always removed during serialization * @@ -135,7 +135,7 @@ MultiDocumentEntity> insertDocuments( /** * Bulk imports the given values into the collection. - * + *

* Limitations: * - the fields having {@code null} value are always removed during serialization * @@ -147,7 +147,7 @@ MultiDocumentEntity> insertDocuments( /** * Bulk imports the given values into the collection. - * + *

* Limitations: * - the fields having {@code null} value are always removed during serialization * @@ -236,7 +236,7 @@ DocumentUpdateEntity replaceDocument(String key, T value, DocumentReplace /** * Replaces multiple documents in the specified collection with the ones in the values, the replaced documents are * specified by the _key attributes in the documents in values. - * + *

* Limitations: * - the fields having {@code null} value are always removed during serialization * @@ -251,7 +251,7 @@ DocumentUpdateEntity replaceDocument(String key, T value, DocumentReplace /** * Replaces multiple documents in the specified collection with the ones in the values, the replaced documents are * specified by the _key attributes in the documents in values. - * + *

* Limitations: * - the fields having {@code null} value are always removed during serialization * @@ -300,10 +300,10 @@ DocumentUpdateEntity updateDocument(String key, T value, DocumentUpdateOp * to patch (the patch document). All attributes from the patch document will be added to the existing document if * they do not yet exist, and overwritten in the existing document if they do exist there. * - * @param key The key of the document - * @param value A representation of a single document (POJO, VPackSlice or String for JSON) - * @param options Additional options, can be null - * @param returnType Type of the returned newDocument and/or oldDocument + * @param key The key of the document + * @param value A representation of a single document (POJO, VPackSlice or String for JSON) + * @param options Additional options, can be null + * @param returnType Type of the returned newDocument and/or oldDocument * @return information about the document * @throws ArangoDBException * @see API @@ -465,7 +465,10 @@ MultiDocumentEntity> deleteDocuments( * @return information about the index * @throws ArangoDBException * @see API Documentation + * @deprecated use {@link #ensurePersistentIndex(Iterable, PersistentIndexOptions)} instead. Since ArangoDB 3.7 a + * hash index is an alias for a persistent index. */ + @Deprecated IndexEntity ensureHashIndex(Iterable fields, HashIndexOptions options) throws ArangoDBException; /** @@ -477,7 +480,10 @@ MultiDocumentEntity> deleteDocuments( * @throws ArangoDBException * @see API * Documentation + * @deprecated use {@link #ensurePersistentIndex(Iterable, PersistentIndexOptions)} instead. Since ArangoDB 3.7 a + * skiplist index is an alias for a persistent index. */ + @Deprecated IndexEntity ensureSkiplistIndex(Iterable fields, SkiplistIndexOptions options) throws ArangoDBException; /** diff --git a/src/main/java/com/arangodb/async/ArangoCollectionAsync.java b/src/main/java/com/arangodb/async/ArangoCollectionAsync.java index e0d81b44c..1b63c1e3d 100644 --- a/src/main/java/com/arangodb/async/ArangoCollectionAsync.java +++ b/src/main/java/com/arangodb/async/ArangoCollectionAsync.java @@ -433,7 +433,10 @@ CompletableFuture>> deleteDocume * @param options Additional options, can be null * @return information about the index * @see API Documentation + * @deprecated use {@link #ensurePersistentIndex(Iterable, PersistentIndexOptions)} instead. Since ArangoDB 3.7 a + * hash index is an alias for a persistent index. */ + @Deprecated CompletableFuture ensureHashIndex(final Iterable fields, final HashIndexOptions options); /** @@ -444,7 +447,10 @@ CompletableFuture>> deleteDocume * @return information about the index * @see API * Documentation + * @deprecated use {@link #ensurePersistentIndex(Iterable, PersistentIndexOptions)} instead. Since ArangoDB 3.7 a + * skiplist index is an alias for a persistent index. */ + @Deprecated CompletableFuture ensureSkiplistIndex( final Iterable fields, final SkiplistIndexOptions options); diff --git a/src/main/java/com/arangodb/async/internal/ArangoCollectionAsyncImpl.java b/src/main/java/com/arangodb/async/internal/ArangoCollectionAsyncImpl.java index 62bbc2dca..036f16da2 100644 --- a/src/main/java/com/arangodb/async/internal/ArangoCollectionAsyncImpl.java +++ b/src/main/java/com/arangodb/async/internal/ArangoCollectionAsyncImpl.java @@ -264,6 +264,7 @@ public CompletableFuture deleteIndex(final String id) { } @Override + @Deprecated public CompletableFuture ensureHashIndex( final Iterable fields, final HashIndexOptions options) { @@ -271,6 +272,7 @@ public CompletableFuture ensureHashIndex( } @Override + @Deprecated public CompletableFuture ensureSkiplistIndex( final Iterable fields, final SkiplistIndexOptions options) { diff --git a/src/main/java/com/arangodb/internal/ArangoCollectionImpl.java b/src/main/java/com/arangodb/internal/ArangoCollectionImpl.java index 1822a1dfe..ef362803b 100644 --- a/src/main/java/com/arangodb/internal/ArangoCollectionImpl.java +++ b/src/main/java/com/arangodb/internal/ArangoCollectionImpl.java @@ -259,12 +259,14 @@ public String deleteIndex(final String id) throws ArangoDBException { return executor.execute(deleteIndexRequest(id), deleteIndexResponseDeserializer()); } + @Deprecated @Override public IndexEntity ensureHashIndex(final Iterable fields, final HashIndexOptions options) throws ArangoDBException { return executor.execute(createHashIndexRequest(fields, options), IndexEntity.class); } + @Deprecated @Override public IndexEntity ensureSkiplistIndex(final Iterable fields, final SkiplistIndexOptions options) throws ArangoDBException { diff --git a/src/main/java/com/arangodb/internal/InternalArangoCollection.java b/src/main/java/com/arangodb/internal/InternalArangoCollection.java index ae590fe12..6bb1db75e 100644 --- a/src/main/java/com/arangodb/internal/InternalArangoCollection.java +++ b/src/main/java/com/arangodb/internal/InternalArangoCollection.java @@ -547,6 +547,7 @@ private String createIndexId(final String id) { return index; } + @Deprecated protected Request createHashIndexRequest(final Iterable fields, final HashIndexOptions options) { final Request request = request(db.dbName(), RequestType.POST, PATH_API_INDEX); request.putQueryParam(COLLECTION, name); @@ -555,6 +556,7 @@ protected Request createHashIndexRequest(final Iterable fields, final Ha return request; } + @Deprecated protected Request createSkiplistIndexRequest(final Iterable fields, final SkiplistIndexOptions options) { final Request request = request(db.dbName(), RequestType.POST, PATH_API_INDEX); request.putQueryParam(COLLECTION, name); diff --git a/src/main/java/com/arangodb/model/HashIndexOptions.java b/src/main/java/com/arangodb/model/HashIndexOptions.java index 20eff1d44..3af784ebb 100644 --- a/src/main/java/com/arangodb/model/HashIndexOptions.java +++ b/src/main/java/com/arangodb/model/HashIndexOptions.java @@ -25,7 +25,10 @@ /** * @author Mark Vollmary * @see API Documentation + * @deprecated use {@link PersistentIndexOptions} instead. Since ArangoDB 3.7 a hash index is an alias for a persistent + * index. */ +@Deprecated public class HashIndexOptions extends IndexOptions { private Iterable fields; diff --git a/src/main/java/com/arangodb/model/OptionsBuilder.java b/src/main/java/com/arangodb/model/OptionsBuilder.java index c9da750cf..ab99ad37f 100644 --- a/src/main/java/com/arangodb/model/OptionsBuilder.java +++ b/src/main/java/com/arangodb/model/OptionsBuilder.java @@ -41,10 +41,20 @@ public static UserCreateOptions build(final UserCreateOptions options, final Str return options.user(user).passwd(passwd); } + /** + * @deprecated use {@link #build(PersistentIndexOptions, Iterable)} instead. Since ArangoDB 3.7 a hash index is an + * alias for a persistent index. + */ + @Deprecated public static HashIndexOptions build(final HashIndexOptions options, final Iterable fields) { return options.fields(fields); } + /** + * @deprecated use {@link #build(PersistentIndexOptions, Iterable)} instead. Since ArangoDB 3.7 a skiplist index is + * an alias for a persistent index. + */ + @Deprecated public static SkiplistIndexOptions build(final SkiplistIndexOptions options, final Iterable fields) { return options.fields(fields); } diff --git a/src/main/java/com/arangodb/model/SkiplistIndexOptions.java b/src/main/java/com/arangodb/model/SkiplistIndexOptions.java index 30d000f59..15f3dcdfe 100644 --- a/src/main/java/com/arangodb/model/SkiplistIndexOptions.java +++ b/src/main/java/com/arangodb/model/SkiplistIndexOptions.java @@ -25,7 +25,10 @@ /** * @author Mark Vollmary * @see API Documentation + * @deprecated use {@link PersistentIndexOptions} instead. Since ArangoDB 3.7 a skiplist index is an alias for a + * persistent index. */ +@Deprecated public class SkiplistIndexOptions extends IndexOptions { private Iterable fields;