All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.redislabs.redisgraph.Record Maven / Gradle / Ivy

There is a newer version: 2.6.0-rc3
Show newest version
package com.redislabs.redisgraph;

import java.util.List;

/**
 * Container for RedisGraph result values.
 * 
 * List records are returned from RedisGraph statement execution, contained within a ResultSet.
 */
public interface Record {

  /**
   * The value at the given field index
   * 
   * @param index field index
   * 
   * @return the value
   */
   T getValue(int index);

  /**
   * The value at the given field
   * 
   * @param key header key 
   * 
   * @return the value
   */
   T getValue(String key);  
  
  /**
   * The value at the given field index (represented as String)
   * 
   * @param index
   * @return string representation of the value
   */
  String getString(int index);

  /**
   * The value at the given field (represented as String)
   * 
   * @param key header key 
   * 
   * @return string representation of the value
   */
  String getString(String key);

  /**
   * The keys of the record
   * 
   * @return list of the record key
   */
  List keys();

  /**
   * The values of the record
   * 
   * @return list of the record values
   */
  List values();

  /**
   * Check if the record header contains the given key
   * 
   * @param key header key 
   * 
   * @return true if the the key exists 
   */
  boolean	containsKey(String key);

  /**
   * The number of fields in this record
   * 
   * @return the number of fields
   */
  int size();
}