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 void
addAll(PgxEntity[] elements)
Adds elements of aPgxEntity
array to this collection.abstract void
addAllById(ID... ids)
Replaces#addAll(Object[])
.void
addAllById(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)
Returnstrue
if this collection contains the specified element.abstract void
removeAllById(ID... ids)
Replaces#removeAll(Object[])
.void
removeAllById(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:PgxCollection
Adds elements to an existing collection.- Specified by:
addAllElementsAsync
in 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:PgxCollection
Removes elements from an existing collection.- Specified by:
removeAllElementsAsync
in classPgxCollection<E extends PgxEntity<ID>,ID>
- Parameters:
source
- elements to remove
-
containsAsync
public PgxFuture<java.lang.Boolean> containsAsync(E element)
Description copied from class:PgxCollection
Returnstrue
if this collection contains the specified element.- Specified by:
containsAsync
in classPgxCollection<E extends PgxEntity<ID>,ID>
- Parameters:
element
- element whose presence in this collection is to be tested- Returns:
true
if 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 returnedPgxFuture
to complete.
-
removeAllById
public void removeAllById(java.util.Collection<ID> source)
Blocking version ofremoveAllByIdAsync(Collection)
. CallsremoveAllByIdAsync(Collection)
and waits for the returnedPgxFuture
to complete.
-
addAll
public void addAll(PgxEntity[] elements)
Description copied from class:PgxCollection
Adds elements of aPgxEntity
array 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.ExecutionException
java.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.ExecutionException
java.lang.InterruptedException
-
-