public class JDBCDatabaseConnection extends AbstractDatabaseConnection
UrlDriver.UrlDriverInstance
IGNORE, XML_MAP_TAG, XML_TAG
构造器和说明 |
---|
JDBCDatabaseConnection() |
JDBCDatabaseConnection(java.lang.String driver,
java.lang.String url,
java.lang.String user,
java.lang.String password) |
限定符和类型 | 方法和说明 |
---|---|
java.lang.Object |
clone()
Clone.
|
java.sql.Connection |
createConnection()
创建连接
|
boolean |
equals(java.lang.Object obj)
Equals.
|
java.lang.String |
feature()
判断当前连接是否为同一个数据库的依据.
|
Authentication |
getAuthentication() |
java.lang.String |
getDatabase() |
DBCPConnectionPoolAttr |
getDbcpAttr() |
java.lang.String |
getDriver()
驱动地址
|
java.lang.String |
getPassword() |
PoolInfo |
getPoolInfo() |
java.lang.String |
getSchema() |
java.lang.String |
getURL() |
java.lang.String |
getUser() |
int |
hashCode()
hash编码
|
boolean |
hasSchema() |
boolean |
isEncryptPassword()
是否密码加密
|
void |
readXML(XMLableReader reader)
读取子节点,应该会被XMLableReader.readXMLObject()调用多次
|
void |
setAuthentication(Authentication authentication) |
void |
setDatabase(java.lang.String database) |
void |
setDbcpAttr(DBCPConnectionPoolAttr dbcpAttr) |
void |
setDriver(java.lang.String driver) |
void |
setEncryptPassword(boolean encryptPassword)
Sets whether to encrypt password.
|
void |
setPassword(java.lang.String password) |
void |
setSchema(java.lang.String schema) |
void |
setURL(java.lang.String url) |
void |
setUser(java.lang.String user) |
void |
testConnection()
测试连接
|
JSONObject |
toJSONObject() |
java.lang.String |
toString()
字符串
|
void |
writeXML(XMLPrintWriter writer)
Write XML.
|
addConnection, connectMessage, getNewCharsetName, getOriginalCharsetName, setNewCharsetName, setOriginalCharsetName, summary
copy, getId, getNameSpace, setId, setNameSpace
getClassInfo, getData, invalidate, isLoad, setClassInfo, setData
public JDBCDatabaseConnection()
public JDBCDatabaseConnection(java.lang.String driver, java.lang.String url, java.lang.String user, java.lang.String password)
public java.lang.String getUser()
public void setUser(java.lang.String user)
public java.lang.String getPassword()
public void setPassword(java.lang.String password)
public Authentication getAuthentication()
public void setAuthentication(Authentication authentication)
public java.lang.String getDatabase()
public void setDatabase(java.lang.String database)
public java.lang.String getSchema()
public void setSchema(java.lang.String schema)
public java.lang.String getDriver()
UrlDriver
public void setDriver(java.lang.String driver)
public java.lang.String getURL()
public void setURL(java.lang.String url)
public boolean isEncryptPassword()
public void setEncryptPassword(boolean encryptPassword)
public DBCPConnectionPoolAttr getDbcpAttr()
public void setDbcpAttr(DBCPConnectionPoolAttr dbcpAttr)
public void testConnection() throws java.lang.Exception
java.lang.Exception
- 异常public java.sql.Connection createConnection() throws java.lang.Exception
createConnection
在接口中 Connection
createConnection
在类中 AbstractDatabaseConnection
java.lang.Exception
- 异常public java.lang.String feature()
Connection
feature
在接口中 Connection
feature
在类中 AbstractDatabaseConnection
public JSONObject toJSONObject() throws JSONException
toJSONObject
在接口中 Connection
toJSONObject
在类中 AbstractDatabaseConnection
JSONException
public boolean hasSchema()
hasSchema
在接口中 Connection
hasSchema
在类中 AbstractDatabaseConnection
public boolean equals(java.lang.Object obj)
equals
在接口中 Connection
equals
在类中 AbstractDatabaseConnection
public PoolInfo getPoolInfo() throws JSONException
JSONException
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
AbstractDatabaseConnection
clone
在接口中 FCloneable
clone
在类中 AbstractDatabaseConnection
java.lang.CloneNotSupportedException
- 如果克隆失败则抛出此异常public int hashCode()
hashCode
在类中 java.lang.Object
public java.lang.String toString()
toString
在类中 java.lang.Object
public void readXML(XMLableReader reader)
XMLReadable
readXML
在接口中 XMLReadable
readXML
在类中 AbstractDatabaseConnection
reader
- XML读取对象XMLableReader
public void writeXML(XMLPrintWriter writer)
writeXML
在接口中 XMLWriter
writeXML
在类中 AbstractDatabaseConnection
writer
- the PrintWriter.