org.oXML.extras.db
Class ConnectorProxy

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

public class ConnectorProxy
extends java.lang.Object
implements Connector

DataConnection proxy that will retry any query (default max 3 times) if it throws an exception.


Field Summary
 
Fields inherited from interface org.oXML.extras.db.Connector
DEFAULT_NAME
 
Constructor Summary
ConnectorProxy(org.tagbox.util.Pool pool)
          create a new ConnectorProxy using a specific DataConnection pool
ConnectorProxy(org.tagbox.util.Pool pool, int retry)
           
 
Method Summary
 boolean autoCommit()
           
 void autoCommit(boolean auto)
           
 void commit()
           
 void execute(java.lang.String query)
           
protected  void execute(java.lang.String query, int retries)
           
 void execute(java.lang.String query, Template target, RuntimeContext context)
          execute the statement
protected  void execute(java.lang.String query, Template target, RuntimeContext context, int retries)
           
 void rollback()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectorProxy

public ConnectorProxy(org.tagbox.util.Pool pool)
create a new ConnectorProxy using a specific DataConnection pool


ConnectorProxy

public ConnectorProxy(org.tagbox.util.Pool pool,
                      int retry)
Method Detail

execute

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

execute

protected void execute(java.lang.String query,
                       int retries)
                throws DatabaseException
Throws:
DatabaseException

execute

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

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

execute

protected void execute(java.lang.String query,
                       Template target,
                       RuntimeContext context,
                       int retries)
                throws ObjectBoxException
Throws:
ObjectBoxException

autoCommit

public boolean autoCommit()
                   throws DatabaseException
Throws:
DatabaseException

autoCommit

public void autoCommit(boolean auto)
                throws DatabaseException
Throws:
DatabaseException

commit

public void commit()
            throws DatabaseException
Throws:
DatabaseException

rollback

public void rollback()
              throws DatabaseException
Throws:
DatabaseException