Class VertexProperty<ID,​V>

  • Type Parameters:
    ID - the vertex ID type.
    V - the value type.
    All Implemented Interfaces:
    java.lang.AutoCloseable, java.lang.Cloneable
    Direct Known Subclasses:
    VertexLabels

    public class VertexProperty<ID,​V>
    extends Property<ID,​PgxVertex<ID>,​V>
    A vertex property of a PgxGraph.
    • Method Detail

      • expandAsync

        public <S> PgxFuture<java.util.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<java.util.List<VertexProperty<ID,​S>>> expandAsync​(java.lang.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 <namePrefix>_0, <namePrefix>_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​(java.lang.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:
        java.lang.InterruptedException - if the caller thread gets interrupted while waiting for completion.
        java.util.concurrent.ExecutionException - if any exception occurred during asynchronous execution. The actual exception will be nested.
      • clone

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

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

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