Top Description Constructors Methods
org.postgresql.ds

public Class PGSimpleDataSource

extends BaseDataSource
implements DataSource, Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable, javax.sql.DataSource, java.sql.Wrapper, javax.sql.CommonDataSource
Known Direct Subclasses
org.postgresql.jdbc2.optional.SimpleDataSource, org.postgresql.jdbc3.Jdbc3SimpleDataSource
Imports
org.postgresql.ds.common.BaseDataSource, org.postgresql.util.DriverInfo, java.io.IOException, .ObjectInputStream, .ObjectOutputStream, .Serializable, java.sql.SQLException, javax.sql.DataSource

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])

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
getDescription()

Implements abstract org.postgresql.ds.common.BaseDataSource.getDescription.

Gets a description of this DataSource.

public boolean
isWrapperFor(Class<?>
a Class defining an interface.
iface
)

Implements java.sql.Wrapper.isWrapperFor.

Returns true if this either implements the interface argument or is directly or indirectly a wrapper for an object that does.

private void
public <T> T
unwrap(Class<T>
A Class defining an interface that the result must implement.
iface
)

Implements java.sql.Wrapper.unwrap.

Returns an object that implements the given interface to allow access to non-standard methods, or standard methods not exposed by the proxy.

private void
Inherited from org.postgresql.ds.common.BaseDataSource:
createReferencegetAdaptiveFetchgetAdaptiveFetchMaximumgetAdaptiveFetchMinimumgetAllowEncodingChangesgetApplicationNamegetAssumeMinServerVersiongetAuthenticationPluginClassNamegetAutosavegetBinaryTransfergetBinaryTransferDisablegetBinaryTransferEnablegetCancelSignalTimeoutgetCleanupSavepointsgetConnectiongetConnectiongetConnectTimeoutgetCurrentSchemagetDatabaseMetadataCacheFieldsgetDatabaseMetadataCacheFieldsMiBgetDatabaseNamegetDefaultRowFetchSizegetDisableColumnSanitisergetEscapeSyntaxCallModegetGroupStartupParametersgetGssEncModegetGssLibgetGssResponseTimeoutgetHideUnprivilegedObjectsgetHostRecheckSecondsgetJaasApplicationNamegetJaasLogingetKerberosServerNamegetLoadBalanceHostsgetLocalSocketAddressgetLoggerFilegetLoggerLevelgetLoginTimeoutgetLogServerErrorDetailgetLogUnclosedConnectionsgetLogWritergetMaxResultBuffergetOptionsgetParentLoggergetPasswordgetPortNumbergetPortNumbersgetPreferQueryModegetPreparedStatementCacheQueriesgetPreparedStatementCacheSizeMiBgetPrepareThresholdgetPropertygetPropertygetProtocolVersiongetQuoteReturningIdentifiersgetReadOnlygetReadOnlyModegetReceiveBufferSizegetRecvBufferSizegetReferencegetReplicationgetReWriteBatchedInsertsgetSendBufferSizegetServerNamegetServerNamesgetSocketFactorygetSocketFactoryArggetSocketTimeoutgetSslgetSslCertgetSslcertgetSslfactorygetSslFactoryArggetSslfactoryarggetSslHostnameVerifiergetSslhostnameverifiergetSslKeygetSslkeygetSslModegetSslmodegetSslPasswordgetSslpasswordgetSslPasswordCallbackgetSslpasswordcallbackgetSslResponseTimeoutgetSslRootCertgetSslrootcertgetSspiServiceClassgetStringTypegetTargetServerTypegetTcpKeepAlivegetTcpNoDelaygetUnknownLengthgetUrlgetURLgetUsergetUseSpNegogetXmlFactoryFactoryinitializeFromisAllowEncodingChangesisCleanupSavePointsisColumnSanitiserDisabledisDisableColumnSanitiserisLoadBalanceHostsisLogUnclosedConnectionsisReadOnlyisReWriteBatchedInsertsisSslisTcpKeepAlivereadBaseObjectsetAdaptiveFetchsetAdaptiveFetchMaximumsetAdaptiveFetchMinimumsetAllowEncodingChangessetApplicationNamesetAssumeMinServerVersionsetAuthenticationPluginClassNamesetAutosavesetBinaryTransfersetBinaryTransferDisablesetBinaryTransferEnablesetCancelSignalTimeoutsetCleanupSavepointssetCleanupSavePointssetConnectTimeoutsetCurrentSchemasetDatabaseMetadataCacheFieldssetDatabaseMetadataCacheFieldsMiBsetDatabaseNamesetDefaultRowFetchSizesetDisableColumnSanitisersetEscapeSyntaxCallModesetFromReferencesetGroupStartupParameterssetGssEncModesetGssLibsetGssResponseTimeoutsetHideUnprivilegedObjectssetHostRecheckSecondssetJaasApplicationNamesetJaasLoginsetKerberosServerNamesetLoadBalanceHostssetLocalSocketAddresssetLoggerFilesetLoggerLevelsetLoginTimeoutsetLogServerErrorDetailsetLogUnclosedConnectionssetLogWritersetMaxResultBuffersetOptionssetPasswordsetPortNumbersetPortNumberssetPreferQueryModesetPreparedStatementCacheQueriessetPreparedStatementCacheSizeMiBsetPrepareThresholdsetPropertysetPropertysetProtocolVersionsetQuoteReturningIdentifierssetReadOnlysetReadOnlyModesetReceiveBufferSizesetRecvBufferSizesetReplicationsetReWriteBatchedInsertssetSendBufferSizesetServerNamesetServerNamessetSocketFactorysetSocketFactoryArgsetSocketTimeoutsetSslsetSslCertsetSslcertsetSslfactorysetSslFactoryArgsetSslfactoryargsetSslHostnameVerifiersetSslhostnameverifiersetSslKeysetSslkeysetSslModesetSslmodesetSslPasswordsetSslpasswordsetSslPasswordCallbacksetSslpasswordcallbacksetSslResponseTimeoutsetSslRootCertsetSslrootcertsetSspiServiceClasssetStringTypesetTargetServerTypesetTcpKeepAlivesetTcpNoDelaysetUnknownLengthsetUrlsetURLsetUsersetUseSpNegosetXmlFactoryFactorywriteBaseObject

