org.oXML.extras.db
Class JdbcConnector

java.lang.Object
  extended byorg.oXML.extras.db.JdbcConnector
All Implemented Interfaces:
Connector

public class JdbcConnector
extends java.lang.Object
implements Connector

wraps a jdbc Connection this implementation is not thread safe!


Field Summary
 
Fields inherited from interface org.oXML.extras.db.Connector
DEFAULT_NAME
 
Constructor Summary
JdbcConnector(java.lang.String driver, java.lang.String url, java.lang.String user, java.lang.String passwd, java.lang.String log)
           
 
Method Summary
 void close()
           
 void connect()
           
protected  void connect(java.lang.String driver, java.lang.String url, java.lang.String user, java.lang.String password)
           
 void execute(java.lang.String statement)
           
 void execute(java.lang.String statement, Template target, RuntimeContext context)
          execute the statement
 void finalize()
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JdbcConnector

public JdbcConnector(java.lang.String driver,
                     java.lang.String url,
                     java.lang.String user,
                     java.lang.String passwd,
                     java.lang.String log)
              throws DatabaseException
Method Detail

execute

public void execute(java.lang.String statement)
             throws DatabaseException
Specified by:
execute in interface Connector
Throws:
DatabaseException

execute

public void execute(java.lang.String statement,
                    Template target,
                    RuntimeContext context)
             throws ObjectBoxException
Description copied from interface: Connector
execute the statement

Specified by:
execute in interface Connector
Parameters:
statement - the statement to be executed
target - the template of what the result should look like
Throws:
ObjectBoxException

connect

protected void connect(java.lang.String driver,
                       java.lang.String url,
                       java.lang.String user,
                       java.lang.String password)
                throws java.sql.SQLException,
                       java.lang.ClassNotFoundException
Throws:
java.sql.SQLException
java.lang.ClassNotFoundException

connect

public void connect()
             throws DatabaseException
Throws:
DatabaseException

close

public void close()
           throws DatabaseException
Throws:
DatabaseException

finalize

public void finalize()
              throws java.sql.SQLException
Throws:
java.sql.SQLException