Package ca.uqac.lif.cep.jdbc
Class BeepBeepDriver
- java.lang.Object
-
- ca.uqac.lif.cep.jdbc.BeepBeepDriver
-
- All Implemented Interfaces:
java.sql.Driver
public class BeepBeepDriver extends java.lang.Object implements java.sql.Driver
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
s_prefix
-
Constructor Summary
Constructors Constructor Description BeepBeepDriver()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
acceptsURL(java.lang.String url)
java.sql.Connection
connect(java.lang.String url, java.util.Properties info)
static java.sql.Connection
createConnection(Interpreter inter, java.lang.String url, java.util.Properties prop)
Creates a new database connection to a given URL.int
getMajorVersion()
int
getMinorVersion()
java.util.logging.Logger
getParentLogger()
java.sql.DriverPropertyInfo[]
getPropertyInfo(java.lang.String url, java.util.Properties info)
static boolean
isValidURL(java.lang.String url)
Validates a URLboolean
jdbcCompliant()
-
-
-
Field Detail
-
s_prefix
public static final java.lang.String s_prefix
- See Also:
- Constant Field Values
-
-
Method Detail
-
getMajorVersion
public int getMajorVersion()
- Specified by:
getMajorVersion
in interfacejava.sql.Driver
- See Also:
Driver.getMajorVersion()
-
getMinorVersion
public int getMinorVersion()
- Specified by:
getMinorVersion
in interfacejava.sql.Driver
- See Also:
Driver.getMinorVersion()
-
jdbcCompliant
public boolean jdbcCompliant()
- Specified by:
jdbcCompliant
in interfacejava.sql.Driver
- See Also:
Driver.jdbcCompliant()
-
acceptsURL
public boolean acceptsURL(java.lang.String url)
- Specified by:
acceptsURL
in interfacejava.sql.Driver
- See Also:
Driver.acceptsURL(java.lang.String)
-
isValidURL
public static boolean isValidURL(java.lang.String url)
Validates a URL- Parameters:
url
- The URL. It is considered valid if it begins by the stringjdbc:beepbeep:
- Returns:
true
if the URL is valid,false
otherwise
-
getPropertyInfo
public java.sql.DriverPropertyInfo[] getPropertyInfo(java.lang.String url, java.util.Properties info) throws java.sql.SQLException
- Specified by:
getPropertyInfo
in interfacejava.sql.Driver
- Throws:
java.sql.SQLException
- See Also:
Driver.getPropertyInfo(java.lang.String, java.util.Properties)
-
connect
public java.sql.Connection connect(java.lang.String url, java.util.Properties info) throws java.sql.SQLException
- Specified by:
connect
in interfacejava.sql.Driver
- Throws:
java.sql.SQLException
- See Also:
Driver.connect(java.lang.String, java.util.Properties)
-
createConnection
public static java.sql.Connection createConnection(Interpreter inter, java.lang.String url, java.util.Properties prop) throws java.sql.SQLException
Creates a new database connection to a given URL.- Parameters:
inter
- An interpreterurl
- The connection URLprop
- The properties- Returns:
- A
Connection
object that represents a connection to the URL - Throws:
java.sql.SQLException
- If the URL provided is invalid- See Also:
Driver.connect(java.lang.String, java.util.Properties)
-
getParentLogger
public java.util.logging.Logger getParentLogger() throws java.sql.SQLFeatureNotSupportedException
- Specified by:
getParentLogger
in interfacejava.sql.Driver
- Throws:
java.sql.SQLFeatureNotSupportedException
-
-