public abstract class AbstractDataSource extends Object implements CommonDataSource
Modifier | Constructor and Description |
---|---|
protected |
AbstractDataSource()
Constructor
|
Modifier and Type | Method and Description |
---|---|
protected PGConnectionImpl |
createConnection(String u,
String p)
Create a connection
|
protected abstract Reference |
createReference()
Create a reference using the correct ObjectFactory instance
|
String |
getApplicationName()
Get the application name
|
String |
getClientEncoding()
Get the client encoding
|
String |
getDatabase()
Get the database
|
String |
getHost()
Get the host
|
boolean |
getHousekeeper()
Get the housekeeper
|
int |
getLoginTimeout() |
PrintWriter |
getLogWriter() |
int |
getNetworkTimeout()
Get the network timeout in milliseconds
|
Logger |
getParentLogger() |
int |
getParsedSqlCacheSize()
Get the size of the parsed SQL cache.
|
String |
getPassword()
Get the password
|
int |
getPort()
Get the port
|
int |
getPreparedStatementCacheSize()
Get the size of the prepared statement cache
|
Reference |
getReference() |
boolean |
getStrictMode()
Get the strict mode
|
String |
getUser()
Get the user
|
void |
init(Reference reference)
Init
|
void |
setApplicationName(String v)
Set the application name
|
void |
setClientEncoding(String v)
Set the client encoding
|
void |
setDatabase(String v)
Set the database
|
void |
setHost(String v)
Set the host
|
void |
setHousekeeper(boolean v)
Set the housekeeper
|
void |
setLoginTimeout(int seconds) |
void |
setLogWriter(PrintWriter out) |
void |
setNetworkTimeout(int networkTimeout)
Set the network timeout in milliseconds
|
void |
setParsedSqlCacheSize(int cacheSize)
Set the size of the parsed SQL cache.
|
void |
setPassword(String v)
Set the password
|
void |
setPort(int v)
Set the port
|
void |
setPreparedStatementCacheSize(int preparedStatementCacheSize)
Set the size of the preapred statement cache
|
void |
setStrictMode(boolean v)
Set the strict mode
|
void |
setUser(String v)
Set the user
|
public int getLoginTimeout() throws SQLException
getLoginTimeout
in interface CommonDataSource
SQLException
public void setLoginTimeout(int seconds) throws SQLException
setLoginTimeout
in interface CommonDataSource
SQLException
public PrintWriter getLogWriter() throws SQLException
getLogWriter
in interface CommonDataSource
SQLException
public void setLogWriter(PrintWriter out) throws SQLException
setLogWriter
in interface CommonDataSource
SQLException
public Logger getParentLogger() throws SQLFeatureNotSupportedException
getParentLogger
in interface CommonDataSource
SQLFeatureNotSupportedException
protected abstract Reference createReference()
public Reference getReference() throws NamingException
NamingException
public void init(Reference reference)
reference
- The referencepublic String getHost()
public void setHost(String v)
v
- The valuepublic int getPort()
public void setPort(int v)
v
- The valuepublic String getDatabase()
public void setDatabase(String v)
v
- The valuepublic String getUser()
public void setUser(String v)
v
- The valuepublic String getPassword()
public void setPassword(String v)
v
- The valuepublic boolean getHousekeeper()
public void setHousekeeper(boolean v)
v
- The valuepublic int getParsedSqlCacheSize()
public void setParsedSqlCacheSize(int cacheSize)
cacheSize
- the number of SQL statements' parsed structures to cachepublic int getPreparedStatementCacheSize()
public void setPreparedStatementCacheSize(int preparedStatementCacheSize)
preparedStatementCacheSize
- the maximum number of PreparedStatements cached per connectionpublic String getApplicationName()
public void setApplicationName(String v)
v
- The valuepublic String getClientEncoding()
public void setClientEncoding(String v)
v
- The valuepublic void setNetworkTimeout(int networkTimeout)
networkTimeout
- The valuepublic int getNetworkTimeout()
public boolean getStrictMode()
public void setStrictMode(boolean v)
v
- The valueprotected PGConnectionImpl createConnection(String u, String p) throws SQLException
u
- The user namep
- The passwordSQLException
- Thrown in case of an errorCopyright © 2013-2015 impossibl.com. All Rights Reserved.