66import com .redislabs .redisgraph .graph_entities .Node ;
77import com .redislabs .redisgraph .graph_entities .Property ;
88import com .redislabs .redisgraph .impl .graph_cache .GraphCache ;
9- import com .redislabs .redisgraph .impl .graph_cache .RedisGraphCaches ;
109import redis .clients .jedis .util .SafeEncoder ;
1110
1211import java .util .ArrayList ;
@@ -22,17 +21,15 @@ public class ResultSetImpl implements ResultSet {
2221
2322 private int position = 0 ;
2423 private final RedisGraph redisGraph ;
25- private final String graphId ;
2624 private final GraphCache cache ;
2725
2826 /**
2927 * @param rawResponse the raw representation of response is at most 3 lists of objects.
3028 * The last list is the statistics list.
3129 * @param redisGraph, the graph local cache
3230 */
33- public ResultSetImpl (List <Object > rawResponse , RedisGraph redisGraph , String graphId , GraphCache cache ) {
31+ public ResultSetImpl (List <Object > rawResponse , RedisGraph redisGraph , GraphCache cache ) {
3432 this .redisGraph = redisGraph ;
35- this .graphId = graphId ;
3633 this .cache = cache ;
3734 if (rawResponse .size () != 3 ) {
3835
@@ -78,10 +75,8 @@ private List<Record> parseResult(List<List<Object>> rawResultSet) {
7875 case COLUMN_RELATION :
7976 parsedRow .add (deserializeEdge (obj ));
8077 break ;
81- case COLUMN_SCALAR : {
78+ case COLUMN_SCALAR :
8279 parsedRow .add (deserializeScalar (obj ));
83-
84- }
8580 }
8681
8782 }
@@ -134,8 +129,8 @@ private Node deserializeNode(List<Object> rawNodeData) {
134129 Node node = new Node ();
135130 deserializeGraphEntityId (node , rawNodeData .get (0 ));
136131 List <Long > labelsIndices = (List <Long >) rawNodeData .get (1 );
137- for (long labelIndex : labelsIndices ) {
138- String label = cache .getLabel (( int ) labelIndex , redisGraph );
132+ for (Long labelIndex : labelsIndices ) {
133+ String label = cache .getLabel (labelIndex . intValue () , redisGraph );
139134 node .addLabel (label );
140135 }
141136 deserializeGraphEntityProperties (node , (List <List <Object >>) rawNodeData .get (2 ));
@@ -149,7 +144,7 @@ private Node deserializeNode(List<Object> rawNodeData) {
149144 * @param rawEntityId raw representation of entity id to be set to the graph entity
150145 */
151146 private void deserializeGraphEntityId (GraphEntity graphEntity , Object rawEntityId ) {
152- int id = (int ) ( long ) rawEntityId ;
147+ int id = (( Long ) rawEntityId ). intValue () ;
153148 graphEntity .setId (id );
154149 }
155150
0 commit comments