Skip to content

Commit b4b3b49

Browse files
committed
---
yaml --- r: 1075 b: refs/heads/master c: 0dd3d97 h: refs/heads/master i: 1073: 4c04cef 1071: 36124c8 v: v3
1 parent eb0f048 commit b4b3b49

7 files changed

Lines changed: 288 additions & 61 deletions

File tree

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
---
2-
refs/heads/master: 862ea6a625bcb18a019c3e9bdad8dad74a746fa8
2+
refs/heads/master: 0dd3d971bafc2d724787a76e69fdde6dedba51df
33
refs/heads/travis: 0fa997e2fc9c6b61b2d91e6d163655aae67d44b6
44
refs/heads/gh-pages: 5a10432ecc75f29812e33a8236c900379509fe99

trunk/gcloud-java-datastore/src/main/java/com/google/gcloud/datastore/StructuredQuery.java

Lines changed: 60 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,9 @@ static Filter fromPb(DatastoreV1.Filter filterPb) {
113113
}
114114
}
115115

116+
/**
117+
* A class representing a filter composed of a combination of other filters.
118+
*/
116119
public static final class CompositeFilter extends Filter {
117120

118121
private static final long serialVersionUID = 3610352685739360009L;
@@ -194,6 +197,9 @@ protected DatastoreV1.Filter toPb() {
194197
}
195198
}
196199

