Skip to content

Commit ee17ece

Browse files
committed
add javadocs for gql binding methods
1 parent 3beba47 commit ee17ece

1 file changed

Lines changed: 108 additions & 0 deletions

File tree

  • google-cloud-datastore/src/main/java/com/google/cloud/datastore

google-cloud-datastore/src/main/java/com/google/cloud/datastore/GqlQuery.java

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,91 +196,199 @@ public Builder<V> clearBindings() {
196196
return this;
197197
}
198198

199+
/**
200+
* Sets a new named binding.
201+
*
202+
* @param name name of the binding
203+
* @param cursor a {@link Cursor} object that binds to a given name
204+
*/
199205
public Builder<V> setBinding(String name, Cursor cursor) {
200206
namedBindings.put(name, new Binding(cursor));
201207
return this;
202208
}
203209

210+
/**
211+
* Sets a new named binding.
212+
*
213+
* @param name name of the binding
214+
* @param value a String object or a list of String objects that binds to a
215+
* given name
216+
*/
204217
public Builder<V> setBinding(String name, String... value) {
205218
namedBindings.put(name, toBinding(StringValue.MARSHALLER, Arrays.asList(value)));
206219
return this;
207220
}
208221

222+
/**
223+
* Sets a new named binding.
224+
*
225+
* @param name name of the binding
226+
* @param value a long value or a list of long values that binds to a given name
227+
*/
209228
public Builder<V> setBinding(String name, long... value) {
210229
namedBindings.put(name, toBinding(LongValue.MARSHALLER, Longs.asList(value)));
211230
return this;
212231
}
213232

233+
/**
234+
* Sets a new named binding.
235+
*
236+
* @param name name of the binding
237+
* @param value a double value or a list of double values that binds to a given name
238+
*/
214239
public Builder<V> setBinding(String name, double... value) {
215240
namedBindings.put(name, toBinding(DoubleValue.MARSHALLER, Doubles.asList(value)));
216241
return this;
217242
}
218243

244+
/**
245+
* Sets a new named binding.
246+
*
247+
* @param name name of the binding
248+
* @param value a boolean value or a list of boolean values that binds to a given name
249+
*/
219250
public Builder<V> setBinding(String name, boolean... value) {
220251
namedBindings.put(name, toBinding(BooleanValue.MARSHALLER, Booleans.asList(value)));
221252
return this;
222253
}
223254

255+
/**
256+
* Sets a new named binding.
257+
*
258+
* @param name name of the binding
259+
* @param value a {@link Timestamp} object or a list of {@link Timestamp} objects that binds to
260+
* a given name
261+
*/
224262
public Builder<V> setBinding(String name, Timestamp... value) {
225263
namedBindings.put(name, toBinding(TimestampValue.MARSHALLER, Arrays.asList(value)));
226264
return this;
227265
}
228266

267+
/**
268+
* Sets a new named binding.
269+
*
270+
* @param name name of the binding
271+
* @param value a {@link Key} object or a list of {@link Key} objects that binds to a given name
272+
*/
229273
public Builder<V> setBinding(String name, Key... value) {
230274
namedBindings.put(name, toBinding(KeyValue.MARSHALLER, Arrays.asList(value)));
231275
return this;
232276
}
233277

278+
/**
279+
* Sets a new named binding.
280+
*
281+
* @param name name of the binding
282+
* @param value a {@link FullEntity} object or a list of {@link FullEntity} objects that binds
283+
* to a given name
284+
*/
234285
public Builder<V> setBinding(String name, FullEntity<?>... value) {
235286
namedBindings.put(name, toBinding(EntityValue.MARSHALLER, Arrays.asList(value)));
236287
return this;
237288
}
238289

290+
/**
291+
* Sets a new named binding.
292+
*
293+
* @param name name of the binding
294+
* @param value a {@link Blob} object or list of {@link Blob} objects that binds to a given name
295+
*/
239296
public Builder<V> setBinding(String name, Blob... value) {
240297
namedBindings.put(name, toBinding(BlobValue.MARSHALLER, Arrays.asList(value)));
241298
return this;
242299
}
243300

301+
/**
302+
* Sets a new positional binding.
303+
*
304+
* @param cursor a {@link Cursor} object to be set as a new positional binding
305+
*/
244306
public Builder<V> addBinding(Cursor cursor) {
245307
positionalBindings.add(new Binding(cursor));
246308
return this;
247309
}
248310

311+
/**
312+
* Sets a new positional binding.
313+
*
314+
* @param value a String object or a list of String objects to be set as a new
315+
* positional binding
316+
*/
249317
public Builder<V> addBinding(String... value) {
250318
positionalBindings.add(toBinding(StringValue.MARSHALLER, Arrays.asList(value)));
251319
return this;
252320
}
253321

322+
/**
323+
* Sets a new positional binding.
324+
*
325+
* @param value a long value or a list of long values to be set as a new positional binding
326+
*/
254327
public Builder<V> addBinding(long... value) {
255328
positionalBindings.add(toBinding(LongValue.MARSHALLER, Longs.asList(value)));
256329
return this;
257330
}
258331

332+
/**
333+
* Sets a new positional binding.
334+
*
335+
* @param value a double value or a list of double values to be set as a new positional binding
336+
*/
259337
public Builder<V> addBinding(double... value) {
260338
positionalBindings.add(toBinding(DoubleValue.MARSHALLER, Doubles.asList(value)));
261339
return this;
262340
}
263341

342+
/**
343+
* Sets a new positional binding.
344+
*
345+
* @param value a boolean value or a list of boolean values to be set as a new positional
346+
* binding
347+
*/
264348
public Builder<V> addBinding(boolean... value) {
265349
positionalBindings.add(toBinding(BooleanValue.MARSHALLER, Booleans.asList(value)));
266350
return this;
267351
}
268352

353+
/**
354+
* Sets a new positional binding.
355+
*
356+
* @param value a {@link Timestamp} object or a list of {@link Timestamp} objects to be set as a
357+
* new positional binding
358+
*/
269359
public Builder<V> addBinding(Timestamp... value) {
270360
positionalBindings.add(toBinding(TimestampValue.MARSHALLER, Arrays.asList(value)));
271361
return this;
272362
}
273363

364+
/**
365+
* Sets a new positional binding.
366+
*
367+
* @param value a {@link Key} object or a list of {@link Key} objects to be set as a new
368+
* positional binding
369+
*/
274370
public Builder<V> addBinding(Key... value) {
275371
positionalBindings.add(toBinding(KeyValue.MARSHALLER, Arrays.asList(value)));
276372
return this;
277373
}
278374

375+
/**
376+
* Sets a new positional binding.
377+
*
378+
* @param value a {@link FullEntity} object or a list of {@link FullEntity} objects to be set as
379+
* a new positional binding
380+
*/
279381
public Builder<V> addBinding(FullEntity<?>... value) {
280382
positionalBindings.add(toBinding(EntityValue.MARSHALLER, Arrays.asList(value)));
281383
return this;
282384
}
283385

386+
/**
387+
* Sets a new positional binding.
388+
*
389+
* @param value a {@link Blob} object or a list of {@link Blob} objects to be set as a new
390+
* positional binding
391+
*/
284392
public Builder<V> addBinding(Blob... value) {
285393
positionalBindings.add(toBinding(BlobValue.MARSHALLER, Arrays.asList(value)));
286394
return this;

0 commit comments

Comments
 (0)