Class ResultSetBuilder

java.lang.Object
redis.clients.jedis.Builder<ResultSet>
redis.clients.jedis.graph.ResultSetBuilder

class ResultSetBuilder extends Builder<ResultSet>
  • Field Details

  • Constructor Details

    • ResultSetBuilder

      ResultSetBuilder(GraphCache cache)
  • Method Details

    • build

      public ResultSet build(Object data)
      Specified by:
      build in class Builder<ResultSet>
    • parseRecords

      private List<Record> parseRecords(Header header, Object data)
    • deserializeNode

      private Node deserializeNode(List<Object> rawNodeData)
      Parameters:
      rawNodeData - - raw node object in the form of list of object rawNodeData.get(0) - id (long) rawNodeData.get(1) - a list y which contains the labels of this node. Each entry is a label id from the type of long rawNodeData.get(2) - a list which contains the properties of the node.
      Returns:
      Node object
    • deserializeGraphEntityId

      private void deserializeGraphEntityId(GraphEntity graphEntity, long id)
      Parameters:
      graphEntity - graph entity
      id - entity id to be set to the graph entity
    • deserializeEdge

      private Edge deserializeEdge(List<Object> rawEdgeData)
      Parameters:
      rawEdgeData - - a list of objects rawEdgeData[0] - edge id rawEdgeData[1] - edge relationship type rawEdgeData[2] - edge source rawEdgeData[3] - edge destination rawEdgeData[4] - edge properties
      Returns:
      Edge object
    • deserializeGraphEntityProperties

      private void deserializeGraphEntityProperties(GraphEntity entity, List<List<Object>> rawProperties)
      Parameters:
      entity - graph entity for adding the properties to
      rawProperties - raw representation of a list of graph entity properties. Each entry is a list (rawProperty) is a raw representation of property, as follows: rawProperty.get(0) - property key rawProperty.get(1) - property type rawProperty.get(2) - property value
    • deserializeScalar

      private Object deserializeScalar(List<Object> rawScalarData)
      Parameters:
      rawScalarData - - a list of object. list[0] is the scalar type, list[1] is the scalar value
      Returns:
      value of the specific scalar type
    • deserializePoint

      private Object deserializePoint(Object rawScalarData)
    • deserializeMap

      private Map<String,Object> deserializeMap(Object rawScalarData)
    • deserializePath

      private Path deserializePath(Object rawScalarData)
    • deserializeArray

      private List<Object> deserializeArray(Object rawScalarData)
    • getValueTypeFromObject

      private ResultSetBuilder.ScalarType getValueTypeFromObject(Object rawScalarType)
      Auxiliary function to retrieve scalar types
      Parameters:
      rawScalarType -
      Returns:
      scalar type
    • getScalarType

      private static ResultSetBuilder.ScalarType getScalarType(int index)
    • parseHeader

      private ResultSetBuilder.HeaderImpl parseHeader(Object data)
    • parseStatistics

      private ResultSetBuilder.StatisticsImpl parseStatistics(Object data)