play.db
类 DBConfig

java.lang.Object
  继承者 play.db.DBConfig

public class DBConfig
extends java.lang.Object


嵌套类摘要
static class DBConfig.PlayConnectionCustomizer
           
static class DBConfig.ProxyDriver
          Needed because DriverManager will not load a driver ouside of the system classloader
 
字段摘要
static java.lang.String defaultDbConfigName
          This is the name of the default db- and jpa-config name
 
构造方法摘要
protected DBConfig(java.lang.String dbConfigName)
           
 
方法摘要
 void close()
          Close the connection opened for the current thread.
protected  boolean configure()
          Detects changes and reconfigures this dbConfig.
 void destroy()
          Tries to destroy the datasource
 boolean execute(java.lang.String SQL)
          Execute an SQL update
 java.sql.ResultSet executeQuery(java.lang.String SQL)
          Execute an SQL query
protected  java.lang.String getConfigInfoString()
          returns empty string if default config.
 java.sql.Connection getConnection()
          Open a connection for the current thread.
 javax.sql.DataSource getDatasource()
           
 java.lang.String getDBConfigName()
           
protected  java.lang.String getStatus()
           
 java.lang.String getUrl()
           
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

defaultDbConfigName

public static final java.lang.String defaultDbConfigName
This is the name of the default db- and jpa-config name

另请参见:
常量字段值
构造方法详细信息

DBConfig

protected DBConfig(java.lang.String dbConfigName)
方法详细信息

getDBConfigName

public java.lang.String getDBConfigName()

close

public void close()
Close the connection opened for the current thread.


getConnection

public java.sql.Connection getConnection()
Open a connection for the current thread.

返回:
A valid SQL connection

execute

public boolean execute(java.lang.String SQL)
Execute an SQL update

参数:
SQL -
返回:
false if update failed

executeQuery

public java.sql.ResultSet executeQuery(java.lang.String SQL)
Execute an SQL query

参数:
SQL -
返回:
The query resultSet

destroy

public void destroy()
Tries to destroy the datasource


configure

protected boolean configure()
Detects changes and reconfigures this dbConfig. Returns true if the database was configured (Config info present. An exception is throwns if the config process fails.


getConfigInfoString

protected java.lang.String getConfigInfoString()
returns empty string if default config. returns descriptive string about config name if not default config


getStatus

protected java.lang.String getStatus()

getDatasource

public javax.sql.DataSource getDatasource()

getUrl

public java.lang.String getUrl()


Guillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly