org.objectweb.cjdbc.scenario.tools.testlet
Class AbstractVdbTestLet

java.lang.Object
  extended byTestCase
      extended byorg.objectweb.cjdbc.scenario.tools.testlet.AbstractTestLet
          extended byorg.objectweb.cjdbc.scenario.tools.testlet.AbstractVdbTestLet
Direct Known Subclasses:
MacroStatementTestLet, PreparedStatementRecoveryTestLet

public abstract class AbstractVdbTestLet
extends AbstractTestLet

This class defines a AbstractVdbTestLet

Version:
1.0
Author:
Nicolas Modrzyk
See Also:
Serialized Form

Field Summary
protected  VirtualDatabase vdb
           
 
Fields inherited from class org.objectweb.cjdbc.scenario.tools.testlet.AbstractTestLet
COLUMN_NAME, config, FILE_NAME, IGNORE_CASE, ITERATION, LIST_FAILOVER_BACKENDS, MACRO_NAME, NUMBER_OF_UPDATES, PROCEDURE_NAME, SELECTED_COLUMNS, TABLE_METADATA_COLUMNS, TABLE_NAME, UPDATED_COLUMN_VALUE, USE_CJDBC_CLASS, USE_OPTIMIZED_STATEMENT, USE_PREPARED_STATEMENT, USE_TRANSACTIONS, USE_UPDATE_STATEMENT, VIRTUAL_DATABASE
 
Constructor Summary
AbstractVdbTestLet(VirtualDatabase vdb)
          Creates a new AbstractVdbTestLet object
 
Method Summary
 DatabaseBackend getBackend(int index)
          Get a backend object
 java.sql.Connection getBackendConnection(int index)
          Return a connection on the backend of the virtual database at given index
 java.sql.Connection getCJDBCConnection(java.util.Properties props)
          Retrieve a connection on C-JDBC with the given properties
 java.sql.Connection getDatabaseConnection(java.lang.String url)
          Get a sql connection
 
Methods inherited from class org.objectweb.cjdbc.scenario.tools.testlet.AbstractTestLet
checkMemoryUsage, configure, execute, executeBatch, executeBatch, getConfig, getConfigBoolean, getInitialMemoryUsage, getTotalMemoryUsage, getTotalTimeUsage, ignoreCase, set, setConfig, useCJDBCClass, usePreparedStatement, useTransaction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

vdb

protected VirtualDatabase vdb
Constructor Detail

AbstractVdbTestLet

public AbstractVdbTestLet(VirtualDatabase vdb)
Creates a new AbstractVdbTestLet object

Parameters:
vdb - virtual database
Method Detail

getDatabaseConnection

public java.sql.Connection getDatabaseConnection(java.lang.String url)
                                          throws java.sql.SQLException
Get a sql connection

Parameters:
url - of the backend to get a connection from
Returns:
Connection
Throws:
java.sql.SQLException - if fails

getCJDBCConnection

public java.sql.Connection getCJDBCConnection(java.util.Properties props)
                                       throws java.lang.Exception
Retrieve a connection on C-JDBC with the given properties

Parameters:
props - additionnal properties for the connection
Returns:
java.sql.Connection object to C-JDBC
Throws:
java.lang.Exception - if fails

getBackendConnection

public java.sql.Connection getBackendConnection(int index)
                                         throws java.lang.Exception
Return a connection on the backend of the virtual database at given index

Parameters:
index - of the backend in the arraylist of backends of the vdb
Returns:
Connection
Throws:
java.lang.Exception - if fails

getBackend

public DatabaseBackend getBackend(int index)
                           throws java.lang.Exception
Get a backend object

Parameters:
index - of the backend in the array list of backends of the virtual database
Returns:
DatabaseBackend
Throws:
java.lang.Exception - if fails


Copyright © 2002, 2005 - ObjectWeb Consortium - All Rights Reserved.