From 34d247e9f9d909dfc2fd7054d5639b04a6ed7e37 Mon Sep 17 00:00:00 2001 From: Marco Ziccardi Date: Wed, 28 Sep 2016 12:50:42 +0200 Subject: [PATCH] Fix BigQuery parameter names --- .../com/google/cloud/bigquery/BigQuery.java | 14 +++++------ .../google/cloud/bigquery/BigQueryImpl.java | 24 +++++++++---------- .../com/google/cloud/bigquery/Dataset.java | 12 +++++----- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQuery.java b/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQuery.java index 8756bee457f2..1ce896f27c05 100644 --- a/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQuery.java +++ b/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQuery.java @@ -454,7 +454,7 @@ public static QueryResultsOption maxWaitTime(long maxWaitTime) { * * @throws BigQueryException upon failure */ - Dataset create(DatasetInfo dataset, DatasetOption... options); + Dataset create(DatasetInfo datasetInfo, DatasetOption... options); /** * Creates a new table. @@ -476,7 +476,7 @@ public static QueryResultsOption maxWaitTime(long maxWaitTime) { * * @throws BigQueryException upon failure */ - Table create(TableInfo table, TableOption... options); + Table create(TableInfo tableInfo, TableOption... options); /** * Creates a new job. @@ -496,7 +496,7 @@ public static QueryResultsOption maxWaitTime(long maxWaitTime) { * * @throws BigQueryException upon failure */ - Job create(JobInfo job, JobOption... options); + Job create(JobInfo jobInfo, JobOption... options); /** * Returns the requested dataset or {@code null} if not found. @@ -665,7 +665,7 @@ public static QueryResultsOption maxWaitTime(long maxWaitTime) { * * @throws BigQueryException upon failure */ - Dataset update(DatasetInfo dataset, DatasetOption... options); + Dataset update(DatasetInfo datasetInfo, DatasetOption... options); /** * Updates table information. @@ -682,7 +682,7 @@ public static QueryResultsOption maxWaitTime(long maxWaitTime) { * * @throws BigQueryException upon failure */ - Table update(TableInfo table, TableOption... options); + Table update(TableInfo tableInfo, TableOption... options); /** * Returns the requested table or {@code null} if not found. @@ -924,7 +924,7 @@ Page> listTableData(String datasetId, String tableId, * found * @throws BigQueryException upon failure */ - boolean cancel(JobId tableId); + boolean cancel(JobId jobId); /** * Runs the query associated with the request. @@ -980,7 +980,7 @@ Page> listTableData(String datasetId, String tableId, * * @throws BigQueryException upon failure */ - QueryResponse getQueryResults(JobId job, QueryResultsOption... options); + QueryResponse getQueryResults(JobId jobId, QueryResultsOption... options); /** * Returns a channel to write data to be inserted into a BigQuery table. Data format and other diff --git a/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQueryImpl.java b/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQueryImpl.java index bb1c137c4a66..be460a1ad0e6 100644 --- a/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQueryImpl.java +++ b/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQueryImpl.java @@ -155,9 +155,9 @@ public QueryResult nextPage() { } @Override - public Dataset create(DatasetInfo dataset, DatasetOption... options) { + public Dataset create(DatasetInfo datasetInfo, DatasetOption... options) { final com.google.api.services.bigquery.model.Dataset datasetPb = - dataset.setProjectId(options().projectId()).toPb(); + datasetInfo.setProjectId(options().projectId()).toPb(); final Map optionsMap = optionMap(options); try { return Dataset.fromPb(this, @@ -173,9 +173,9 @@ public com.google.api.services.bigquery.model.Dataset call() { } @Override - public Table create(TableInfo table, TableOption... options) { + public Table create(TableInfo tableInfo, TableOption... options) { final com.google.api.services.bigquery.model.Table tablePb = - table.setProjectId(options().projectId()).toPb(); + tableInfo.setProjectId(options().projectId()).toPb(); final Map optionsMap = optionMap(options); try { return Table.fromPb(this, @@ -191,9 +191,9 @@ public com.google.api.services.bigquery.model.Table call() { } @Override - public Job create(JobInfo job, JobOption... options) { + public Job create(JobInfo jobInfo, JobOption... options) { final com.google.api.services.bigquery.model.Job jobPb = - job.setProjectId(options().projectId()).toPb(); + jobInfo.setProjectId(options().projectId()).toPb(); final Map optionsMap = optionMap(options); try { return Job.fromPb(this, @@ -312,9 +312,9 @@ public Boolean call() { } @Override - public Dataset update(DatasetInfo dataset, DatasetOption... options) { + public Dataset update(DatasetInfo datasetInfo, DatasetOption... options) { final com.google.api.services.bigquery.model.Dataset datasetPb = - dataset.setProjectId(options().projectId()).toPb(); + datasetInfo.setProjectId(options().projectId()).toPb(); final Map optionsMap = optionMap(options); try { return Dataset.fromPb(this, @@ -330,9 +330,9 @@ public com.google.api.services.bigquery.model.Dataset call() { } @Override - public Table update(TableInfo table, TableOption... options) { + public Table update(TableInfo tableInfo, TableOption... options) { final com.google.api.services.bigquery.model.Table tablePb = - table.setProjectId(options().projectId()).toPb(); + tableInfo.setProjectId(options().projectId()).toPb(); final Map optionsMap = optionMap(options); try { return Table.fromPb(this, @@ -582,9 +582,9 @@ public com.google.api.services.bigquery.model.QueryResponse call() { } @Override - public QueryResponse getQueryResults(JobId job, QueryResultsOption... options) { + public QueryResponse getQueryResults(JobId jobId, QueryResultsOption... options) { Map optionsMap = optionMap(options); - return getQueryResults(job, options(), optionsMap); + return getQueryResults(jobId, options(), optionsMap); } private static QueryResponse getQueryResults(JobId jobId, diff --git a/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/Dataset.java b/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/Dataset.java index 02bec14de6b9..2e95b0ac24b1 100644 --- a/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/Dataset.java +++ b/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/Dataset.java @@ -251,12 +251,12 @@ public Page list(TableListOption... options) { * Table table = dataset.get(tableName); * } * - * @param table user-defined id of the requested table + * @param tableId user-defined id of the requested table * @param options table options * @throws BigQueryException upon failure */ - public Table get(String table, TableOption... options) { - return bigquery.getTable(TableId.of(datasetId().dataset(), table), options); + public Table get(String tableId, TableOption... options) { + return bigquery.getTable(TableId.of(datasetId().dataset(), tableId), options); } /** @@ -274,14 +274,14 @@ public Table get(String table, TableOption... options) { * Table table = dataset.create(tableName, definition); * } * - * @param table the table's user-defined id + * @param tableId the table's user-defined id * @param definition the table's definition * @param options options for table creation * @return a {@code Table} object for the created table * @throws BigQueryException upon failure */ - public Table create(String table, TableDefinition definition, TableOption... options) { - TableInfo tableInfo = TableInfo.of(TableId.of(datasetId().dataset(), table), definition); + public Table create(String tableId, TableDefinition definition, TableOption... options) { + TableInfo tableInfo = TableInfo.of(TableId.of(datasetId().dataset(), tableId), definition); return bigquery.create(tableInfo, options); }