@@ -47,10 +47,10 @@ public ChangeRequestInfo apply(Change pb) {
47
47
return ChangeRequestInfo .fromPb (pb );
48
48
}
49
49
};
50
- private static final long serialVersionUID = -9027378042756366333L ;
50
+ private static final long serialVersionUID = -6029143477639439169L ;
51
51
private final List <RecordSet > additions ;
52
52
private final List <RecordSet > deletions ;
53
- private final String id ;
53
+ private final String generatedId ;
54
54
private final Long startTimeMillis ;
55
55
private final ChangeRequestInfo .Status status ;
56
56
@@ -119,9 +119,9 @@ public abstract static class Builder {
119
119
public abstract Builder removeDeletion (RecordSet recordSet );
120
120
121
121
/**
122
- * Associates a server-assigned id to this {@code ChangeRequestInfo}.
122
+ * Associates a service-generated id to this {@code ChangeRequestInfo}.
123
123
*/
124
- abstract Builder id (String id );
124
+ abstract Builder generatedId (String generatedId );
125
125
126
126
/**
127
127
* Sets the time when this change request was started by a server.
@@ -143,7 +143,7 @@ public abstract static class Builder {
143
143
static class BuilderImpl extends Builder {
144
144
private List <RecordSet > additions ;
145
145
private List <RecordSet > deletions ;
146
- private String id ;
146
+ private String generatedId ;
147
147
private Long startTimeMillis ;
148
148
private ChangeRequestInfo .Status status ;
149
149
@@ -155,7 +155,7 @@ static class BuilderImpl extends Builder {
155
155
BuilderImpl (ChangeRequestInfo info ) {
156
156
this .additions = Lists .newLinkedList (info .additions ());
157
157
this .deletions = Lists .newLinkedList (info .deletions ());
158
- this .id = info .id () ;
158
+ this .generatedId = info .generatedId ;
159
159
this .startTimeMillis = info .startTimeMillis ;
160
160
this .status = info .status ;
161
161
}
@@ -214,8 +214,8 @@ public ChangeRequestInfo build() {
214
214
}
215
215
216
216
@ Override
217
- Builder id (String id ) {
218
- this .id = checkNotNull (id );
217
+ Builder generatedId (String generatedId ) {
218
+ this .generatedId = checkNotNull (generatedId );
219
219
return this ;
220
220
}
221
221
@@ -235,7 +235,7 @@ Builder status(ChangeRequestInfo.Status status) {
235
235
ChangeRequestInfo (BuilderImpl builder ) {
236
236
this .additions = ImmutableList .copyOf (builder .additions );
237
237
this .deletions = ImmutableList .copyOf (builder .deletions );
238
- this .id = builder .id ;
238
+ this .generatedId = builder .generatedId ;
239
239
this .startTimeMillis = builder .startTimeMillis ;
240
240
this .status = builder .status ;
241
241
}
@@ -271,22 +271,22 @@ public List<RecordSet> deletions() {
271
271
}
272
272
273
273
/**
274
- * Returns the id assigned to this {@code ChangeRequest} by the server .
274
+ * Returns the service-generated id for this change request .
275
275
*/
276
- public String id () {
277
- return id ;
276
+ public String generatedId () {
277
+ return generatedId ;
278
278
}
279
279
280
280
/**
281
- * Returns the time when this {@code ChangeRequest} was started by the server.
281
+ * Returns the time when this change request was started by the server.
282
282
*/
283
283
public Long startTimeMillis () {
284
284
return startTimeMillis ;
285
285
}
286
286
287
287
/**
288
- * Returns the status of this {@code ChangeRequest} . If the change request has not been applied
289
- * yet, the status is {@code PENDING}.
288
+ * Returns the status of this change request . If the change request has not been applied yet, the
289
+ * status is {@code PENDING}.
290
290
*/
291
291
public ChangeRequestInfo .Status status () {
292
292
return status ;
@@ -295,8 +295,8 @@ public ChangeRequestInfo.Status status() {
295
295
Change toPb () {
296
296
Change pb = new Change ();
297
297
// set id
298
- if (id () != null ) {
299
- pb .setId (id ());
298
+ if (generatedId () != null ) {
299
+ pb .setId (generatedId ());
300
300
}
301
301
// set timestamp
302
302
if (startTimeMillis () != null ) {
@@ -316,7 +316,7 @@ Change toPb() {
316
316
static ChangeRequestInfo fromPb (Change pb ) {
317
317
Builder builder = builder ();
318
318
if (pb .getId () != null ) {
319
- builder .id (pb .getId ());
319
+ builder .generatedId (pb .getId ());
320
320
}
321
321
if (pb .getStartTime () != null ) {
322
322
builder .startTimeMillis (DateTime .parse (pb .getStartTime ()).getMillis ());
@@ -342,15 +342,15 @@ public boolean equals(Object other) {
342
342
343
343
@ Override
344
344
public int hashCode () {
345
- return Objects .hash (additions , deletions , id , startTimeMillis , status );
345
+ return Objects .hash (additions , deletions , generatedId , startTimeMillis , status );
346
346
}
347
347
348
348
@ Override
349
349
public String toString () {
350
350
return MoreObjects .toStringHelper (this )
351
351
.add ("additions" , additions )
352
352
.add ("deletions" , deletions )
353
- .add ("id " , id )
353
+ .add ("generatedId " , generatedId )
354
354
.add ("startTimeMillis" , startTimeMillis )
355
355
.add ("status" , status )
356
356
.toString ();
0 commit comments