Skip to content

Commit

Permalink
Rename id to generatedId for BigQuery resources
Browse files Browse the repository at this point in the history
  • Loading branch information
mziccard committed Apr 1, 2016
1 parent 4b1a4fd commit 3324808
Show file tree
Hide file tree
Showing 15 changed files with 104 additions and 104 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -471,9 +471,10 @@ public static QueryResultsOption maxWaitTime(long maxWaitTime) {
Dataset getDataset(DatasetId datasetId, DatasetOption... options);

/**
* Lists the project's datasets. This method returns partial information on each dataset
* ({@link Dataset#datasetId()}, {@link Dataset#friendlyName()} and {@link Dataset#id()}). To get
* complete information use either {@link #getDataset(String, DatasetOption...)} or
* Lists the project's datasets. This method returns partial information on each dataset:
* ({@link Dataset#datasetId()}, {@link Dataset#friendlyName()} and
* {@link Dataset#generatedId()}). To get complete information use either
* {@link #getDataset(String, DatasetOption...)} or
* {@link #getDataset(DatasetId, DatasetOption...)}.
*
* @throws BigQueryException upon failure
Expand Down Expand Up @@ -541,9 +542,9 @@ public static QueryResultsOption maxWaitTime(long maxWaitTime) {
Table getTable(TableId tableId, TableOption... options);

/**
* Lists the tables in the dataset. This method returns partial information on each table
* ({@link Table#tableId()}, {@link Table#friendlyName()}, {@link Table#id()} and type, which
* is part of {@link Table#definition()}). To get complete information use either
* Lists the tables in the dataset. This method returns partial information on each table:
* ({@link Table#tableId()}, {@link Table#friendlyName()}, {@link Table#generatedId()} and type,
* which is part of {@link Table#definition()}). To get complete information use either
* {@link #getTable(TableId, TableOption...)} or
* {@link #getTable(String, String, TableOption...)}.
*
Expand All @@ -552,9 +553,9 @@ public static QueryResultsOption maxWaitTime(long maxWaitTime) {
Page<Table> listTables(String datasetId, TableListOption... options);

/**
* Lists the tables in the dataset. This method returns partial information on each table
* ({@link Table#tableId()}, {@link Table#friendlyName()}, {@link Table#id()} and type, which
* is part of {@link Table#definition()}). To get complete information use either
* Lists the tables in the dataset. This method returns partial information on each table:
* ({@link Table#tableId()}, {@link Table#friendlyName()}, {@link Table#generatedId()} and type,
* which is part of {@link Table#definition()}). To get complete information use either
* {@link #getTable(TableId, TableOption...)} or
* {@link #getTable(String, String, TableOption...)}.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ public Builder friendlyName(String friendlyName) {
}

@Override
Builder id(String id) {
infoBuilder.id(id);
Builder generatedId(String generatedId) {
infoBuilder.generatedId(generatedId);
return this;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ public Dataset apply(DatasetInfo datasetInfo) {
return datasetInfo.toPb();
}
};

private static final long serialVersionUID = -6615133444520365839L;
private static final long serialVersionUID = 8469473744160758489L;

private final DatasetId datasetId;
private final List<Acl> acl;
Expand All @@ -65,7 +64,7 @@ public Dataset apply(DatasetInfo datasetInfo) {
private final String description;
private final String etag;
private final String friendlyName;
private final String id;
private final String generatedId;
private final Long lastModified;
private final String location;
private final String selfLink;
Expand Down Expand Up @@ -114,7 +113,7 @@ public abstract static class Builder {
*/
public abstract Builder friendlyName(String friendlyName);

abstract Builder id(String id);
abstract Builder generatedId(String generatedId);

abstract Builder lastModified(Long lastModified);

Expand Down Expand Up @@ -144,7 +143,7 @@ static final class BuilderImpl extends Builder {
private String description;
private String etag;
private String friendlyName;
private String id;
private String generatedId;
private Long lastModified;
private String location;
private String selfLink;
Expand All @@ -159,7 +158,7 @@ static final class BuilderImpl extends Builder {
this.description = datasetInfo.description;
this.etag = datasetInfo.etag;
this.friendlyName = datasetInfo.friendlyName;
this.id = datasetInfo.id;
this.generatedId = datasetInfo.generatedId;
this.lastModified = datasetInfo.lastModified;
this.location = datasetInfo.location;
this.selfLink = datasetInfo.selfLink;
Expand All @@ -182,7 +181,7 @@ public Acl apply(Dataset.Access accessPb) {
this.description = datasetPb.getDescription();
this.etag = datasetPb.getEtag();
this.friendlyName = datasetPb.getFriendlyName();
this.id = datasetPb.getId();
this.generatedId = datasetPb.getId();
this.lastModified = datasetPb.getLastModifiedTime();
this.location = datasetPb.getLocation();
this.selfLink = datasetPb.getSelfLink();
Expand Down Expand Up @@ -232,8 +231,8 @@ public Builder friendlyName(String friendlyName) {
}

@Override
Builder id(String id) {
this.id = id;
Builder generatedId(String generatedId) {
this.generatedId = generatedId;
return this;
}

Expand Down Expand Up @@ -269,7 +268,7 @@ public DatasetInfo build() {
description = builder.description;
etag = builder.etag;
friendlyName = builder.friendlyName;
id = builder.id;
generatedId = builder.generatedId;
lastModified = builder.lastModified;
location = builder.location;
selfLink = builder.selfLink;
Expand Down Expand Up @@ -333,10 +332,10 @@ public String friendlyName() {
}

/**
* Returns an opaque id for the dataset.
* Returns the service-generated id for the dataset.
*/
public String id() {
return id;
public String generatedId() {
return generatedId;
}

/**
Expand Down Expand Up @@ -381,7 +380,7 @@ public String toString() {
.add("description", description)
.add("etag", etag)
.add("friendlyName", friendlyName)
.add("id", id)
.add("generatedId", generatedId)
.add("lastModified", lastModified)
.add("location", location)
.add("selfLink", selfLink)
Expand Down Expand Up @@ -431,7 +430,7 @@ Dataset toPb() {
datasetPb.setDescription(description);
datasetPb.setEtag(etag);
datasetPb.setFriendlyName(friendlyName);
datasetPb.setId(id);
datasetPb.setId(generatedId);
datasetPb.setLastModifiedTime(lastModified);
datasetPb.setLocation(location);
datasetPb.setSelfLink(selfLink);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ Builder etag(String etag) {
}

@Override
Builder id(String id) {
infoBuilder.id(id);
Builder generatedId(String generatedId) {
infoBuilder.generatedId(generatedId);
return this;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ public JobInfo apply(Job pb) {
}
};

private static final long serialVersionUID = -3272941007234620265L;
private static final long serialVersionUID = 2740548743267670124L;

private final String etag;
private final String id;
private final String generatedId;
private final JobId jobId;
private final String selfLink;
private final JobStatus status;
Expand Down Expand Up @@ -95,7 +95,7 @@ public abstract static class Builder {

abstract Builder etag(String etag);

abstract Builder id(String id);
abstract Builder generatedId(String generatedId);

/**
* Sets the job identity.
Expand Down Expand Up @@ -128,7 +128,7 @@ public abstract static class Builder {
static final class BuilderImpl extends Builder {

private String etag;
private String id;
private String generatedId;
private JobId jobId;
private String selfLink;
private JobStatus status;
Expand All @@ -140,7 +140,7 @@ static final class BuilderImpl extends Builder {

BuilderImpl(JobInfo jobInfo) {
this.etag = jobInfo.etag;
this.id = jobInfo.id;
this.generatedId = jobInfo.generatedId;
this.jobId = jobInfo.jobId;
this.selfLink = jobInfo.selfLink;
this.status = jobInfo.status;
Expand All @@ -151,7 +151,7 @@ static final class BuilderImpl extends Builder {

BuilderImpl(Job jobPb) {
this.etag = jobPb.getEtag();
this.id = jobPb.getId();
this.generatedId = jobPb.getId();
if (jobPb.getJobReference() != null) {
this.jobId = JobId.fromPb(jobPb.getJobReference());
}
Expand All @@ -173,8 +173,8 @@ Builder etag(String etag) {
}

@Override
Builder id(String id) {
this.id = id;
Builder generatedId(String generatedId) {
this.generatedId = generatedId;
return this;
}

Expand Down Expand Up @@ -223,7 +223,7 @@ public JobInfo build() {
JobInfo(BuilderImpl builder) {
this.jobId = builder.jobId;
this.etag = builder.etag;
this.id = builder.id;
this.generatedId = builder.generatedId;
this.selfLink = builder.selfLink;
this.status = builder.status;
this.statistics = builder.statistics;
Expand All @@ -239,10 +239,10 @@ public String etag() {
}

/**
* Returns an opaque id for the job.
* Returns the service-generated id for the job.
*/
public String id() {
return id;
public String generatedId() {
return generatedId;
}

/**
Expand Down Expand Up @@ -306,7 +306,7 @@ public String toString() {
.add("statistics", statistics)
.add("userEmail", userEmail)
.add("etag", etag)
.add("id", id)
.add("generatedId", generatedId)
.add("selfLink", selfLink)
.add("configuration", configuration)
.toString();
Expand All @@ -331,7 +331,7 @@ JobInfo setProjectId(String projectId) {
Job toPb() {
Job jobPb = new Job();
jobPb.setEtag(etag);
jobPb.setId(id);
jobPb.setId(generatedId);
jobPb.setSelfLink(selfLink);
jobPb.setUserEmail(userEmail);
if (jobId != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ public Builder friendlyName(String friendlyName) {
}

@Override
Builder id(String id) {
infoBuilder.id(id);
Builder generatedId(String generatedId) {
infoBuilder.generatedId(generatedId);
return this;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ public Table apply(TableInfo tableInfo) {
}
};

private static final long serialVersionUID = -7679032506430816205L;
private static final long serialVersionUID = 609769795097719407L;

private final String etag;
private final String id;
private final String generatedId;
private final String selfLink;
private final TableId tableId;
private final String friendlyName;
Expand Down Expand Up @@ -90,7 +90,7 @@ public abstract static class Builder {
*/
public abstract Builder friendlyName(String friendlyName);

abstract Builder id(String id);
abstract Builder generatedId(String generatedId);

abstract Builder lastModifiedTime(Long lastModifiedTime);

Expand All @@ -117,7 +117,7 @@ public abstract static class Builder {
static class BuilderImpl extends Builder {

private String etag;
private String id;
private String generatedId;
private String selfLink;
private TableId tableId;
private String friendlyName;
Expand All @@ -131,7 +131,7 @@ static class BuilderImpl extends Builder {

BuilderImpl(TableInfo tableInfo) {
this.etag = tableInfo.etag;
this.id = tableInfo.id;
this.generatedId = tableInfo.generatedId;
this.selfLink = tableInfo.selfLink;
this.tableId = tableInfo.tableId;
this.friendlyName = tableInfo.friendlyName;
Expand All @@ -152,7 +152,7 @@ static class BuilderImpl extends Builder {
this.friendlyName = tablePb.getFriendlyName();
this.creationTime = tablePb.getCreationTime();
this.etag = tablePb.getEtag();
this.id = tablePb.getId();
this.generatedId = tablePb.getId();
this.selfLink = tablePb.getSelfLink();
this.definition = TableDefinition.fromPb(tablePb);
}
Expand Down Expand Up @@ -188,8 +188,8 @@ public Builder friendlyName(String friendlyName) {
}

@Override
Builder id(String id) {
this.id = id;
Builder generatedId(String generatedId) {
this.generatedId = generatedId;
return this;
}

Expand Down Expand Up @@ -226,7 +226,7 @@ public TableInfo build() {
TableInfo(BuilderImpl builder) {
this.tableId = checkNotNull(builder.tableId);
this.etag = builder.etag;
this.id = builder.id;
this.generatedId = builder.generatedId;
this.selfLink = builder.selfLink;
this.friendlyName = builder.friendlyName;
this.description = builder.description;
Expand All @@ -244,10 +244,10 @@ public String etag() {
}

/**
* Returns an opaque id for the table.
* Returns the service-generated id for the table.
*/
public String id() {
return id;
public String generatedId() {
return generatedId;
}

/**
Expand Down Expand Up @@ -321,7 +321,7 @@ public String toString() {
return MoreObjects.toStringHelper(this)
.add("tableId", tableId)
.add("etag", etag)
.add("id", id)
.add("generatedId", generatedId)
.add("selfLink", selfLink)
.add("friendlyName", friendlyName)
.add("description", description)
Expand Down Expand Up @@ -379,7 +379,7 @@ Table toPb() {
tablePb.setEtag(etag);
tablePb.setExpirationTime(expirationTime);
tablePb.setFriendlyName(friendlyName);
tablePb.setId(id);
tablePb.setId(generatedId);
tablePb.setSelfLink(selfLink);
return tablePb;
}
Expand Down
Loading

0 comments on commit 3324808

Please sign in to comment.