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.IndexedRecord
public class GetRecordsBySeriesRequest extends Object implements org.apache.avro.generic.IndexedRecord
A set of parameters forGPUdb.getRecordsBySeries.Retrieves the complete series/track records from the given
worldTableNamebased on the partial track information contained in thetableName.This operation supports paging through the data via the
offsetandlimitparameters.In contrast to
GPUdb.getRecordsthis returns records grouped by series/track. So ifoffsetis 0 andlimitis 5 this operation would return the first 5 series/tracks intableName. Each series/track will be returned sorted by their TIMESTAMP column.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGetRecordsBySeriesRequest.EncodingA set of string constants for theGetRecordsBySeriesRequestparameterencoding.
-
Constructor Summary
Constructors Constructor Description GetRecordsBySeriesRequest()Constructs 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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)Objectget(int index)This method supports the Avro framework and is not intended to be called directly by the user.static org.apache.avro.SchemagetClassSchema()This method supports the Avro framework and is not intended to be called directly by the user.StringgetEncoding()intgetLimit()A positive integer indicating the maximum number of series/tracks to be returned.intgetOffset()A positive integer indicating the number of initial series/tracks to skip (useful for paging through the results).Map<String,String>getOptions()Optional parameters.org.apache.avro.SchemagetSchema()This method supports the Avro framework and is not intended to be called directly by the user.StringgetTableName()Name of the table or view for which series/tracks will be fetched, in [schema_name.]table_name format, using standard name resolution rules.StringgetWorldTableName()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()voidput(int index, Object value)This method supports the Avro framework and is not intended to be called directly by the user.GetRecordsBySeriesRequestsetEncoding(String encoding)GetRecordsBySeriesRequestsetLimit(int limit)A positive integer indicating the maximum number of series/tracks to be returned.GetRecordsBySeriesRequestsetOffset(int offset)A positive integer indicating the number of initial series/tracks to skip (useful for paging through the results).GetRecordsBySeriesRequestsetOptions(Map<String,String> options)Optional parameters.GetRecordsBySeriesRequestsetTableName(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.GetRecordsBySeriesRequestsetWorldTableName(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.StringtoString()
-
-
-
Constructor Detail
-
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 Detail
-
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 fortableName.- Returns:
thisto 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 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 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 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 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 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 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 forlimit.- Returns:
thisto mimic the builder pattern.
-
getEncoding
public String getEncoding()
Specifies the encoding for returned records; eitherBINARYorJSON. Supported values: The default value isBINARY.- Returns:
- The current value of
encoding.
-
setEncoding
public GetRecordsBySeriesRequest setEncoding(String encoding)
Specifies the encoding for returned records; eitherBINARYorJSON. Supported values: The default value isBINARY.- Parameters:
encoding- The new value forencoding.- Returns:
thisto mimic the builder pattern.
-
getOptions
public Map<String,String> getOptions()
Optional parameters. The default value is an emptyMap.- Returns:
- The current value of
options.
-
setOptions
public GetRecordsBySeriesRequest setOptions(Map<String,String> options)
Optional parameters. The default value is an emptyMap.- Parameters:
options- The new value foroptions.- 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.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:
getin interfaceorg.apache.avro.generic.IndexedRecord- Parameters:
index- the position of the field to get- Returns:
- value of the field with the given index.
- Throws:
IndexOutOfBoundsException
-
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:
putin interfaceorg.apache.avro.generic.IndexedRecord- Parameters:
index- the position of the field to setvalue- the value to set- Throws:
IndexOutOfBoundsException
-
-