public class DatabaseInstance extends Object implements Serializable
DatabaseInstance contains information about a database instance, specifically the ID and name. The ID can be used at login time to specify which database instance to connect to. The name is more descriptive and can be presented to a graphical user interface (GUI).
The API setup application ensures that a configuration exists in your primary database. This configuration is created with one database instance by default. To add other instances, use the Primavera Administrator application. See the API's Administrator Guide for more information.
Modifier and Type | Field and Description |
---|---|
static int |
DBTYPE_ORACLE
Constant for Oracle Database Type
|
static int |
DBTYPE_SQL_SERVER
Constant for SQL Server Database Type
|
Constructor and Description |
---|
DatabaseInstance(String sDbId,
String sDbName,
String sDbUrl)
Class constructor specifying database ID database name, and database URL.
|
DatabaseInstance(String sDbId,
String sDbName,
String sDbUrl,
DBType dbType,
String dbEncoding)
Class constructor specifying database ID, name, URL, type, and encoding
|
Modifier and Type | Method and Description |
---|---|
String |
getActualDatabaseName()
Returns the actual database name from the connection url
|
String |
getDatabaseId()
Gets the database ID
|
String |
getDatabaseName()
Gets the database name
|
String |
getDatabaseUrl()
Gets the database URL.
|
String |
getDBEncoding()
Gets the database encoding
|
int |
getDBType()
Gets the database type.
|
DBType |
getDBTypeEnum()
Gets the database type.
|
String |
toString()
Gets a String representation of this object.
|
public static final int DBTYPE_ORACLE
public static final int DBTYPE_SQL_SERVER
public DatabaseInstance(String sDbId, String sDbName, String sDbUrl, DBType dbType, String dbEncoding)
sDbId
- database idsDbName
- database namesDbUrl
- database URLdbType
- database typedbEncoding
- database encodingpublic String getDatabaseId()
public String getDatabaseName()
public String getDatabaseUrl()
public String toString()
public String getActualDatabaseName()
public String getDBEncoding()
public int getDBType()
public DBType getDBTypeEnum()
Copyright © 2003, 2022, Oracle and/or its affiliates.
Oracle®, Java, and MySQL are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.