Make BigQuery get/create/updated Table and Job methods generic by mziccard · Pull Request #500 · googleapis/google-cloud-java · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions gcloud-java-bigquery/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -463,14 +463,14 @@ public static QueryResultsOption maxWaitTime(long maxWaitTime) {
*
* @throws BigQueryException upon failure
*/
BaseTableInfo create(BaseTableInfo table, TableOption... options) throws BigQueryException;
<T extends BaseTableInfo> T create(T table, TableOption... options) throws BigQueryException;

/**
* Creates a new job.
*
* @throws BigQueryException upon failure
*/
JobInfo create(JobInfo job, JobOption... options) throws BigQueryException;
<T extends JobInfo> T create(T job, JobOption... options) throws BigQueryException;

/**
* Returns the requested dataset or {@code null} if not found.
Expand Down Expand Up @@ -541,22 +541,23 @@ public static QueryResultsOption maxWaitTime(long maxWaitTime) {
*
* @throws BigQueryException upon failure
*/
BaseTableInfo update(BaseTableInfo table, TableOption... options) throws BigQueryException;
<T extends BaseTableInfo> T update(T table, TableOption... options) throws BigQueryException;

/**
* Returns the requested table or {@code null} if not found.
*
* @throws BigQueryException upon failure
*/
BaseTableInfo getTable(String datasetId, String tableId, TableOption... options)
<T extends BaseTableInfo> T getTable(String datasetId, String tableId, TableOption... options)
throws BigQueryException;

/**
* Returns the requested table or {@code null} if not found.
*
* @throws BigQueryException upon failure
*/
BaseTableInfo getTable(TableId tableId, TableOption... options) throws BigQueryException;
<T extends BaseTableInfo> T getTable(TableId tableId, TableOption... options)
throws BigQueryException;

/**
* Lists the tables in the dataset. This method returns partial information on each table
Expand Down Expand Up @@ -610,14 +611,14 @@ Page<List<FieldValue>> listTableData(TableId tableId, TableDataListOption... opt
*
* @throws BigQueryException upon failure
*/
JobInfo getJob(String jobId, JobOption... options) throws BigQueryException;
<T extends JobInfo> T getJob(String jobId, JobOption... options) throws BigQueryException;

/**
* Returns the requested job or {@code null} if not found.
*
* @throws BigQueryException upon failure
*/
JobInfo getJob(JobId jobId, JobOption... options) throws BigQueryException;
<T extends JobInfo> T getJob(JobId jobId, JobOption... options) throws BigQueryException;

/**
* Lists the jobs.
Expand Down
Loading