Package com.google.cloud.datastore (2.20.1)

GitHub Repository

Classes

Class Description
com.google.cloud.datastore.AggregationQuery An implementation of a Google Cloud Datastore Query that returns AggregationResults, It can be constructed by providing a nested query (StructuredQuery or GqlQuery) to run the aggregations on and a set of Aggregation.
com.google.cloud.datastore.AggregationQuery.Builder
com.google.cloud.datastore.AggregationResult Represents a result of an AggregationQuery query submission.
com.google.cloud.datastore.AggregationResults The result of an AggregationQuery query submission. Contains a List<AggregationResult> and readTime Timestamp in it.

This can be used to iterate over an underlying List<AggregationResult> directly.

com.google.cloud.datastore.BaseDatastoreBatchWriter Base class for DatastoreBatchWriter.
com.google.cloud.datastore.BaseEntity A base class for entities (key and properties). An entity is a Google Cloud Datastore persistent data object. An entity holds one or more properties, represented by a name (as String) and a value (as com.google.cloud.datastore.Value), and may be associated with a key. For a list of possible values see ValueType.
com.google.cloud.datastore.BaseEntity.Builder
com.google.cloud.datastore.BaseKey Base class for keys.
com.google.cloud.datastore.BaseKey.Builder Base class for key builders.
com.google.cloud.datastore.Blob A Google Cloud Datastore Blob. This class is immutable. See Also: Google Cloud Datastore Entities, Properties, and Keys
com.google.cloud.datastore.BlobValue
com.google.cloud.datastore.BlobValue.Builder
com.google.cloud.datastore.BooleanValue
com.google.cloud.datastore.BooleanValue.Builder
com.google.cloud.datastore.Cursor A Google Cloud Datastore cursor. The cursor can be used to as a starting point or an ending point for a Query
com.google.cloud.datastore.DatastoreOptions
com.google.cloud.datastore.DatastoreOptions.Builder
com.google.cloud.datastore.DatastoreOptions.DefaultDatastoreFactory
com.google.cloud.datastore.DatastoreOptions.DefaultDatastoreRpcFactory
com.google.cloud.datastore.DoubleValue
com.google.cloud.datastore.DoubleValue.Builder
com.google.cloud.datastore.Entity An entity is the Google Cloud Datastore persistent data object for a specific key. An entity will always have a complete Key.
com.google.cloud.datastore.Entity.Builder
com.google.cloud.datastore.EntityQuery An implementation of a Google Cloud Datastore entity query that can be constructed by providing all the specific query elements. See Also: Datastore queries
com.google.cloud.datastore.EntityQuery.Builder A EntityQuery builder for queries that return Entity results.
com.google.cloud.datastore.EntityValue
com.google.cloud.datastore.EntityValue.Builder
com.google.cloud.datastore.FullEntity A full entity is a BaseEntity that holds all the properties associated with a Datastore entity (as opposed to ProjectionEntity).
com.google.cloud.datastore.FullEntity.Builder
com.google.cloud.datastore.GqlQuery A Google Cloud Datastore GQL query.

A usage example:

com.google.cloud.datastore.GqlQuery.Builder A GQL query builder.
com.google.cloud.datastore.GqlQueryProtoPreparer
com.google.cloud.datastore.IncompleteKey An incomplete key (without a name or id). This class is immutable.
com.google.cloud.datastore.IncompleteKey.Builder
com.google.cloud.datastore.Key A key that is guaranteed to be complete and could be used to reference a Google Cloud Datastore Entity. This class is immutable. See Also: Google Cloud Datastore Entities, Properties, and Keys
com.google.cloud.datastore.Key.Builder
com.google.cloud.datastore.KeyFactory A helper for creating keys for a specific Datastore, using its associated projectId and namespace.
com.google.cloud.datastore.KeyQuery An implementation of a Google Cloud Datastore key-only query that can be constructed by providing all the specific query elements. See Also: Datastore queries
com.google.cloud.datastore.KeyQuery.Builder A KeyQuery builder for queries that return Key results.
com.google.cloud.datastore.KeyValue
com.google.cloud.datastore.KeyValue.Builder
com.google.cloud.datastore.LatLng A Google Cloud Datastore LatLng (represented by latitude and longitude in degrees). This class is immutable. See Also: Google Cloud Datastore Entities, Properties, and Keys
com.google.cloud.datastore.LatLngValue
com.google.cloud.datastore.LatLngValue.Builder
com.google.cloud.datastore.ListValue A Google Cloud Datastore list value. A list value is a list of Value objects.
com.google.cloud.datastore.ListValue.Builder
com.google.cloud.datastore.LongValue
com.google.cloud.datastore.LongValue.Builder
com.google.cloud.datastore.NullValue
com.google.cloud.datastore.NullValue.Builder
com.google.cloud.datastore.PathElement Represents a single element in a key's path.
com.google.cloud.datastore.ProjectionEntity A projection entity is a result of a Google Cloud Datastore projection query. A projection entity holds one or more properties, represented by a name (as String) and a value (as Value), and may have a Key. See Also: Google Cloud Datastore Entities, Properties, and Keys, Google Cloud Datastore projection queries
com.google.cloud.datastore.ProjectionEntity.Builder
com.google.cloud.datastore.ProjectionEntityQuery An implementation of a Google Cloud Datastore projection entity query that can be constructed by providing all the specific query elements. See Also: Datastore queries
com.google.cloud.datastore.ProjectionEntityQuery.Builder A ProjectionEntityQuery builder for queries that return ProjectionEntity results.
com.google.cloud.datastore.Query A Google Cloud Datastore query. For usage examples see GqlQuery, StructuredQuery and AggregationQuery.

