Package com.google.cloud.datastore
Interface DatastoreReader
- All Known Subinterfaces:
Datastore
,DatastoreReaderWriter
,Transaction
public interface DatastoreReader
An interface to represent Google Cloud Datastore read operations.
-
Method Summary
Modifier and TypeMethodDescriptionReturns a list with a value for each given key (ordered by input).<T> QueryResults<T>
Submits aQuery
and returns its result.default AggregationResults
runAggregation
(AggregationQuery query) Submits aAggregationQuery
and returnsAggregationResults
.
-
Method Details
-
get
- Throws:
DatastoreException
- upon failure
-
get
Returns anEntity
for each givenKey
that exists in the Datastore. The order of the result is unspecified. Results are loaded lazily, so it is possible to get aDatastoreException
from the returnedIterator
'shasNext
ornext
methods.- Throws:
DatastoreException
- upon failure- See Also:
-
fetch
Returns a list with a value for each given key (ordered by input).null
values are returned for nonexistent keys. When possible prefer usingget(Key...)
to avoid eagerly loading the results. -
run
Submits aQuery
and returns its result.- Throws:
DatastoreException
- upon failure
-
runAggregation
Submits aAggregationQuery
and returnsAggregationResults
.- Throws:
DatastoreException
- upon failure
-