|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造函数 | 方法 | 详细信息: 字段 | 构造函数 | 方法 | |||||||||
java.lang.Objecttot.db.DBUtils
public final class DBUtils
| 字段摘要 | |
|---|---|
static int |
DATABASE_ACCESS
|
static int |
DATABASE_DB2
|
static int |
DATABASE_FIREBIRD
|
static int |
DATABASE_GENERAL
|
static int |
DATABASE_HSQLDB
|
static int |
DATABASE_IMFORMIX
|
static int |
DATABASE_INTERBASE
|
static int |
DATABASE_MYSQL
|
static int |
DATABASE_NOSCROLL
|
static int |
DATABASE_ORACLE
|
static int |
DATABASE_POSTGRESQL
|
static int |
DATABASE_SAPDB
|
static int |
DATABASE_SQLSERVER
|
static int |
DATABASE_SYBASE
|
static int |
DATABASE_UNKNOWN
|
| 方法摘要 | |
|---|---|
static boolean |
closeAllConnections()
Close all the connections that currently in the pool This method could be used to refresh the database connection |
static void |
closeConnection(java.sql.Connection connection)
Use this method to return the connection to the connection pool Do not use this method to close connection that is not from the connection pool |
static void |
closePrepareStatement(java.sql.PreparedStatement ps)
Use this method to close the PrepareStatement |
static void |
closeResultSet(java.sql.ResultSet rs)
Use this method to close the ResultSet |
static void |
closeStatement(java.sql.Statement statement)
Use this method to close the Statement |
static java.sql.Connection |
getConnection()
Get a connection from the connection pool. |
static int |
getDatabaseType()
Use this method to get the database type. |
static java.lang.String |
getDatabaseTypeName(int databaseType)
|
static void |
resetStatement(java.sql.Statement statement)
Use this method to reset the MaxRows and FetchSize of the Statement to the default values |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 字段详细信息 |
|---|
public static final int DATABASE_UNKNOWN
public static final int DATABASE_GENERAL
public static final int DATABASE_NOSCROLL
public static final int DATABASE_ORACLE
public static final int DATABASE_SQLSERVER
public static final int DATABASE_DB2
public static final int DATABASE_SYBASE
public static final int DATABASE_IMFORMIX
public static final int DATABASE_MYSQL
public static final int DATABASE_POSTGRESQL
public static final int DATABASE_HSQLDB
public static final int DATABASE_ACCESS
public static final int DATABASE_SAPDB
public static final int DATABASE_INTERBASE
public static final int DATABASE_FIREBIRD
| 方法详细信息 |
|---|
public static int getDatabaseType()
public static java.lang.String getDatabaseTypeName(int databaseType)
public static java.sql.Connection getConnection()
throws java.sql.SQLException
java.sql.SQLException - : if cannot get a connection from the poolpublic static boolean closeAllConnections()
public static void closeConnection(java.sql.Connection connection)
connection - : the connection that needs to be returned to the poolpublic static void resetStatement(java.sql.Statement statement)
statement - : the statement that needs to be resetedpublic static void closeStatement(java.sql.Statement statement)
statement - : the statement that needs to be closedpublic static void closePrepareStatement(java.sql.PreparedStatement ps)
ps - : the statement that needs to be closedpublic static void closeResultSet(java.sql.ResultSet rs)
rs - : the resultset that needs to be closed
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造函数 | 方法 | 详细信息: 字段 | 构造函数 | 方法 | |||||||||