Note that queries require proper indexing. See Cloud Datastore Index

com.google.cloud.datastore.Query.ResultType This class represents the expected type of the result. ENTITY: A full entity represented by Entity. PROJECTION_ENTITY: A projection entity, represented by ProjectionEntity. KEY: An entity's Key.
com.google.cloud.datastore.RawValue
com.google.cloud.datastore.RawValue.Builder
com.google.cloud.datastore.ReadOption Specifies options for read operations in Datastore, namely getting/fetching entities and running queries.
com.google.cloud.datastore.ReadOption.EventualConsistency Specifies eventual consistency for reads from Datastore. Lookups and ancestor queries using this option permit Datastore to return stale results.
com.google.cloud.datastore.ReadOption.QueryConfig
com.google.cloud.datastore.ReadOption.ReadTime Reads entities as they were at the given time. This may not be older than 270 seconds. This value is only supported for Cloud Firestore in Datastore mode.
com.google.cloud.datastore.ReadOptionProtoPreparer
com.google.cloud.datastore.RetryAndTraceDatastoreRpcDecorator An implementation of DatastoreRpc which acts as a Decorator and decorates the underlying DatastoreRpc with the logic of retry and Traceability.
com.google.cloud.datastore.StringValue
com.google.cloud.datastore.StringValue.Builder
com.google.cloud.datastore.StructuredQuery An implementation of a Google Cloud Datastore Query that can be constructed by providing all the specific query elements.

A usage example:

com.google.cloud.datastore.StructuredQuery.CompositeFilter A class representing a filter composed of a combination of other filters.
com.google.cloud.datastore.StructuredQuery.Filter
com.google.cloud.datastore.StructuredQuery.OrderBy
com.google.cloud.datastore.StructuredQuery.OrderBy.Direction
com.google.cloud.datastore.StructuredQuery.PropertyFilter A class representing a filter based on a single property or ancestor.
com.google.cloud.datastore.StructuredQueryProtoPreparer
com.google.cloud.datastore.TimestampValue
com.google.cloud.datastore.TimestampValue.Builder
com.google.cloud.datastore.TraceUtil Helper class for tracing utility. It is used for instrumenting HttpDatastoreRpc with OpenCensus APIs.

TraceUtil instances are created by the TraceUtil#getInstance() method.

com.google.cloud.datastore.TransactionExceptionHandler
com.google.cloud.datastore.TransactionOperationExceptionHandler
com.google.cloud.datastore.Value Base class for all Google Cloud Datastore value types. All values must be associated with a non-null content (except NullValue). All values are immutable (including their content). To edit (a copy) use #toBuilder(). Unsupported value (deprecated or unrecognized) would be represented by RawValue.

Interfaces

Interface Description
com.google.cloud.datastore.Batch An interface to represent a batch of write operations. Any write operation that is applied on a batch will only be sent to the Datastore upon #submit. A usage example:
com.google.cloud.datastore.Batch.Response
com.google.cloud.datastore.Datastore An interface for Google Cloud Datastore.
com.google.cloud.datastore.Datastore.TransactionCallable A callback for running with a transactional com.google.cloud.datastore.DatastoreReaderWriter. The associated transaction will be committed after a successful return from the run method. Any propagated exception will cause the transaction to be rolled-back.
com.google.cloud.datastore.DatastoreBatchWriter An interface to represent a batch of write operations. All write operation for a batch writer will be applied to the Datastore in one RPC call.

WARNING: This class maintains an internal state in terms of java.util.LinkedHashMap and java.util.LinkedHashSet which gets updated on every method

com.google.cloud.datastore.DatastoreFactory An interface for Datastore factories.
com.google.cloud.datastore.DatastoreReader An interface to represent Google Cloud Datastore read operations.
com.google.cloud.datastore.DatastoreReaderWriter An interface that combines both Google Cloud Datastore read and write operations.
com.google.cloud.datastore.DatastoreWriter An interface to represent Google Cloud Datastore write operations.
com.google.cloud.datastore.QueryResults The result of a Google Cloud Datastore query submission. When the result is not typed it is possible to cast it to its appropriate type according to the #getResultClass value. Results are loaded lazily in batches, where batch size is set by Cloud Datastore. As a result, it is possible to get a DatastoreException upon hasNext or next calls.
com.google.cloud.datastore.RecordQuery An internal marker interface to represent Query that returns the entity records.
com.google.cloud.datastore.StructuredQuery.Builder Interface for StructuredQuery builders.
com.google.cloud.datastore.Transaction A Google cloud datastore transaction. Similar to Batch any write operation that is applied on a transaction will only be sent to the Datastore upon #commit. A call to #rollback will invalidate the transaction and discard the changes. Any read operation that is done by a transaction will be part of it and therefore a commit is guaranteed to
com.google.cloud.datastore.Transaction.Response
com.google.cloud.datastore.ValueBuilder A common interface for Value builders.

Enums

Enum Description
com.google.cloud.datastore.AggregationQuery.Mode
com.google.cloud.datastore.ValueType The type of a Datastore property. See Also: Google Cloud Datastore types

Exceptions

Exception Description
com.google.cloud.datastore.DatastoreException Datastore service exception. See Also: Google Cloud Datastore error codes