org.postgresql.ds
Class PGSimpleDataSource

java.lang.Object
  extended by org.postgresql.ds.common.BaseDataSource
      extended by org.postgresql.ds.PGSimpleDataSource
All Implemented Interfaces:
Serializable, Wrapper, Referenceable, CommonDataSource, DataSource
Direct Known Subclasses:
Jdbc3SimpleDataSource, SimpleDataSource

public class PGSimpleDataSource
extends BaseDataSource
implements DataSource, Serializable

Simple DataSource which does not perform connection pooling. In order to use the DataSource, you must set the property databaseName. The settings for serverName, portNumber, user, and password are optional. Note: these properties are declared in the superclass.

Author:
Aaron Mulder ([email protected])
See Also:
Serialized Form

Constructor Summary
PGSimpleDataSource()
           
 
Method Summary
 String getDescription()
          Gets a description of this DataSource.
 Logger getParentLogger()
           
 boolean isWrapperFor(Class<?> iface)
           
<T> T
unwrap(Class<T> iface)
           
 
Methods inherited from class org.postgresql.ds.common.BaseDataSource
createReference, getAllowEncodingChanges, getApplicationName, getAssumeMinServerVersion, getAutosave, getBinaryTransfer, getBinaryTransferDisable, getBinaryTransferEnable, getCancelSignalTimeout, getCharset, getCompatible, getConnection, getConnection, getConnectTimeout, getCurrentSchema, getDatabaseMetadataCacheFields, getDatabaseMetadataCacheFieldsMiB, getDatabaseName, getDefaultRowFetchSize, getDisableColumnSanitiser, getGssLib, getHostRecheckSeconds, getJaasApplicationName, getKerberosServerName, getLoadBalanceHosts, getLoginTimeout, getLoglevel, getLogLevel, getLogUnclosedConnections, getLogWriter, getPassword, getPortNumber, getPreferQueryMode, getPreparedStatementCacheQueries, getPreparedStatementCacheSizeMiB, getPrepareThreshold, getProperty, getProperty, getProtocolVersion, getReadOnly, getReceiveBufferSize, getReference, getReWriteBatchedInserts, getSendBufferSize, getServerName, getSocketFactory, getSocketFactoryArg, getSocketTimeout, getSsl, getSslCert, getSslfactory, getSslFactoryArg, getSslHostnameVerifier, getSslKey, getSslMode, getSslPassword, getSslPasswordCallback, getSslRootCert, getSspiServiceClass, getStringType, getTargetServerType, getTcpKeepAlive, getUnknownLength, getUrl, getUser, getUseSpNego, initializeFrom, isColumnSanitiserDisabled, readBaseObject, setAllowEncodingChanges, setApplicationName, setAssumeMinServerVersion, setAutosave, setBinaryTransfer, setBinaryTransferDisable, setBinaryTransferEnable, setCancelSignalTimeout, setCharset, setCompatible, setConnectTimeout, setCurrentSchema, setDatabaseMetadataCacheFields, setDatabaseMetadataCacheFieldsMiB, setDatabaseName, setDefaultRowFetchSize, setDisableColumnSanitiser, setFromReference, setGssLib, setHostRecheckSeconds, setJaasApplicationName, setKerberosServerName, setLoadBalanceHosts, setLoginTimeout, setLoglevel, setLogLevel, setLogUnclosedConnections, setLogWriter, setPassword, setPortNumber, setPreferQueryMode, setPreparedStatementCacheQueries, setPreparedStatementCacheSizeMiB, setPrepareThreshold, setProperty, setProperty, setProtocolVersion, setReadOnly, setReceiveBufferSize, setReWriteBatchedInserts, setSendBufferSize, setServerName, setSocketFactory, setSocketFactoryArg, setSocketTimeout, setSsl, setSslCert, setSslfactory, setSslFactoryArg, setSslHostnameVerifier, setSslKey, setSslMode, setSslPassword, setSslPasswordCallback, setSslRootCert, setSspiServiceClass, setStringType, setTargetServerType, setTcpKeepAlive, setUnknownLength, setUrl, setUser, setUseSpNego, writeBaseObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.sql.DataSource
getConnection, getConnection
 
Methods inherited from interface javax.sql.CommonDataSource
getLoginTimeout, getLogWriter, setLoginTimeout, setLogWriter
 

Constructor Detail

PGSimpleDataSource

public PGSimpleDataSource()
Method Detail

getDescription

public String getDescription()
Gets a description of this DataSource.

Specified by:
getDescription in class BaseDataSource
Returns:
description of this DataSource-ish thing

isWrapperFor

public boolean isWrapperFor(Class<?> iface)
                     throws SQLException
Specified by:
isWrapperFor in interface Wrapper
Throws:
SQLException

unwrap

public <T> T unwrap(Class<T> iface)
         throws SQLException
Specified by:
unwrap in interface Wrapper
Throws:
SQLException

getParentLogger

public Logger getParentLogger()
                       throws SQLFeatureNotSupportedException
Throws:
SQLFeatureNotSupportedException


Copyright © 2016 PostgreSQL Global Development Group. All rights reserved.