Skip to main content

Class GetRecordsBySeriesRequest

java.lang.Object
com.gpudb.protocol.GetRecordsBySeriesRequest
All Implemented Interfaces:
org.apache.avro.generic.GenericContainer, org.apache.avro.generic.IndexedRecord

public class GetRecordsBySeriesRequest extends Object implements org.apache.avro.generic.IndexedRecord
A set of parameters for GPUdb.getRecordsBySeries.

Retrieves the complete series/track records from the given worldTableName based on the partial track information contained in the tableName.

This operation supports paging through the data via the offset and limit parameters.

In contrast to GPUdb.getRecords this returns records grouped by series/track. So if offset is 0 and limit is 5 this operation would return the first 5 series/tracks in tableName. Each series/track will be returned sorted by their TIMESTAMP column.

  • Constructor Details

    • GetRecordsBySeriesRequest

      public GetRecordsBySeriesRequest()
      Constructs a GetRecordsBySeriesRequest object with default parameters.
    • GetRecordsBySeriesRequest

      public GetRecordsBySeriesRequest(String tableName, String worldTableName, int offset, int limit, Map<String,String> options)
      Constructs a GetRecordsBySeriesRequest object with the specified parameters.
      Parameters:
      tableName - Name of the table or view for which series/tracks will be fetched, in [schema_name.]table_name format, using standard name resolution rules.
      worldTableName - Name of the table containing the complete series/track information to be returned for the tracks present in the tableName, in [schema_name.]table_name format, using standard name resolution rules. Typically this is used when retrieving series/tracks from a view (which contains partial series/tracks) but the user wants to retrieve the entire original series/tracks. Can be blank.
      offset - A positive integer indicating the number of initial series/tracks to skip (useful for paging through the results). The default value is 0. The minimum allowed value is 0. The maximum allowed value is MAX_INT.
      limit - A positive integer indicating the maximum number of series/tracks to be returned. Or END_OF_SET (-9999) to indicate that the max number of results should be returned. The default value is 250.
      options - Optional parameters. The default value is an empty Map.
    • GetRecordsBySeriesRequest

      public GetRecordsBySeriesRequest(String tableName, String worldTableName, int offset, int limit, String encoding, Map<String,String> options)
      Constructs a GetRecordsBySeriesRequest object with the specified parameters.
      Parameters:
      tableName - Name of the table or view for which series/tracks will be fetched, in [schema_name.]table_name format, using standard name resolution rules.
      worldTableName - Name of the table containing the complete series/track information to be returned for the tracks present in the tableName, in [schema_name.]table_name format, using standard name resolution rules. Typically this is used when retrieving series/tracks from a view (which contains partial series/tracks) but the user wants to retrieve the entire original series/tracks. Can be blank.
      offset - A positive integer indicating the number of initial series/tracks to skip (useful for paging through the results). The default value is 0. The minimum allowed value is 0. The maximum allowed value is MAX_INT.
      limit - A positive integer indicating the maximum number of series/tracks to be returned. Or END_OF_SET (-9999) to indicate that the max number of results should be returned. The default value is 250.
      encoding - Specifies the encoding for returned records; either BINARY or JSON. Supported values:The default value is BINARY.
      options - Optional parameters. The default value is an empty Map.
  • Method Details

    • 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.
    • getTableName

      public String getTableName()
      Name of the table or view for which series/tracks will be fetched, in [schema_name.]table_name format, using standard name resolution rules.
      Returns:
      The current value of tableName.
    • setTableName

      public GetRecordsBySeriesRequest setTableName(String tableName)
      Name of the table or view for which series/tracks will be fetched, in [schema_name.]table_name format, using standard name resolution rules.
      Parameters:
      tableName - The new value for tableName.
      Returns:
      this to mimic the builder pattern.
    • getWorldTableName

      public String getWorldTableName()
      Name of the table containing the complete series/track information to be returned for the tracks present in the tableName, in [schema_name.]table_name format, using standard name resolution rules. Typically this is used when retrieving series/tracks from a view (which contains partial series/tracks) but the user wants to retrieve the entire original series/tracks. Can be blank.
      Returns:
      The current value of worldTableName.
    • setWorldTableName

      public GetRecordsBySeriesRequest setWorldTableName(String worldTableName)
      Name of the table containing the complete series/track information to be returned for the tracks present in the tableName, in [schema_name.]table_name format, using standard name resolution rules. Typically this is used when retrieving series/tracks from a view (which contains partial series/tracks) but the user wants to retrieve the entire original series/tracks. Can be blank.
      Parameters:
      worldTableName - The new value for worldTableName.
      Returns:
      this to mimic the builder pattern.
    • getOffset

      public int getOffset()
      A positive integer indicating the number of initial series/tracks to skip (useful for paging through the results). The default value is 0. The minimum allowed value is 0. The maximum allowed value is MAX_INT.
      Returns:
      The current value of offset.
    • setOffset

      public GetRecordsBySeriesRequest setOffset(int offset)
      A positive integer indicating the number of initial series/tracks to skip (useful for paging through the results). The default value is 0. The minimum allowed value is 0. The maximum allowed value is MAX_INT.
      Parameters:
      offset - The new value for offset.
      Returns:
      this to mimic the builder pattern.
    • getLimit

      public int getLimit()
      A positive integer indicating the maximum number of series/tracks to be returned. Or END_OF_SET (-9999) to indicate that the max number of results should be returned. The default value is 250.
      Returns:
      The current value of limit.
    • setLimit

      public GetRecordsBySeriesRequest setLimit(int limit)
      A positive integer indicating the maximum number of series/tracks to be returned. Or END_OF_SET (-9999) to indicate that the max number of results should be returned. The default value is 250.
      Parameters:
      limit - The new value for limit.
      Returns:
      this to mimic the builder pattern.
    • getEncoding

      public String getEncoding()
      Specifies the encoding for returned records; either BINARY or JSON. Supported values:The default value is BINARY.
      Returns:
      The current value of encoding.
    • setEncoding

      public GetRecordsBySeriesRequest setEncoding(String encoding)
      Specifies the encoding for returned records; either BINARY or JSON. Supported values:The default value is BINARY.
      Parameters:
      encoding - The new value for encoding.
      Returns:
      this to mimic the builder pattern.
    • getOptions

      public Map<String,String> getOptions()
      Optional parameters. The default value is an empty Map.
      Returns:
      The current value of options.
    • setOptions

      public GetRecordsBySeriesRequest setOptions(Map<String,String> options)
      Optional parameters. The default value is an empty Map.
      Parameters:
      options - The new value for options.
      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:
    • 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:
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object