org.teiid.test.framework.connection
Class ConnectionStrategy

java.lang.Object
  extended by org.teiid.test.framework.connection.ConnectionStrategy
Direct Known Subclasses:
DataSourceConnection, DriverConnection, JEEConnection

public abstract class ConnectionStrategy
extends java.lang.Object


Constructor Summary
ConnectionStrategy(java.util.Properties props)
           
 
Method Summary
 javax.sql.XAConnection createDataSourceConnection(java.lang.String identifier)
           
 java.sql.Connection createDriverConnection(java.lang.String identifier)
           
 java.sql.Connection getAdminConnection()
           
 boolean getAutocommit()
           
abstract  java.sql.Connection getConnection()
          Returns a connection
 java.util.Properties getEnvironment()
           
 javax.sql.XAConnection getXAConnection()
           
 boolean isDataStoreDisabled()
          In certain testcases, the data that being provided is already preconfigured and should not be touched by the DataStore processing.
 void setEnvironmentProperty(java.lang.String key, java.lang.String value)
           
 void shutdown()
           
 boolean useProxy()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectionStrategy

public ConnectionStrategy(java.util.Properties props)
Method Detail

getConnection

public abstract java.sql.Connection getConnection()
                                           throws QueryTestFailedException
Returns a connection

Returns:
Connection
Throws:
QueryTestFailedException

useProxy

public boolean useProxy()

shutdown

public void shutdown()
Since:

getAdminConnection

public java.sql.Connection getAdminConnection()
                                       throws QueryTestFailedException
Throws:
QueryTestFailedException

getAutocommit

public boolean getAutocommit()

getXAConnection

public javax.sql.XAConnection getXAConnection()
                                       throws QueryTestFailedException
Throws:
QueryTestFailedException

isDataStoreDisabled

public boolean isDataStoreDisabled()
In certain testcases, the data that being provided is already preconfigured and should not be touched by the DataStore processing.

Returns:

getEnvironment

public java.util.Properties getEnvironment()

setEnvironmentProperty

public void setEnvironmentProperty(java.lang.String key,
                                   java.lang.String value)

createDriverConnection

public java.sql.Connection createDriverConnection(java.lang.String identifier)
                                           throws QueryTestFailedException
Throws:
QueryTestFailedException

createDataSourceConnection

public javax.sql.XAConnection createDataSourceConnection(java.lang.String identifier)
                                                  throws QueryTestFailedException
Throws:
QueryTestFailedException


Copyright © 2010. All Rights Reserved.