Package com.uc4.api.objects
Class DatabaseConnection
java.lang.Object
com.uc4.api.objects.UC4Object
com.uc4.api.objects.DatabaseConnection
This class represents a CONN.DB Object.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic enumType of the database.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddConnectProperties(String name, String value) Adds a value for the connect properties at the end of the table.voidaddConnectString(String name, String value) Adds a value for the connect String at the end of the table.voidClears the table of connect properties.voidClears the table of the connect string values.Returns an unmodifiable map which contains all connect properties.Returns an unmodifiable map which contains all connect string values.Returns the name of the database.intReturns the host name of the database server.Returns the database type.Returns the JDBC connect string if "Generic JDBC" is selected as database type.getUser()header()Returns the header data of this object.booleanReturnstrueif this Object can be executed.booleanReturnstrueif the DB name is the service name of an Oracle database.protected voidloadContent(com.uc4.util.XMLDocument doc, ConnectionAttributes session) voidsetAlternativeLogin(UC4ObjectName alternativeLogin) Sets an alternative Login Object.voidSets the name of the database.voidsetDbPort(int dbPort) Sets the port of the database.voidsetDbServer(String serverName) Sets the database server name.voidSets the database type.voidsetGenericJdbcConnectString(String connect) Sets the JDBC connect String.voidsetOracleServiceName(boolean oracleServiceName) Defines how the database name is used in case of Oracle.voidsetPassword(String password) Sets the password of the database user.voidprotected voidstoreContent(com.uc4.util.XMLDocument doc, Element objectElement, ConnectionAttributes sessionInfo) Methods inherited from class com.uc4.api.objects.UC4Objectdocu, getAccess, getIdnr, getModCount, getName, getObjectClient, getType, isOldVersion, load, store, validate
- 
Constructor Details- 
DatabaseConnectionpublic DatabaseConnection()
 
- 
- 
Method Details- 
headerReturns the header data of this object. This is the information of the header tab in the dialog client.- Returns:
- header
 
- 
loadContent
- 
storeContentprotected void storeContent(com.uc4.util.XMLDocument doc, Element objectElement, ConnectionAttributes sessionInfo) 
- 
getDBTypeReturns the database type.- Returns:
- Vendor of the database
 
- 
setDBTypeSets the database type.- Parameters:
- type- Vendor of the database
 
- 
getDbPortpublic int getDbPort()- Returns:
- Port of the Database
 
- 
setDbPortpublic void setDbPort(int dbPort) Sets the port of the database.- Parameters:
- dbPort- Port
 
- 
getDbNameReturns the name of the database.- Returns:
- DB name
 
- 
setDbNameSets the name of the database.- Parameters:
- dbName- DB name
 
- 
getDbServerReturns the host name of the database server.- Returns:
- DB Server
 
- 
isOracleServiceNamepublic boolean isOracleServiceName()Returnstrueif the DB name is the service name of an Oracle database.- Returns:
- True for Oracle Service name, false if DB name is the SID
 
- 
setOracleServiceNamepublic void setOracleServiceName(boolean oracleServiceName) Defines how the database name is used in case of Oracle. The value is ignored for other database types.- Parameters:
- oracleServiceName- true if the DB name is a service name or false for SID
 
- 
setDbServerSets the database server name.- Parameters:
- serverName- Host of the database server
 
- 
getConnectStringValuesReturns an unmodifiable map which contains all connect string values.- Returns:
- Connect String values
 
- 
getConnectPropertiesReturns an unmodifiable map which contains all connect properties.- Returns:
- Connect properties
 
- 
clearConnectStringValuespublic void clearConnectStringValues()Clears the table of the connect string values.
- 
clearConnectPropertiespublic void clearConnectProperties()Clears the table of connect properties.
- 
addConnectStringAdds a value for the connect String at the end of the table.- Parameters:
- name- Name of the property
- value- Value
 
- 
getAlternativeLogin- Returns:
- Name of the alternative Login Object
 
- 
setAlternativeLoginSets an alternative Login Object.- Parameters:
- alternativeLogin- Alternative Login
 
- 
getUser- Returns:
- Name of the Database user
 
- 
setUser- Parameters:
- user- Sets the name of the user
 
- 
setPasswordSets the password of the database user.- Parameters:
- password- Password of the User
 
- 
addConnectPropertiesAdds a value for the connect properties at the end of the table.- Parameters:
- name- Name of the property
- value- Value
 
- 
isExecutablepublic boolean isExecutable()Description copied from class:UC4ObjectReturnstrueif this Object can be executed.- Specified by:
- isExecutablein class- UC4Object
- Returns:
- true if the Object can be executed, false if not.
 
- 
getGenericJdbcConnectStringReturns the JDBC connect string if "Generic JDBC" is selected as database type.- Returns:
- Connect String or an empty String if not set. The return value is never null.
 
- 
setGenericJdbcConnectStringSets the JDBC connect String. This value is only used if the type is "Generic JDBC".- Parameters:
- connect- Connect String which starts with "jdbc:"
 
 
-