Class SQLConnectionImpl
- java.lang.Object
- 
- edu.uiuc.ncsa.security.storage.sql.SQLConnectionImpl
 
- 
- All Implemented Interfaces:
- ConnectionParameters
 - Direct Known Subclasses:
- AdminConnectionParameters,- DerbyConnectionParameters,- H2ConnectionParameters,- MariaDBConnectionParameters,- MySQLConnectionParameters,- PostgresConnectionParameters
 
 public abstract class SQLConnectionImpl extends Object implements ConnectionParameters General connection parameters object for a relational database. These properties are standard for every such database, the only difference really is how the JDBC urls are made, which is vendor specific.Created by Jeff Gaynor 
 on Jun 23, 2010 at 8:01:59 AM
- 
- 
Constructor SummaryConstructors Modifier Constructor Description protectedSQLConnectionImpl(String username, String password, String databaseName, String schema, String host, int port, String jdbcDriver, boolean useSSL, String parameters)SQLConnectionImpl(net.sf.json.JSONObject jsonObject)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringaddParameters(String jdbcURL)Add parameters from the configuration file if they exist.booleanequals(Object obj)voidfromJSON(net.sf.json.JSONObject json)Populate this from the JSON object.StringgetDatabaseName()StringgetParameters()StringgetPassword()StringgetSchema()StringgetUsername()protected voidinit()net.sf.json.JSONObjecttoJSON()Turn this configuration into a JSON object.StringtoString()- 
Methods inherited from class java.lang.Objectclone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface edu.uiuc.ncsa.security.storage.sql.ConnectionParametersgetJdbcUrl
 
- 
 
- 
- 
- 
Method Detail- 
addParametersprotected String addParameters(String jdbcURL) Add parameters from the configuration file if they exist. The parameter string is of the formkey0=value0&apm;key1=value1&apm;key2=value2...NOTE: this method does not set the ssl connection parameter -- tjhat should be done before invoking this method because that is very vendor specific. This method passes along whatever parameters to the driver the user needs or skips them if there are none.- Parameters:
- jdbcURL-
- Returns:
 
 - 
getParameterspublic String getParameters() 
 - 
getUsernamepublic String getUsername() - Specified by:
- getUsernamein interface- ConnectionParameters
 
 - 
initprotected void init() 
 - 
getPasswordpublic String getPassword() 
 - 
getDatabaseNamepublic String getDatabaseName() 
 - 
getSchemapublic String getSchema() 
 - 
toJSONpublic net.sf.json.JSONObject toJSON() Turn this configuration into a JSON object. This presupposed that this has been created already.- Returns:
 
 - 
fromJSONpublic void fromJSON(net.sf.json.JSONObject json) Populate this from the JSON object. This will overwrite any existing values.- Parameters:
- json-
 
 
- 
 
-