| 
 | Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.4.0) E17493-05 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectoracle.jdeveloper.db.adapter.AbstractConnectionCreator
public abstract class AbstractConnectionCreator
Abstract implementation of ConnectionCreator that implements getConnection() and creates a connection given the URL and driver class returned by getConnectionURL() and getDriverClassName().
| Constructor Summary | |
|---|---|
| AbstractConnectionCreator() | |
| Method Summary | |
|---|---|
| protected  boolean | allowNullPassword()Returns false by default. | 
| protected  java.util.ResourceBundle | getBundle() | 
|  java.sql.Connection | getConnection(java.util.Properties props)Creates a Connection from the given Properties. | 
|  java.lang.String | getConnectionURL(java.util.Properties props)The default implementation on this abstract class return the DatabaseProvider.DRIVER_CLASS_REFTYPE property. | 
|  java.lang.String | getDriverClassName(java.util.Properties props)The default implementation on this class returns the DatabaseProvider.CUSTOM_URL_CLASS_REFTYPE property. | 
| protected  java.lang.String | getPropertyOrThrow(java.util.Properties props,
                   java.lang.String name)Utility method to retrieve a property from the given Properties and throw an exception is the property is missing or empty. | 
| protected  boolean | hasLength(java.lang.String s)Utility method to check a string isn't null or empty. | 
|  java.util.Collection<java.lang.String> | listAllowedProperties()Gets a list of the properties that are relevant to this creator. | 
| protected  void | setCustomProperties(java.util.Properties connProps,
                    java.util.Properties jdbcProps)Override to include connection type specific properties in the jdbc properties set that the driver will be created with. | 
|  boolean | shouldEncrypt(java.lang.String propName)By default only the password ( DatabaseProvider.PASSWORD_CLASS_REFTYPE) is encrypted. | 
|  boolean | shouldPromptForPassword(java.util.Properties props)By default the password is prompted for if the passwordis null andsave for passwordis set to true. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public AbstractConnectionCreator()
| Method Detail | 
|---|
protected java.util.ResourceBundle getBundle()
public boolean shouldEncrypt(java.lang.String propName)
DatabaseProvider.PASSWORD_CLASS_REFTYPE ) is encrypted.
shouldEncrypt in interface ConnectionCreatorpublic boolean shouldPromptForPassword(java.util.Properties props)
password is null and
 save for password
 is set to true.
shouldPromptForPassword in interface ConnectionCreatorprops - the connection details that might need a password prompted for
protected void setCustomProperties(java.util.Properties connProps,
                                   java.util.Properties jdbcProps)
Username, password and role are done by default by this abstract creator.
connProps - the connection properties defined in the connection
 definition.jdbcProps - the properties that will be used to create the JDBC
 connection
public java.sql.Connection getConnection(java.util.Properties props)
                                  throws java.sql.SQLException
ConnectionCreator
getConnection in interface ConnectionCreatorprops - the Properties containing the connection data
java.sql.SQLException - if the connection cannot be created because the data
 is wrong or the database is down.protected boolean allowNullPassword()
protected boolean hasLength(java.lang.String s)
protected java.lang.String getPropertyOrThrow(java.util.Properties props,
                                              java.lang.String name)
                                       throws java.sql.SQLException
java.sql.SQLException
public java.lang.String getConnectionURL(java.util.Properties props)
                                  throws java.sql.SQLException
getConnectionURL in interface ConnectionCreatorjava.sql.SQLException
public java.lang.String getDriverClassName(java.util.Properties props)
                                    throws java.sql.SQLException
getDriverClassName in interface ConnectionCreatorjava.sql.SQLExceptionpublic java.util.Collection<java.lang.String> listAllowedProperties()
ConnectionCreator
listAllowedProperties in interface ConnectionCreator| 
 | Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.4.0) E17493-05 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||