public final class DatabaseId extends Object
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
String |
getDatabase()
Returns the database id.
|
InstanceId |
getInstanceId()
Returns the instance id for this database.
|
String |
getName()
Returns the name of this database.
|
int |
hashCode() |
static DatabaseId |
of(InstanceId instanceId,
String database)
Creates a
DatabaseId given the instance identity and database id. |
static DatabaseId |
of(String name)
Creates a
DatabaseId from the name of the database. |
static DatabaseId |
of(String project,
String instance,
String database)
Creates a
DatabaseId given project, instance and database IDs. |
String |
toString() |
public InstanceId getInstanceId()
public String getDatabase()
public String getName()
public static DatabaseId of(String name)
DatabaseId from the name of the database.name - the database name of the form projects/PROJECT_ID/instances/INSTANCE_ID/databases/DATABASE_IDIllegalArgumentException - if name does not conform to the expected patternpublic static DatabaseId of(String project, String instance, String database)
DatabaseId given project, instance and database IDs.public static DatabaseId of(InstanceId instanceId, String database)
DatabaseId given the instance identity and database id.Copyright © 2021 Google LLC. All rights reserved.