Interface DatastoreReader (3.1.0)
Stay organized with collections
Save and categorize content based on your preferences.
3.1.0 (latest)
2.40.0
2.37.0
2.36.0
2.34.0
2.33.3
2.32.3
2.31.4
2.30.0
2.29.1
2.28.2
2.27.1
2.26.4
2.25.2
2.24.3
2.23.0
2.22.0
2.21.3
2.20.2
2.19.2
2.18.5
2.17.6
public interface DatastoreReader
An interface to represent Google Cloud Datastore read operations.
Methods
<T>run(Query<T> query)
public abstract QueryResults<T> <T>run ( Query<T> query )
Submits a Query and returns its result.
Parameter
Name
Description
query
Query <T >
fetch(Key[] keys)
public abstract List<Entity> fetch ( Key [] keys )
Returns a list with a value for each given key (ordered by input). null values are
returned for nonexistent keys. When possible prefer using #get(Key...) to avoid eagerly
loading the results.
Parameter
Name
Description
keys
Key []
get(Key key)
public abstract Entity get ( Key key )
Returns an Entity for the given Key or null if it doesn't exist.
Parameter
Name
Description
key
Key
Returns
Type
Description
Entity
get(Key[] keys)
public abstract Iterator<Entity> get ( Key [] keys )
Returns an Entity for each given Key that exists in the Datastore. The order of
the result is unspecified. Results are loaded lazily, so it is possible to get a
DatastoreException from the returned Iterator's hasNext or
next methods.
See Also: #get(Key)
Parameter
Name
Description
keys
Key []
runAggregation(AggregationQuery query)
public abstract AggregationResults runAggregation ( AggregationQuery query )
runAggregation(AggregationQuery query, ExplainOptions explainOptions)
public abstract AggregationResults runAggregation ( AggregationQuery query , ExplainOptions explainOptions )
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-06-18 UTC.
[null,null,["Last updated 2026-06-18 UTC."],[],[]]