Package com.gpudb.protocol
Class GetRecordsBySeriesRequest
java.lang.Object
com.gpudb.protocol.GetRecordsBySeriesRequest
All Implemented Interfaces:
org.apache.avro.generic.GenericContainer, org.apache.avro.generic.IndexedRecordpublic 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.
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA set of string constants for theGetRecordsBySeriesRequestparameterencoding.Constructor Summary
ConstructorsConstructorDescriptionConstructs a GetRecordsBySeriesRequest object with default parameters.GetRecordsBySeriesRequest(String tableName, String worldTableName, int offset, int limit, String encoding, Map<String, String> options) Constructs a GetRecordsBySeriesRequest object with the specified parameters.GetRecordsBySeriesRequest(String tableName, String worldTableName, int offset, int limit, Map<String, String> options) Constructs a GetRecordsBySeriesRequest object with the specified parameters.Method Summary
Modifier and TypeMethodDescriptionbooleanget(int index) This method supports the Avro framework and is not intended to be called directly by the user.static org.apache.avro.SchemaThis method supports the Avro framework and is not intended to be called directly by the user.intgetLimit()A positive integer indicating the maximum number of series/tracks to be returned.intA positive integer indicating the number of initial series/tracks to skip (useful for paging through the results).Optional parameters.org.apache.avro.SchemaThis method supports the Avro framework and is not intended to be called directly by the user.Name of the table or view for which series/tracks will be fetched, in [schema_name.]table_name format, using standard name resolution rules.Name of the table containing the complete series/track information to be returned for the tracks present in thetableName, in [schema_name.]table_name format, using standard name resolution rules.inthashCode()voidThis method supports the Avro framework and is not intended to be called directly by the user.setEncoding(String encoding) setLimit(int limit) A positive integer indicating the maximum number of series/tracks to be returned.setOffset(int offset) A positive integer indicating the number of initial series/tracks to skip (useful for paging through the results).setOptions(Map<String, String> options) Optional parameters.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.setWorldTableName(String worldTableName) Name of the table containing the complete series/track information to be returned for the tracks present in thetableName, in [schema_name.]table_name format, using standard name resolution rules.toString()
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 thetableName, 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 emptyMap.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 thetableName, 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; eitherBINARYorJSON. Supported values:The default value isBINARY.options- Optional parameters. The default value is an emptyMap.
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
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 oftableName.setTableName
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 fortableName.Returns:thisto mimic the builder pattern.getWorldTableName
Name of the table containing the complete series/track information to be returned for the tracks present in thetableName, 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 ofworldTableName.setWorldTableName
Name of the table containing the complete series/track information to be returned for the tracks present in thetableName, 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 forworldTableName.Returns:thisto 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 ofoffset.setOffset
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 foroffset.Returns:thisto 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 oflimit.setLimit
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 forlimit.Returns:thisto 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:getSchemain interfaceorg.apache.avro.generic.GenericContainerReturns:The schema object describing this class.get
This method supports the Avro framework and is not intended to be called directly by the user.Specified by:getin interfaceorg.apache.avro.generic.IndexedRecordParameters:index- the position of the field to getReturns:value of the field with the given index.Throws:put
This method supports the Avro framework and is not intended to be called directly by the user.Specified by:putin interfaceorg.apache.avro.generic.IndexedRecordParameters:index- the position of the field to setvalue- the value to setThrows: