public class DatabaseUtils
extends java.lang.Object
限定符 | 构造器和说明 |
---|---|
private |
DatabaseUtils() |
限定符和类型 | 方法和说明 |
---|---|
static java.sql.Connection |
getConnection(java.lang.String databaseConfigFile) |
static java.sql.Connection |
getConnection(java.lang.String driverClassName,
java.lang.String url,
java.lang.String userName,
java.lang.String password) |
static java.lang.String |
getPassword(java.util.Properties properties) |
public static java.sql.Connection getConnection(java.lang.String databaseConfigFile) throws java.sql.SQLException, java.io.IOException, java.lang.ClassNotFoundException
databaseConfigFile
- java.sql.SQLException
java.io.IOException
java.lang.ClassNotFoundException
public static java.lang.String getPassword(java.util.Properties properties)
public static java.sql.Connection getConnection(java.lang.String driverClassName, java.lang.String url, java.lang.String userName, java.lang.String password) throws java.lang.ClassNotFoundException, java.sql.SQLException
driverClassName
- url
- userName
- password
- java.lang.ClassNotFoundException
java.sql.SQLException