org.apache.ibatis.datasource.unpooled
Class UnpooledDataSource

java.lang.Object
  extended by org.apache.ibatis.datasource.unpooled.UnpooledDataSource
All Implemented Interfaces:
Wrapper, CommonDataSource, DataSource

public class UnpooledDataSource
extends Object
implements DataSource


Constructor Summary
UnpooledDataSource()
           
UnpooledDataSource(ClassLoader driverClassLoader, String driver, String url, Properties driverProperties)
           
UnpooledDataSource(ClassLoader driverClassLoader, String driver, String url, String username, String password)
           
UnpooledDataSource(String driver, String url, Properties driverProperties)
           
UnpooledDataSource(String driver, String url, String username, String password)
           
 
Method Summary
 Connection getConnection()
           
 Connection getConnection(String username, String password)
           
 Integer getDefaultTransactionIsolationLevel()
           
 String getDriver()
           
 ClassLoader getDriverClassLoader()
           
 Properties getDriverProperties()
           
 int getLoginTimeout()
           
 PrintWriter getLogWriter()
           
 Logger getParentLogger()
           
 String getPassword()
           
 String getUrl()
           
 String getUsername()
           
 boolean isAutoCommit()
           
 boolean isWrapperFor(Class<?> iface)
           
 void setAutoCommit(boolean autoCommit)
           
 void setDefaultTransactionIsolationLevel(Integer defaultTransactionIsolationLevel)
           
 void setDriver(String driver)
           
 void setDriverClassLoader(ClassLoader driverClassLoader)
           
 void setDriverProperties(Properties driverProperties)
           
 void setLoginTimeout(int loginTimeout)
           
 void setLogWriter(PrintWriter logWriter)
           
 void setPassword(String password)
           
 void setUrl(String url)
           
 void setUsername(String username)
           
<T> T
unwrap(Class<T> iface)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnpooledDataSource

public UnpooledDataSource()

UnpooledDataSource

public UnpooledDataSource(String driver,
                          String url,
                          String username,
                          String password)

UnpooledDataSource

public UnpooledDataSource(String driver,
                          String url,
                          Properties driverProperties)

UnpooledDataSource

public UnpooledDataSource(ClassLoader driverClassLoader,
                          String driver,
                          String url,
                          String username,
                          String password)

UnpooledDataSource

public UnpooledDataSource(ClassLoader driverClassLoader,
                          String driver,
                          String url,
                          Properties driverProperties)
Method Detail

getConnection

public Connection getConnection()
                         throws SQLException
Specified by:
getConnection in interface DataSource
Throws:
SQLException

getConnection

public Connection getConnection(String username,
                                String password)
                         throws SQLException
Specified by:
getConnection in interface DataSource
Throws:
SQLException

setLoginTimeout

public void setLoginTimeout(int loginTimeout)
                     throws SQLException
Specified by:
setLoginTimeout in interface CommonDataSource
Throws:
SQLException

getLoginTimeout

public int getLoginTimeout()
                    throws SQLException
Specified by:
getLoginTimeout in interface CommonDataSource
Throws:
SQLException

setLogWriter

public void setLogWriter(PrintWriter logWriter)
                  throws SQLException
Specified by:
setLogWriter in interface CommonDataSource
Throws:
SQLException

getLogWriter

public PrintWriter getLogWriter()
                         throws SQLException
Specified by:
getLogWriter in interface CommonDataSource
Throws:
SQLException

getDriverClassLoader

public ClassLoader getDriverClassLoader()

setDriverClassLoader

public void setDriverClassLoader(ClassLoader driverClassLoader)

getDriverProperties

public Properties getDriverProperties()

setDriverProperties

public void setDriverProperties(Properties driverProperties)

getDriver

public String getDriver()

setDriver

public void setDriver(String driver)

getUrl

public String getUrl()

setUrl

public void setUrl(String url)

getUsername

public String getUsername()

setUsername

public void setUsername(String username)

getPassword

public String getPassword()

setPassword

public void setPassword(String password)

isAutoCommit

public boolean isAutoCommit()

setAutoCommit

public void setAutoCommit(boolean autoCommit)

getDefaultTransactionIsolationLevel

public Integer getDefaultTransactionIsolationLevel()

setDefaultTransactionIsolationLevel

public void setDefaultTransactionIsolationLevel(Integer defaultTransactionIsolationLevel)

unwrap

public <T> T unwrap(Class<T> iface)
         throws SQLException
Specified by:
unwrap in interface Wrapper
Throws:
SQLException

isWrapperFor

public boolean isWrapperFor(Class<?> iface)
                     throws SQLException
Specified by:
isWrapperFor in interface Wrapper
Throws:
SQLException

getParentLogger

public Logger getParentLogger()


Copyright © 2010-2012 MyBatis.org. All Rights Reserved.