Primavera Integration API 7.0

com.primavera.integration.common
Class DatabaseInstance

java.lang.Object
  extended by com.primavera.integration.common.DatabaseInstance
All Implemented Interfaces:
java.io.Serializable

public class DatabaseInstance
extends java.lang.Object
implements java.io.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.

See Also:
Serialized Form

Field Summary
static int DBTYPE_ORACLE
          Constant for Oracle Database Type
static int DBTYPE_SQL_SERVER
          Constant for SQL Server Database Type
 
Constructor Summary
DatabaseInstance(java.lang.String sDbId, java.lang.String sDbName)
          Deprecated. Included for backwards compatability. Replaced by DatabaseInstance(String, String, String)
DatabaseInstance(java.lang.String sDbId, java.lang.String sDbName, java.lang.String sDbUrl)
          Class constructor specifying database ID database name, and database URL.
DatabaseInstance(java.lang.String sDbId, java.lang.String sDbName, java.lang.String sDbUrl, int dbType, java.lang.String dbEncoding)
          Class constructor specifying database ID, name, URL, type, and encoding
 
Method Summary
 java.lang.String getActualDatabaseName()
          Returns the actual database name from the connection url
 java.lang.String getDatabaseId()
          Gets the database ID
 java.lang.String getDatabaseName()
          Gets the database name
 java.lang.String getDatabaseUrl()
          Gets the database URL.
 java.lang.String getDBEncoding()
          Gets the database encoding
 int getDBType()
          Gets the database type.
 java.lang.String toString()
          Gets a String representation of this object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DBTYPE_ORACLE

public static final int DBTYPE_ORACLE
Constant for Oracle Database Type

See Also:
Constant Field Values

DBTYPE_SQL_SERVER

public static final int DBTYPE_SQL_SERVER
Constant for SQL Server Database Type

See Also:
Constant Field Values
Constructor Detail

DatabaseInstance

public DatabaseInstance(java.lang.String sDbId,
                        java.lang.String sDbName,
                        java.lang.String sDbUrl,
                        int dbType,
                        java.lang.String dbEncoding)
Class constructor specifying database ID, name, URL, type, and encoding

Parameters:
sDbId - database id
sDbName - database name
sDbUrl - database URL
dbType - database type
dbEncoding - database encoding

DatabaseInstance

public DatabaseInstance(java.lang.String sDbId,
                        java.lang.String sDbName,
                        java.lang.String sDbUrl)
Class constructor specifying database ID database name, and database URL.

Parameters:
sDbId - database id
sDbName - database name
sDbUrl - database URL

DatabaseInstance

@Deprecated
public DatabaseInstance(java.lang.String sDbId,
                                   java.lang.String sDbName)
Deprecated. Included for backwards compatability. Replaced by DatabaseInstance(String, String, String)

Class constructor specifying database ID and database name.

Parameters:
sDbId - database id
sDbName - database name
Method Detail

getDatabaseId

public java.lang.String getDatabaseId()
Gets the database ID

Returns:
String database id

getDatabaseName

public java.lang.String getDatabaseName()
Gets the database name

Returns:
String database name

getDatabaseUrl

public java.lang.String getDatabaseUrl()
Gets the database URL.

Returns:
String database URL

toString

public java.lang.String toString()
Gets a String representation of this object. This is the same as the database name.

Overrides:
toString in class java.lang.Object
Returns:
String database name

getActualDatabaseName

public java.lang.String getActualDatabaseName()
Returns the actual database name from the connection url

Returns:
String actual database name

getDBEncoding

public java.lang.String getDBEncoding()
Gets the database encoding

Returns:
String the database encoding

getDBType

public int getDBType()
Gets the database type. See the constants DBTYPE_ORACLE and DBTYPE_SQL_SERVER for the possible values.

Returns:
int the database type

Primavera Integration API 7.0

Copyright © 2003, 2009, Oracle and/or its affiliates. All rights reserved.