nl.knowledgeplaza.util.jdbc
Class Driver
java.lang.Object
nl.knowledgeplaza.util.jdbc.Driver
- All Implemented Interfaces:
- Driver
public class Driver
- extends Object
- implements Driver
This is for logging SQL statements to log4j.
URL is
jdbc:log4j:[log4j-class|[prefix|]]driverclass#actualURL
for example:
jdbc:log4j:oracle.jdbc.driver.OracleDriver#jdbc:oracle:thin:@localhost:1521:ORCL
or:
jdbc:log4j:com.my.class|oracle.jdbc.driver.OracleDriver#jdbc:oracle:thin:@localhost:1521:ORCL
or:
jdbc:log4j:com.my.class|myPrefix|oracle.jdbc.driver.OracleDriver#jdbc:oracle:thin:@localhost:1521:ORCL
- Version:
- $Revision: 1.2 $
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SOURCECODE_VERSION
public static final String SOURCECODE_VERSION
- Standard variable for determining version of a class file.
- See Also:
- Constant Field Values
log4j
public static org.apache.log4j.Logger log4j
PREFIX
public static final String PREFIX
- See Also:
- Constant Field Values
Driver
public Driver()
register
public static void register()
- Register the Driver with DriverManager
connect
public Connection connect(String url,
Properties info)
throws SQLException
- Specified by:
connect in interface Driver
- Throws:
SQLException
acceptsURL
public boolean acceptsURL(String url)
throws SQLException
- Specified by:
acceptsURL in interface Driver
- Throws:
SQLException
getPropertyInfo
public DriverPropertyInfo[] getPropertyInfo(String url,
Properties info)
throws SQLException
- Specified by:
getPropertyInfo in interface Driver
- Throws:
SQLException
getMajorVersion
public int getMajorVersion()
- Specified by:
getMajorVersion in interface Driver
getMinorVersion
public int getMinorVersion()
- Specified by:
getMinorVersion in interface Driver
jdbcCompliant
public boolean jdbcCompliant()
- Specified by:
jdbcCompliant in interface Driver
main
public static void main(String[] args)
Copyright © 2012 KnowledgePlaza. All Rights Reserved.