diff options
author | michelou <michelou@epfl.ch> | 2005-11-16 09:23:07 +0000 |
---|---|---|
committer | michelou <michelou@epfl.ch> | 2005-11-16 09:23:07 +0000 |
commit | 36f6311a1de88bfd98fa1601511996d65e6d7037 (patch) | |
tree | 11ea59beca5cab0d649497441c5c899f9576162d /sources | |
parent | d1fbd50cc300c6bc8a1639e0b67bc459133f7dc3 (diff) | |
download | scala-36f6311a1de88bfd98fa1601511996d65e6d7037.tar.gz scala-36f6311a1de88bfd98fa1601511996d65e6d7037.tar.bz2 scala-36f6311a1de88bfd98fa1601511996d65e6d7037.zip |
- removed leading tabs.
- modified imports.
Diffstat (limited to 'sources')
-rw-r--r-- | sources/scala/dbc/Vendor.scala | 38 |
1 files changed, 21 insertions, 17 deletions
diff --git a/sources/scala/dbc/Vendor.scala b/sources/scala/dbc/Vendor.scala index 5e2b754263..db44ddec42 100644 --- a/sources/scala/dbc/Vendor.scala +++ b/sources/scala/dbc/Vendor.scala @@ -8,27 +8,31 @@ package scala.dbc; -import java.sql._; +import java.sql.{Connection, Driver}; + +/** This class .. + */ abstract class Vendor { - def nativeDriverClass: Class; - def uri: java.net.URI; - def user: String; - def pass: String; - def nativeProperties: java.util.Properties = { - val properties = new java.util.Properties(); - properties.setProperty("user", user); - properties.setProperty("password", pass); - properties - } + def nativeDriverClass: Class; + def uri: java.net.URI; + def user: String; + def pass: String; + def nativeProperties: java.util.Properties = { + val properties = new java.util.Properties(); + properties.setProperty("user", user); + properties.setProperty("password", pass); + properties + } - def retainedConnections: Int; + def retainedConnections: Int; - def getConnection: Connection = { - nativeDriverClass.newInstance().asInstanceOf[java.sql.Driver].connect(uri.toString(),nativeProperties) - } + def getConnection: Connection = { + val driver = nativeDriverClass.newInstance().asInstanceOf[Driver]; + driver.connect(uri.toString(),nativeProperties) + } - def urlProtocolString: String; + def urlProtocolString: String; -}
\ No newline at end of file +} |