public class DatastoreOptions extends Object
Example for connecting to a datastore:
DatastoreOptions options = new DatastoreOptions.Builder() .projectId("my-project-id") .credential(DatastoreHelper.getComputeEngineCredential()) .build(); DatastoreFactory.get().create(options);
The options should be passed to DatastoreFactory.create(com.google.datastore.v1.client.DatastoreOptions)
.
Modifier and Type | Class and Description |
---|---|
static class |
DatastoreOptions.Builder
Builder for
DatastoreOptions . |
Modifier and Type | Method and Description |
---|---|
com.google.api.client.auth.oauth2.Credential |
getCredential() |
String |
getDatabaseId() |
String |
getHost() |
com.google.api.client.http.HttpRequestInitializer |
getInitializer() |
String |
getLocalHost() |
String |
getProjectEndpoint() |
String |
getProjectId() |
com.google.api.client.http.HttpTransport |
getTransport() |
public String getProjectId()
@BetaApi public String getDatabaseId()
public String getProjectEndpoint()
public String getHost()
public String getLocalHost()
public com.google.api.client.http.HttpRequestInitializer getInitializer()
public com.google.api.client.auth.oauth2.Credential getCredential()
public com.google.api.client.http.HttpTransport getTransport()
Copyright © 2023 Google LLC. All rights reserved.