Class GetGraphEntitiesResponse

  • All Implemented Interfaces:
    org.apache.avro.generic.GenericContainer, org.apache.avro.generic.IndexedRecord

    public class GetGraphEntitiesResponse
    extends Object
    implements org.apache.avro.generic.IndexedRecord
    A set of results returned by GPUdb.getGraphEntities.
    • Constructor Detail

      • GetGraphEntitiesResponse

        public GetGraphEntitiesResponse()
        Constructs a GetGraphEntitiesResponse object with default parameters.
    • Method Detail

      • getClassSchema

        public static org.apache.avro.Schema getClassSchema()
        This method supports the Avro framework and is not intended to be called directly by the user.
        Returns:
        The schema for the class.
      • getResult

        public boolean getResult()
        Indicates a successful retrieval.
        Returns:
        The current value of result.
      • setResult

        public GetGraphEntitiesResponse setResult​(boolean result)
        Indicates a successful retrieval.
        Parameters:
        result - The new value for result.
        Returns:
        this to mimic the builder pattern.
      • getEntitiesInt

        public List<Long> getEntitiesInt()
        Flat array of entity data for integer-identifier graphs with a repeating stride. For node entities (stride 2): [node_id, label_index, ...]. For edge entities (stride 4): [edge_id, node1_id, node2_id, label_index, ...]. Populated when the graph uses integer identifiers; empty otherwise. The label_index is a 1-based index into the labels array; 0 indicates no label.
        Returns:
        The current value of entitiesInt.
      • setEntitiesInt

        public GetGraphEntitiesResponse setEntitiesInt​(List<Long> entitiesInt)
        Flat array of entity data for integer-identifier graphs with a repeating stride. For node entities (stride 2): [node_id, label_index, ...]. For edge entities (stride 4): [edge_id, node1_id, node2_id, label_index, ...]. Populated when the graph uses integer identifiers; empty otherwise. The label_index is a 1-based index into the labels array; 0 indicates no label.
        Parameters:
        entitiesInt - The new value for entitiesInt.
        Returns:
        this to mimic the builder pattern.
      • getEntitiesString

        public List<String> getEntitiesString()
        Flat array of entity data for name-identifier or WKT-identifier (geo/XY) graphs with a repeating stride. For node entities (stride 2): [node_name, label_index, ...] or [wkt_point, label_index, ...]. For edge entities (stride 4): [edge_id, node1_name, node2_name, label_index, ...] or [edge_id, node1_wkt, node2_wkt, label_index, ...]. Populated when the graph uses string/name identifiers or geo/XY coordinate identifiers; empty otherwise. For geo/XY graphs, node identifiers are formatted as 'POINT(x y)' WKT strings. The label_index is a string representation of a 1-based index into the labels array; '0' indicates no label.
        Returns:
        The current value of entitiesString.
      • setEntitiesString

        public GetGraphEntitiesResponse setEntitiesString​(List<String> entitiesString)
        Flat array of entity data for name-identifier or WKT-identifier (geo/XY) graphs with a repeating stride. For node entities (stride 2): [node_name, label_index, ...] or [wkt_point, label_index, ...]. For edge entities (stride 4): [edge_id, node1_name, node2_name, label_index, ...] or [edge_id, node1_wkt, node2_wkt, label_index, ...]. Populated when the graph uses string/name identifiers or geo/XY coordinate identifiers; empty otherwise. For geo/XY graphs, node identifiers are formatted as 'POINT(x y)' WKT strings. The label_index is a string representation of a 1-based index into the labels array; '0' indicates no label.
        Parameters:
        entitiesString - The new value for entitiesString.
        Returns:
        this to mimic the builder pattern.
      • getLabels

        public List<String> getLabels()
        Array of distinct label strings. The label_index values in entitiesInt or entitiesString are 1-based indexes into this array; index 0 means no label.
        Returns:
        The current value of labels.
      • setLabels

        public GetGraphEntitiesResponse setLabels​(List<String> labels)
        Array of distinct label strings. The label_index values in entitiesInt or entitiesString are 1-based indexes into this array; index 0 means no label.
        Parameters:
        labels - The new value for labels.
        Returns:
        this to mimic the builder pattern.
      • getInfo

        public Map<String,​String> getInfo()
        Additional information map. Contains the following keys: 'identifier_type' — set to 'int' (integer node IDs in entitiesInt), 'string' (name-based node IDs in entitiesString), or 'wkt' (geo/XY graph with 'POINT(x y)' node identifiers in entitiesString). 'total_count' — total number of live (non-deleted) entities available in the graph for the requested entity_type, used for pagination. 'status_message' — set to 'Cancelled' if the request was cancelled mid-iteration (with result set to false).
        Returns:
        The current value of info.
      • setInfo

        public GetGraphEntitiesResponse setInfo​(Map<String,​String> info)
        Additional information map. Contains the following keys: 'identifier_type' — set to 'int' (integer node IDs in entitiesInt), 'string' (name-based node IDs in entitiesString), or 'wkt' (geo/XY graph with 'POINT(x y)' node identifiers in entitiesString). 'total_count' — total number of live (non-deleted) entities available in the graph for the requested entity_type, used for pagination. 'status_message' — set to 'Cancelled' if the request was cancelled mid-iteration (with result set to false).
        Parameters:
        info - The new value for info.
        Returns:
        this to mimic the builder pattern.
      • getSchema

        public org.apache.avro.Schema getSchema()
        This method supports the Avro framework and is not intended to be called directly by the user.
        Specified by:
        getSchema in interface org.apache.avro.generic.GenericContainer
        Returns:
        The schema object describing this class.
      • get

        public Object get​(int index)
        This method supports the Avro framework and is not intended to be called directly by the user.
        Specified by:
        get in interface org.apache.avro.generic.IndexedRecord
        Parameters:
        index - the position of the field to get
        Returns:
        value of the field with the given index.
        Throws:
        IndexOutOfBoundsException
      • put

        public void put​(int index,
                        Object value)
        This method supports the Avro framework and is not intended to be called directly by the user.
        Specified by:
        put in interface org.apache.avro.generic.IndexedRecord
        Parameters:
        index - the position of the field to set
        value - the value to set
        Throws:
        IndexOutOfBoundsException
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object