| |
|
| java.lang.Object net.myvietnam.mvncore.db.DBUtils
DBUtils | final public class DBUtils (Code) | | A database utility class to handle all the database stuffs
in the MyVietnam framework
|
DATABASE_ACCESS | final public static int DATABASE_ACCESS(Code) | | |
DATABASE_DB2 | final public static int DATABASE_DB2(Code) | | |
DATABASE_DERBY | final public static int DATABASE_DERBY(Code) | | |
DATABASE_FIREBIRD | final public static int DATABASE_FIREBIRD(Code) | | |
DATABASE_GENERAL | final public static int DATABASE_GENERAL(Code) | | |
DATABASE_HSQLDB | final public static int DATABASE_HSQLDB(Code) | | |
DATABASE_IMFORMIX | final public static int DATABASE_IMFORMIX(Code) | | |
DATABASE_INTERBASE | final public static int DATABASE_INTERBASE(Code) | | |
DATABASE_MYSQL | final public static int DATABASE_MYSQL(Code) | | |
DATABASE_NOSCROLL | final public static int DATABASE_NOSCROLL(Code) | | |
DATABASE_ORACLE | final public static int DATABASE_ORACLE(Code) | | |
DATABASE_POSTGRESQL | final public static int DATABASE_POSTGRESQL(Code) | | |
DATABASE_SAPDB | final public static int DATABASE_SAPDB(Code) | | |
DATABASE_SQLSERVER | final public static int DATABASE_SQLSERVER(Code) | | |
DATABASE_SYBASE | final public static int DATABASE_SYBASE(Code) | | |
DATABASE_UNKNOWN | final public static int DATABASE_UNKNOWN(Code) | | |
MAX_FETCH_SIZE | final public static int MAX_FETCH_SIZE(Code) | | |
closeAllConnections | public static boolean closeAllConnections()(Code) | | Close all the connections that currently in the pool
This method could be used to refresh the database connection
true if the pool is empty and balancefalse if the pool has returned some connection to outside |
closeConnection | public static void closeConnection(Connection connection)(Code) | | 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
Parameters: connection - : the connection that needs to be returned to the pool |
closeResultSet | public static void closeResultSet(ResultSet rs)(Code) | | Use this method to close the ResultSet
Parameters: rs - : the resultset that needs to be closed |
closeStatement | public static void closeStatement(Statement statement)(Code) | | Use this method to close the Statement
Parameters: statement - : the statement that needs to be closed |
getConnection | public static Connection getConnection() throws SQLException(Code) | | Get a connection from the connection pool. The returned connection
must be closed by calling DBUtils.closeConnection()
: a new connection from the pool if succeed throws: SQLException - : if cannot get a connection from the pool |
getDatabaseType | public static int getDatabaseType()(Code) | | Use this method to get the database type. This method will automatically
detect the database type. You could override this value by modifying
the value in mvncore_db_DBOptions.properties
: the database type |
getDatabaseTypeName | public static String getDatabaseTypeName(int databaseType)(Code) | | |
isCaseSensitiveDatebase | public static boolean isCaseSensitiveDatebase()(Code) | | |
resetStatement | public static void resetStatement(Statement statement)(Code) | | Use this method to reset the MaxRows and FetchSize of the Statement
to the default values
Parameters: statement - : the statement that needs to be reseted |
|
|
|