Constructor Detail

PGSimpleDataSourceback to summary
public PGSimpleDataSource()

Method Detail

getDescriptionback to summary
public String getDescription()

Implements abstract org.postgresql.ds.common.BaseDataSource.getDescription.

Gets a description of this DataSource.

Returns:String

Doc from org.postgresql.ds.common.BaseDataSource.getDescription.

description of this DataSource-ish thing

Annotations
@Override
isWrapperForback to summary
public boolean isWrapperFor(Class<?> iface) throws SQLException

Implements java.sql.Wrapper.isWrapperFor.

Doc from java.sql.Wrapper.isWrapperFor.

Returns true if this either implements the interface argument or is directly or indirectly a wrapper for an object that does. Returns false otherwise. If this implements the interface then return true, else if this is a wrapper then return the result of recursively calling isWrapperFor on the wrapped object. If this does not implement the interface and is not a wrapper, return false. This method should be implemented as a low-cost operation compared to unwrap so that callers can use this method to avoid expensive unwrap calls that may fail. If this method returns true then calling unwrap with the same argument should succeed.

Parameters
iface:Class<?>

a Class defining an interface.

Returns:boolean

true if this implements the interface or directly or indirectly wraps an object that does.

Annotations
@Override
Exceptions
SQLException:
if an error occurs while determining whether this is a wrapper for an object with the given interface.
readObjectback to summary
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
unwrapback to summary
public <T> T unwrap(Class<T> iface) throws SQLException

Implements java.sql.Wrapper.unwrap.

Doc from java.sql.Wrapper.unwrap.

Returns an object that implements the given interface to allow access to non-standard methods, or standard methods not exposed by the proxy. If the receiver implements the interface then the result is the receiver or a proxy for the receiver. If the receiver is a wrapper and the wrapped object implements the interface then the result is the wrapped object or a proxy for the wrapped object. Otherwise return the the result of calling unwrap recursively on the wrapped object or a proxy for that result. If the receiver is not a wrapper and does not implement the interface, then an SQLException is thrown.

Parameters
<T>
the type of the class modeled by this Class object
iface:Class<T>

A Class defining an interface that the result must implement.

Returns:T

an object that implements the interface. May be a proxy for the actual implementing object.

Annotations
@Override
Exceptions
SQLException:
If no object found that implements the interface
writeObjectback to summary
private void writeObject(ObjectOutputStream out) throws IOException