Package oracle.pgx.api
Class GraphEntityCollection<E extends PgxEntity<ID>,ID>
- java.lang.Object
-
- oracle.pgx.api.internal.ApiObject
-
- oracle.pgx.api.Destroyable
-
- oracle.pgx.api.PgxManagedObject
-
- oracle.pgx.api.PgxCollection<E,ID>
-
- oracle.pgx.api.GraphEntityCollection<E,ID>
-
- Type Parameters:
E- the element typeID- the ID type of the element type
- All Implemented Interfaces:
java.lang.AutoCloseable,java.lang.Iterable<E>,oracle.pgx.common.IdentifiableCollection
- Direct Known Subclasses:
EdgeCollection,VertexCollection
public abstract class GraphEntityCollection<E extends PgxEntity<ID>,ID> extends PgxCollection<E,ID>
A collection of vertices/edges.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddAll(PgxEntity[] elements)Adds elements of aPgxEntityarray to this collection.abstract voidaddAllById(ID... ids)Replaces#addAll(Object[]).voidaddAllById(java.util.Collection<ID> source)Blocking version ofaddAllByIdAsync(Collection).PgxFuture<java.lang.Void>addAllByIdAsync(java.util.Collection<ID> source)Adds vertices/edges to an existing collection using their associated IDsPgxFuture<java.lang.Void>addAllElementsAsync(java.util.Collection<E> source)Adds elements to an existing collection.PgxFuture<java.lang.Boolean>containsAsync(E element)Returnstrueif this collection contains the specified element.abstract voidremoveAllById(ID... ids)Replaces#removeAll(Object[]).voidremoveAllById(java.util.Collection<ID> source)Blocking version ofremoveAllByIdAsync(Collection).PgxFuture<java.lang.Void>removeAllByIdAsync(java.util.Collection<ID> source)Removes vertices/edges from an existing vertex/edge collection using their associated IDsPgxFuture<java.lang.Void>removeAllElementsAsync(java.util.Collection<E> source)Removes elements from an existing collection.-
Methods inherited from class oracle.pgx.api.PgxCollection
add, addAllAsync, addAllElements, clear, clearAsync, clone, clone, cloneAsync, cloneAsync, contains, destroyAsync, getCollectionType, getContentType, getGraph, getId, getIdType, getName, isMutable, isMutableAsync, iterator, iteratorAsync, remove, removeAllElements, size, sizeAsync, stream, toMutable, toMutable, toMutableAsync, toMutableAsync, toString
-
Methods inherited from class oracle.pgx.api.PgxManagedObject
equals, hashCode
-
Methods inherited from class oracle.pgx.api.Destroyable
close, destroy
-
-
-
-
Method Detail
-
addAllByIdAsync
public PgxFuture<java.lang.Void> addAllByIdAsync(java.util.Collection<ID> source)
Adds vertices/edges to an existing collection using their associated IDs- Parameters:
source- collection of IDs of the elements to add
-
addAllElementsAsync
public PgxFuture<java.lang.Void> addAllElementsAsync(java.util.Collection<E> source)
Description copied from class:PgxCollectionAdds elements to an existing collection.- Specified by:
addAllElementsAsyncin classPgxCollection<E extends PgxEntity<ID>,ID>- Parameters:
source- elements to add
-
removeAllByIdAsync
public PgxFuture<java.lang.Void> removeAllByIdAsync(java.util.Collection<ID> source)
Removes vertices/edges from an existing vertex/edge collection using their associated IDs- Parameters:
source- collection of IDs of the elements to remove
-
removeAllElementsAsync
public PgxFuture<java.lang.Void> removeAllElementsAsync(java.util.Collection<E> source)
Description copied from class:PgxCollectionRemoves elements from an existing collection.- Specified by:
removeAllElementsAsyncin classPgxCollection<E extends PgxEntity<ID>,ID>- Parameters:
source- elements to remove
-
containsAsync
public PgxFuture<java.lang.Boolean> containsAsync(E element)
Description copied from class:PgxCollectionReturnstrueif this collection contains the specified element.- Specified by:
containsAsyncin classPgxCollection<E extends PgxEntity<ID>,ID>- Parameters:
element- element whose presence in this collection is to be tested- Returns:
trueif this collection contains the specified element
-
addAllById
public void addAllById(java.util.Collection<ID> source)
Blocking version ofaddAllByIdAsync(Collection). CallsaddAllByIdAsync(Collection)and waits for the returnedPgxFutureto complete.
-
removeAllById
public void removeAllById(java.util.Collection<ID> source)
Blocking version ofremoveAllByIdAsync(Collection). CallsremoveAllByIdAsync(Collection)and waits for the returnedPgxFutureto complete.
-
addAll
public void addAll(PgxEntity[] elements)
Description copied from class:PgxCollectionAdds elements of aPgxEntityarray to this collection.
-
addAllById
public abstract void addAllById(ID... ids) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Replaces#addAll(Object[]).- Parameters:
ids- elements to add- Throws:
java.util.concurrent.ExecutionExceptionjava.lang.InterruptedException
-
removeAllById
public abstract void removeAllById(ID... ids) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Replaces#removeAll(Object[]).- Parameters:
ids- elements to remove- Throws:
java.util.concurrent.ExecutionExceptionjava.lang.InterruptedException
-
-