Package com.primavera.integration.common
Class DatabaseInstance
java.lang.Object
com.primavera.integration.common.DatabaseInstance
- All Implemented Interfaces:
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:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intConstant for Oracle Database Typestatic final intConstant for SQL Server Database Type -
Constructor Summary
ConstructorsConstructorDescriptionDatabaseInstance(String sDbId, String sDbName, String sDbUrl) Class constructor specifying database ID database name, and database URL.Class constructor specifying database ID, name, URL, type, and encoding -
Method Summary
Modifier and TypeMethodDescriptionReturns the actual database name from the connection urlGets the database IDGets the database nameGets the database URL.Gets the database encodingintGets the database type.Gets the database type.toString()Gets a String representation of this object.
-
Field Details
-
DBTYPE_ORACLE
public static final int DBTYPE_ORACLEConstant for Oracle Database Type- See Also:
-
DBTYPE_SQL_SERVER
public static final int DBTYPE_SQL_SERVERConstant for SQL Server Database Type- See Also:
-
-
Constructor Details
-
DatabaseInstance
public DatabaseInstance(String sDbId, String sDbName, String sDbUrl, DBType dbType, String dbEncoding) Class constructor specifying database ID, name, URL, type, and encoding- Parameters:
sDbId- database idsDbName- database namesDbUrl- database URLdbType- database typedbEncoding- database encoding
-
DatabaseInstance
Class constructor specifying database ID database name, and database URL.- Parameters:
sDbId- database idsDbName- database namesDbUrl- database URL
-
-
Method Details
-
getDatabaseId
Gets the database ID- Returns:
- String database id
-
getDatabaseName
Gets the database name- Returns:
- String database name
-
getDatabaseUrl
Gets the database URL.- Returns:
- String database URL
-
toString
Gets a String representation of this object. This is the same as the database name. -
getActualDatabaseName
Returns the actual database name from the connection url- Returns:
- String actual database name
-
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:
- DBType the database type
-
getDBTypeEnum
Gets the database type.- Returns:
- DBType the database type
-