public class Config extends Object
Config class.
| 构造器和说明 |
|---|
Config(String name,
DataSource dataSource)
Constructor for Config.
|
Config(String name,
DataSource dataSource,
Dialect dialect)
Constructor for Config.
|
Config(String name,
DataSource dataSource,
Dialect dialect,
boolean showSql,
boolean devMode,
int transactionLevel,
IContainerFactory containerFactory,
ICache cache)
Constructor for Config.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close(Connection conn)
close.
|
void |
close(ResultSet rs,
Statement st,
Connection conn)
close.
|
void |
close(Statement st,
Connection conn)
close.
|
ICache |
getCache()
Getter for the field
cache. |
Connection |
getConnection()
getConnection.
|
IContainerFactory |
getContainerFactory()
Getter for the field
containerFactory. |
DataSource |
getDataSource()
Getter for the field
dataSource. |
IDbProFactory |
getDbProFactory()
Getter for the field
dbProFactory. |
Dialect |
getDialect()
Getter for the field
dialect. |
String |
getName()
Getter for the field
name. |
SqlKit |
getSqlKit()
Getter for the field
sqlKit. |
Connection |
getThreadLocalConnection()
getThreadLocalConnection.
|
int |
getTransactionLevel()
Getter for the field
transactionLevel. |
boolean |
isDevMode()
isDevMode.
|
boolean |
isInTransaction()
isInTransaction.
|
boolean |
isShowSql()
isShowSql.
|
void |
removeThreadLocalConnection()
removeThreadLocalConnection.
|
void |
setThreadLocalConnection(Connection connection)
setThreadLocalConnection.
|
public Config(String name, DataSource dataSource, Dialect dialect, boolean showSql, boolean devMode, int transactionLevel, IContainerFactory containerFactory, ICache cache)
Constructor for Config.
name - a String object.dataSource - a DataSource object.dialect - a Dialect object.showSql - a boolean.devMode - a boolean.transactionLevel - a int.containerFactory - a IContainerFactory object.cache - a ICache object.public Config(String name, DataSource dataSource)
Constructor for Config.
name - a String object.dataSource - a DataSource object.public Config(String name, DataSource dataSource, Dialect dialect)
Constructor for Config.
name - a String object.dataSource - a DataSource object.dialect - a Dialect object.public int getTransactionLevel()
Getter for the field transactionLevel.
public DataSource getDataSource()
Getter for the field dataSource.
DataSource object.public IContainerFactory getContainerFactory()
Getter for the field containerFactory.
IContainerFactory object.public IDbProFactory getDbProFactory()
Getter for the field dbProFactory.
IDbProFactory object.public boolean isShowSql()
isShowSql.
public boolean isDevMode()
isDevMode.
public void setThreadLocalConnection(Connection connection)
setThreadLocalConnection.
connection - a Connection object.public void removeThreadLocalConnection()
removeThreadLocalConnection.
public Connection getConnection() throws SQLException
getConnection.
Connection object.SQLException - if any.public Connection getThreadLocalConnection()
getThreadLocalConnection.
Connection object.public boolean isInTransaction()
isInTransaction.
public void close(ResultSet rs, Statement st, Connection conn)
close.
rs - a ResultSet object.st - a Statement object.conn - a Connection object.public void close(Statement st, Connection conn)
close.
st - a Statement object.conn - a Connection object.public void close(Connection conn)
close.
conn - a Connection object.Copyright © 2023. All rights reserved.