Class EdgeProperty<V>

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

    public class EdgeProperty<V>
    extends Property<java.lang.Long,​PgxEdge,​V>
    An edge property of a PgxGraph.
    • Field Detail

      • ALL

        public static final java.util.Set<EdgeProperty<?>> ALL
      • NONE

        public static final java.util.Set<EdgeProperty<?>> NONE
    • Method Detail

      • expandAsync

        public <S> PgxFuture<java.util.List<EdgeProperty<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<EdgeProperty<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<EdgeProperty<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 EdgeProperty<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 EdgeProperty<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<EdgeProperty<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<EdgeProperty<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.