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.Strings_prefix
-
Constructor Summary
Constructors Constructor Description BeepBeepDriver()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanacceptsURL(java.lang.String url)java.sql.Connectionconnect(java.lang.String url, java.util.Properties info)static java.sql.ConnectioncreateConnection(Interpreter inter, java.lang.String url, java.util.Properties prop)Creates a new database connection to a given URL.intgetMajorVersion()intgetMinorVersion()java.util.logging.LoggergetParentLogger()java.sql.DriverPropertyInfo[]getPropertyInfo(java.lang.String url, java.util.Properties info)static booleanisValidURL(java.lang.String url)Validates a URLbooleanjdbcCompliant()
-
-
-
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:
getMajorVersionin interfacejava.sql.Driver- See Also:
Driver.getMajorVersion()
-
getMinorVersion
public int getMinorVersion()
- Specified by:
getMinorVersionin interfacejava.sql.Driver- See Also:
Driver.getMinorVersion()
-
jdbcCompliant
public boolean jdbcCompliant()
- Specified by:
jdbcCompliantin interfacejava.sql.Driver- See Also:
Driver.jdbcCompliant()
-
acceptsURL
public boolean acceptsURL(java.lang.String url)
- Specified by:
acceptsURLin 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:
trueif the URL is valid,falseotherwise
-
getPropertyInfo
public java.sql.DriverPropertyInfo[] getPropertyInfo(java.lang.String url, java.util.Properties info) throws java.sql.SQLException- Specified by:
getPropertyInfoin 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:
connectin 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
Connectionobject 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:
getParentLoggerin interfacejava.sql.Driver- Throws:
java.sql.SQLFeatureNotSupportedException
-
-