200+
/**
201+
* A class representing a filter based on a single property or ancestor.
202+
*/
197203
public static final class PropertyFilter extends Filter {
198204

199205
private static final long serialVersionUID = -4514695915258598597L;
@@ -260,67 +266,67 @@ public boolean equals(Object obj) {
260266
&& Objects.equals(value, other.value);
261267
}
262268

263-
public static PropertyFilter le(String property, Value<?> value) {
269+
public static PropertyFilter lt(String property, Value<?> value) {
264270
return new PropertyFilter(property, Operator.LESS_THAN, value);
265271
}
266272

267-
public static PropertyFilter le(String property, String value) {
273+
public static PropertyFilter lt(String property, String value) {
268274
return new PropertyFilter(property, Operator.LESS_THAN, of(value));
269275
}
270276

271-
public static PropertyFilter le(String property, long value) {
277+
public static PropertyFilter lt(String property, long value) {
272278
return new PropertyFilter(property, Operator.LESS_THAN, of(value));
273279
}
274280

275-
public static PropertyFilter le(String property, double value) {
281+
public static PropertyFilter lt(String property, double value) {
276282
return new PropertyFilter(property, Operator.LESS_THAN, of(value));
277283
}
278284

279-
public static PropertyFilter le(String property, boolean value) {
285+
public static PropertyFilter lt(String property, boolean value) {
280286
return new PropertyFilter(property, Operator.LESS_THAN, of(value));
281287
}
282288

283-
public static PropertyFilter le(String property, DateTime value) {
289+
public static PropertyFilter lt(String property, DateTime value) {
284290
return new PropertyFilter(property, Operator.LESS_THAN, of(value));
285291
}
286292

287-
public static PropertyFilter le(String property, Key value) {
293+
public static PropertyFilter lt(String property, Key value) {
288294
return new PropertyFilter(property, Operator.LESS_THAN, of(value));
289295
}
290296

291-
public static PropertyFilter le(String property, Blob value) {
297+
public static PropertyFilter lt(String property, Blob value) {
292298
return new PropertyFilter(property, Operator.LESS_THAN, of(value));
293299
}
294300

295-
public static PropertyFilter lte(String property, Value<?> value) {
301+
public static PropertyFilter le(String property, Value<?> value) {
296302
return new PropertyFilter(property, Operator.LESS_THAN_OR_EQUAL, value);
297303
}
298304

299-
public static PropertyFilter lte(String property, String value) {
305+
public static PropertyFilter le(String property, String value) {
300306
return new PropertyFilter(property, Operator.LESS_THAN_OR_EQUAL, of(value));
301307
}
302308

303-
public static PropertyFilter lte(String property, long value) {
309+
public static PropertyFilter le(String property, long value) {
304310
return new PropertyFilter(property, Operator.LESS_THAN_OR_EQUAL, of(value));
305311
}
306312

307-
public static PropertyFilter lte(String property, double value) {
313+
public static PropertyFilter le(String property, double value) {
308314
return new PropertyFilter(property, Operator.LESS_THAN_OR_EQUAL, of(value));
309315
}
310316

311-
public static PropertyFilter lte(String property, boolean value) {
317+
public static PropertyFilter le(String property, boolean value) {
312318
return new PropertyFilter(property, Operator.LESS_THAN_OR_EQUAL, of(value));
313319
}
314320

315-
public static PropertyFilter lte(String property, DateTime value) {
321+
public static PropertyFilter le(String property, DateTime value) {
316322
return new PropertyFilter(property, Operator.LESS_THAN_OR_EQUAL, of(value));
317323
}
318324

319-
public static PropertyFilter lte(String property, Key value) {
325+
public static PropertyFilter le(String property, Key value) {
320326
return new PropertyFilter(property, Operator.LESS_THAN_OR_EQUAL, of(value));
321327
}
322328

323-
public static PropertyFilter lte(String property, Blob value) {
329+
public static PropertyFilter le(String property, Blob value) {
324330
return new PropertyFilter(property, Operator.LESS_THAN_OR_EQUAL, of(value));
325331
}
326332

@@ -356,35 +362,35 @@ public static PropertyFilter gt(String property, Blob value) {
356362
return new PropertyFilter(property, Operator.GREATER_THAN, of(value));
357363
}
358364

359-
public static PropertyFilter gte(String property, Value<?> value) {
365+
public static PropertyFilter ge(String property, Value<?> value) {
360366
return new PropertyFilter(property, Operator.GREATER_THAN_OR_EQUAL, value);
361367
}
362368

363-
public static PropertyFilter gte(String property, String value) {
369+
public static PropertyFilter ge(String property, String value) {
364370
return new PropertyFilter(property, Operator.GREATER_THAN_OR_EQUAL, of(value));
365371
}
366372

367-
public static PropertyFilter gte(String property, long value) {
373+
public static PropertyFilter ge(String property, long value) {
368374
return new PropertyFilter(property, Operator.GREATER_THAN_OR_EQUAL, of(value));
369375
}
370376

371-
public static PropertyFilter gte(String property, double value) {
377+
public static PropertyFilter ge(String property, double value) {
372378
return new PropertyFilter(property, Operator.GREATER_THAN_OR_EQUAL, of(value));
373379
}
374380

375-
public static PropertyFilter gte(String property, boolean value) {
381+
public static PropertyFilter ge(String property, boolean value) {
376382
return new PropertyFilter(property, Operator.GREATER_THAN_OR_EQUAL, of(value));
377383
}
378384

379-
public static PropertyFilter gte(String property, DateTime value) {
385+
public static PropertyFilter ge(String property, DateTime value) {
380386
return new PropertyFilter(property, Operator.GREATER_THAN_OR_EQUAL, of(value));
381387
}
382388

383-
public static PropertyFilter gte(String property, Key value) {
389+
public static PropertyFilter ge(String property, Key value) {
384390
return new PropertyFilter(property, Operator.GREATER_THAN_OR_EQUAL, of(value));
385391
}
386392

387-
public static PropertyFilter gte(String property, Blob value) {
393+
public static PropertyFilter ge(String property, Blob value) {
388394
return new PropertyFilter(property, Operator.GREATER_THAN_OR_EQUAL, of(value));
389395
}
390396

@@ -514,6 +520,9 @@ static OrderBy fromPb(DatastoreV1.PropertyOrder propertyOrderPb) {
514520
}
515521
}
516522

523+
/**
524+
* A class representing a projection based on a property.
525+
*/
517526
public static final class Projection implements Serializable {
518527

519528
private static final long serialVersionUID = 3083707957256279470L;
@@ -665,12 +674,18 @@ public B clearOrderBy() {
665674
return self();
666675
}
667676

677+
/**
678+
* Sets the query's order by clause (clearing any previously specified OrderBy settings).
679+
*/
668680
public B orderBy(OrderBy orderBy, OrderBy... others) {
669681
clearOrderBy();
670682
addOrderBy(orderBy, others);
671683
return self();
672684
}
673685

686+
/**
687+
* Adds settings to the existing order by clause.
688+
*/
674689
public B addOrderBy(OrderBy orderBy, OrderBy... others) {
675690
this.orderBy.add(orderBy);
676691
Collections.addAll(this.orderBy, others);
@@ -754,6 +769,9 @@ static final class Builder<V> extends BaseBuilder<V, Builder<V>> {
754769
}
755770
}
756771

772+
/**
773+
* A StructuredQuery builder for queries that return Entity results.
774+
*/
757775
public static final class EntityQueryBuilder extends BaseBuilder<Entity, EntityQueryBuilder> {
758776

759777
EntityQueryBuilder() {
@@ -766,6 +784,9 @@ public StructuredQuery<Entity> build() {
766784
}
767785
}
768786

787+
/**
788+
* A StructuredQuery builder for queries that return Key results.
789+
*/
769790
public static final class KeyQueryBuilder extends BaseBuilder<Key, KeyQueryBuilder> {
770791

771792
KeyQueryBuilder() {
@@ -787,6 +808,9 @@ public StructuredQuery<Key> build() {
787808
}
788809
}
789810

811+
/**
812+
* A StructuredQuery builder for projection queries.
813+
*/
790814
public static final class ProjectionEntityQueryBuilder
791815
extends BaseBuilder<ProjectionEntity, ProjectionEntityQueryBuilder> {
792816

@@ -804,11 +828,17 @@ public ProjectionEntityQueryBuilder clearProjection() {
804828
return super.clearProjection();
805829
}
806830

831+
/**
832+
* Sets the query's projection clause (clearing any previously specified Projection settings).
833+
*/
807834
@Override
808835
public ProjectionEntityQueryBuilder projection(Projection projection, Projection... others) {
809836
return super.projection(projection, others);
810837
}
811838

839+
/**
840+
* Adds one or more projections to the existing projection clause.
841+
*/
812842
@Override
813843
public ProjectionEntityQueryBuilder addProjection(Projection projection, Projection... others) {
814844
return super.addProjection(projection, others);
@@ -819,11 +849,17 @@ public ProjectionEntityQueryBuilder clearGroupBy() {
819849
return super.clearGroupBy();
820850
}
821851

852+
/**
853+
* Sets the query's group by clause (clearing any previously specified GroupBy settings).
854+
*/
822855
@Override
823856
public ProjectionEntityQueryBuilder groupBy(String property, String... others) {
824857
return super.groupBy(property, others);
825858
}
826859

860+
/**
861+
* Adds one or more properties to the existing group by clause.
862+
*/
827863
@Override
828864
public ProjectionEntityQueryBuilder addGroupBy(String property, String... others) {
829865
return super.addGroupBy(property, others);

trunk/gcloud-java-storage/src/main/java/com/google/gcloud/storage/Blob.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import com.google.common.collect.Lists;
2525
import com.google.gcloud.spi.StorageRpc;
2626
import com.google.gcloud.storage.Storage.BlobTargetOption;
27+
import com.google.gcloud.storage.Storage.BlobWriteOption;
2728
import com.google.gcloud.storage.Storage.CopyRequest;
2829
import com.google.gcloud.storage.Storage.SignUrlOption;
2930

@@ -269,12 +270,14 @@ public BlobReadChannel reader(BlobSourceOption... options) {
269270
}
270271

271272
/**
272-
* Returns a {@code BlobWriteChannel} object for writing to this blob.
273+
* Returns a {@code BlobWriteChannel} object for writing to this blob. By default any md5 and
274+
* crc32c values in the current blob are ignored unless requested via the
275+
* {@code BlobWriteOption.md5Match} and {@code BlobWriteOption.crc32cMatch} options.
273276
*
274277
* @param options target blob options
275278
* @throws StorageException upon failure
276279
*/
277-
public BlobWriteChannel writer(BlobTargetOption... options) {
280+
public BlobWriteChannel writer(BlobWriteOption... options) {
278281
return storage.writer(info, options);
279282
}
280283

0 commit comments

Comments
 (0)