Class DatabaseId (6.65.1)

public final class DatabaseId

Represents an id of a Cloud Spanner database resource.

Inheritance

Object > DatabaseId

Static Methods

of(InstanceId instanceId, String database)

public static DatabaseId of(InstanceId instanceId, String database)

Creates a DatabaseId given the instance identity and database id.

Parameters
Name Description
instanceId InstanceId
database String
Returns
Type Description
DatabaseId

of(String name)

public static DatabaseId of(String name)

Creates a DatabaseId from the name of the database.

Parameter
Name Description
name String

the database name of the form projects/PROJECT_ID/instances/INSTANCE_ID/databases/DATABASE_ID

Returns
Type Description
DatabaseId

of(String project, String instance, String database)

public static DatabaseId of(String project, String instance, String database)

Creates a DatabaseId given project, instance and database IDs.

Parameters
Name Description
project String
instance String
database String
Returns
Type Description
DatabaseId

Methods

equals(Object o)

public boolean equals(Object o)
Parameter
Name Description
o Object
Returns
Type Description
boolean
Overrides

getDatabase()

public String getDatabase()

Returns the database id.

Returns
Type Description
String

getInstanceId()

public InstanceId getInstanceId()

Returns the instance id for this database.

Returns
Type Description
InstanceId

getName()

public String getName()

Returns the name of this database.

Returns
Type Description
String

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

toString()

public String toString()
Returns
Type Description
String
Overrides