|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.java.ao.DatabaseProvider
net.java.ao.db.SQLServerDatabaseProvider
net.java.ao.db.JTDSSQLServerDatabaseProvider
public class JTDSSQLServerDatabaseProvider
| Constructor Summary | |
|---|---|
JTDSSQLServerDatabaseProvider(String uri,
String username,
String password)
|
|
| Method Summary | |
|---|---|
Class<? extends Driver> |
getDriverClass()
Returns the JDBC Driver class which corresponds to the database being abstracted. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JTDSSQLServerDatabaseProvider(String uri,
String username,
String password)
| Method Detail |
|---|
public Class<? extends Driver> getDriverClass()
throws ClassNotFoundException
DatabaseProviderReturns the JDBC Driver class which corresponds to the database being abstracted. This should be implemented in such a way as to initialize and register the driver with JDBC. For most drivers, this requires code in the following form:
public Class<? extends Driver> getDriverClass() {
return (Class<? extends Driver>) Class.forName("com.mysql.jdbc.Driver");
}
The following does not fire the driver's static initializer and thus will (usually) not work:
public Class<? extends Driver> getDriverClass() {
return com.mysql.jdbc.Driver.class;
}
If the driver is not on the classpath, a ClassNotFoundException
can and should be thrown (certain auto-magic configuration sections of
ActiveObjects depend upon this under certain circumstances).
getDriverClass in class SQLServerDatabaseProviderDriver implementation which corresponds to the
relevant database.
ClassNotFoundException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||