Class VertexProperty<ID,V>

java.lang.Object
oracle.pgx.api.internal.ApiObject
Type Parameters:
ID - the vertex ID type.
V - the value type.
All Implemented Interfaces:
AutoCloseable, Cloneable
Direct Known Subclasses:
VertexLabels

public class VertexProperty<ID,V> extends Property<ID,PgxVertex<ID>,V>
A vertex property of a PgxGraph.
  • Field Details

  • Method Details

    • expandAsync

      public <S> PgxFuture<List<VertexProperty<ID,S>>> expandAsync()
      If this is a vector property, expands this property into a list of scalar properties of same type. The first property will contain the first element of the vector, the second property the second element and so on.
      Type Parameters:
      S - the element type (scalar type) of this property's value type
      Returns:
      a future holding the list of scalar properties or an exceptionally completed future if this property is not a vector property (Property.isVectorProperty() == false). If this vector property has the name 'my_vector', then the result properties will be called 'my_vector_0', 'my_vector_1', etc..
    • expandAsync

      public <S> PgxFuture<List<VertexProperty<ID,S>>> expandAsync(String namePrefix)
      If this is a vector property, expands this property into a list of scalar properties of same type. The first property will contain the first element of the vector, the second property the second element and so on.
      Type Parameters:
      S - the element type (scalar type) of this property's value type
      Parameters:
      namePrefix - the name prefix of the scalar properties to be created. If not null, the resulting properties will be named _0, _1, etc... If null, the name of this vector property will be used as name prefix. If that results in a name conflict, the returned future will complete exceptionally.
      Returns:
      a future holding the list of scalar properties or an exceptionally completed future if this property is not a vector property (Property.isVectorProperty() == false).
    • cloneAsync

      public PgxFuture<VertexProperty<ID,V>> cloneAsync()
      Create a copy of this property.
      Convenience method for cloneAsync(String) passing newPropertyName as null
      Returns:
      property result
    • cloneAsync

      public PgxFuture<VertexProperty<ID,V>> cloneAsync(String newPropertyName)
      Creates a copy of this property.
      Parameters:
      newPropertyName - name of copy to be created. If null, guaranteed unique name will be generated.
      Returns:
      property result
    • clone

      public VertexProperty<ID,V> clone()
      Blocking version of cloneAsync(). Calls cloneAsync() and waits for the returned PgxFuture to complete.
      Throws:
      InterruptedException - if the caller thread gets interrupted while waiting for completion.
      ExecutionException - if any exception occurred during asynchronous execution. The actual exception will be nested.
    • clone

      public VertexProperty<ID,V> clone(String newPropertyName) throws ExecutionException, InterruptedException
      Blocking version of cloneAsync(String). Calls cloneAsync(String) and waits for the returned PgxFuture to complete.
      Throws:
      InterruptedException - if the caller thread gets interrupted while waiting for completion.
      ExecutionException - if any exception occurred during asynchronous execution. The actual exception will be nested.
    • expand

      public <S> List<VertexProperty<ID,S>> expand() throws ExecutionException, InterruptedException
      Blocking version of expandAsync(). Calls expandAsync() and waits for the returned PgxFuture to complete.
      Throws:
      InterruptedException - if the caller thread gets interrupted while waiting for completion.
      ExecutionException - if any exception occurred during asynchronous execution. The actual exception will be nested.
    • expand

      public <S> List<VertexProperty<ID,S>> expand(String namePrefix) throws ExecutionException, InterruptedException
      Blocking version of expandAsync(String). Calls expandAsync(String) and waits for the returned PgxFuture to complete.
      Throws:
      InterruptedException - if the caller thread gets interrupted while waiting for completion.
      ExecutionException - if any exception occurred during asynchronous execution. The actual exception will be nested.