BigQuery API v2 (revision 79)



com.google.api.services.bigquery.model
Class QueryResponse

java.lang.Object
  extended by java.util.AbstractMap<String,Object>
      extended by com.google.api.client.util.GenericData
          extended by com.google.api.client.json.GenericJson
              extended by com.google.api.services.bigquery.model.QueryResponse
All Implemented Interfaces:
Cloneable, Map<String,Object>

public final class QueryResponse
extends GenericJson

Model definition for QueryResponse.

This is the Java data model class that specifies how to parse/serialize into the JSON that is transmitted over HTTP when working with the BigQuery API. For a detailed explanation see: http://code.google.com/p/google-api-java-client/wiki/Json

Upgrade warning: starting with version 1.12 getResponseHeaders() is removed, instead use JsonHttpRequest.getLastResponseHeaders()

Author:
Google, Inc.

Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.api.client.util.GenericData
GenericData.Flags
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Constructor Summary
QueryResponse()
           
 
Method Summary
 Boolean getJobComplete()
          Whether the query has completed or not.
 JobReference getJobReference()
          Reference to the Job that was created to run the query.
 String getKind()
          The resource type.
 String getPageToken()
          A token used for paging results.
 List<TableRow> getRows()
          An object with as many results as can be contained within the maximum permitted reply size.
 TableSchema getSchema()
          The schema of the results.
 Long getTotalBytesProcessed()
          The total number of bytes processed for this query.
 com.google.common.primitives.UnsignedLong getTotalRows()
          The total number of rows in the complete query result set, which can be more than the number of rows in this single page of results.
 QueryResponse setJobComplete(Boolean jobComplete)
          Whether the query has completed or not.
 QueryResponse setJobReference(JobReference jobReference)
          Reference to the Job that was created to run the query.
 QueryResponse setKind(String kind)
          The resource type.
 QueryResponse setPageToken(String pageToken)
          A token used for paging results.
 QueryResponse setRows(List<TableRow> rows)
          An object with as many results as can be contained within the maximum permitted reply size.
 QueryResponse setSchema(TableSchema schema)
          The schema of the results.
 QueryResponse setTotalBytesProcessed(Long totalBytesProcessed)
          The total number of bytes processed for this query.
 QueryResponse setTotalRows(com.google.common.primitives.UnsignedLong totalRows)
          The total number of rows in the complete query result set, which can be more than the number of rows in this single page of results.
 
Methods inherited from class com.google.api.client.json.GenericJson
clone, getFactory, setFactory, toPrettyString, toString
 
Methods inherited from class com.google.api.client.util.GenericData
entrySet, get, getClassInfo, getUnknownKeys, put, putAll, remove, set, setUnknownKeys
 
Methods inherited from class java.util.AbstractMap
clear, containsKey, containsValue, equals, hashCode, isEmpty, keySet, size, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QueryResponse

public QueryResponse()
Method Detail

getJobComplete

public Boolean getJobComplete()
Whether the query has completed or not. If rows or totalRows are present, this will always be true. If this is false, totalRows will not be available. The value returned may be null.


setJobComplete

public QueryResponse setJobComplete(Boolean jobComplete)
Whether the query has completed or not. If rows or totalRows are present, this will always be true. If this is false, totalRows will not be available. The value set may be null.


getJobReference

public JobReference getJobReference()
Reference to the Job that was created to run the query. This field will be present even if the original request timed out, in which case GetQueryResults can be used to read the results once the query has completed. Since this API only returns the first page of results, subsequent pages can be fetched via the same mechanism (GetQueryResults). The value returned may be null.


setJobReference

public QueryResponse setJobReference(JobReference jobReference)
Reference to the Job that was created to run the query. This field will be present even if the original request timed out, in which case GetQueryResults can be used to read the results once the query has completed. Since this API only returns the first page of results, subsequent pages can be fetched via the same mechanism (GetQueryResults). The value set may be null.


getKind

public String getKind()
The resource type. The value returned may be null.


setKind

public QueryResponse setKind(String kind)
The resource type. The value set may be null.


getPageToken

public String getPageToken()
A token used for paging results. The value returned may be null.


setPageToken

public QueryResponse setPageToken(String pageToken)
A token used for paging results. The value set may be null.


getRows

public List<TableRow> getRows()
An object with as many results as can be contained within the maximum permitted reply size. To get any additional rows, you can call GetQueryResults and specify the jobReference returned above. The value returned may be null.


setRows

public QueryResponse setRows(List<TableRow> rows)
An object with as many results as can be contained within the maximum permitted reply size. To get any additional rows, you can call GetQueryResults and specify the jobReference returned above. The value set may be null.


getSchema

public TableSchema getSchema()
The schema of the results. Present only when the query completes successfully. The value returned may be null.


setSchema

public QueryResponse setSchema(TableSchema schema)
The schema of the results. Present only when the query completes successfully. The value set may be null.


getTotalBytesProcessed

public Long getTotalBytesProcessed()
The total number of bytes processed for this query. If this query was a dry run, this is the number of bytes that would be processed if the query were run. The value returned may be null.


setTotalBytesProcessed

public QueryResponse setTotalBytesProcessed(Long totalBytesProcessed)
The total number of bytes processed for this query. If this query was a dry run, this is the number of bytes that would be processed if the query were run. The value set may be null.


getTotalRows

public com.google.common.primitives.UnsignedLong getTotalRows()
The total number of rows in the complete query result set, which can be more than the number of rows in this single page of results. The value returned may be null.


setTotalRows

public QueryResponse setTotalRows(com.google.common.primitives.UnsignedLong totalRows)
The total number of rows in the complete query result set, which can be more than the number of rows in this single page of results. The value set may be null.