Class PGDataSource

  • All Implemented Interfaces:
    java.sql.Wrapper, javax.naming.Referenceable, javax.sql.CommonDataSource, javax.sql.DataSource

    public class PGDataSource
    extends com.impossibl.postgres.jdbc.AbstractGeneratedDataSource
    implements javax.sql.DataSource, javax.naming.Referenceable
    DataSource implementation
    • Constructor Summary

      Constructors 
      Constructor Description
      PGDataSource()
      Constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected javax.naming.Reference createReference()
      Create a reference using the correct ObjectFactory instance
      java.sql.Connection getConnection()
      java.sql.Connection getConnection​(java.lang.String user, java.lang.String password)
      java.lang.String getDescription()  
      boolean isWrapperFor​(java.lang.Class<?> iface)
      <T> T unwrap​(java.lang.Class<T> iface)
      • Methods inherited from class com.impossibl.postgres.jdbc.AbstractGeneratedDataSource

        getApiTrace, getApiTraceFile, getApplicationName, getDatabaseName, getDatabaseUrl, getDataSourceName, getDescriptionCacheSize, getFetchSize, getFieldFormat, getFieldLengthMax, getHousekeeper, getLoginTimeout, getMoneyFractionalDigits, getNetworkTimeout, getParamFormat, getParsedSqlCacheSize, getPassword, getPortNumber, getPreparedStatementCacheSize, getPreparedStatementCacheThreshold, getProtocolBufferPooling, getProtocolEncoding, getProtocolIoMode, getProtocolIoThreads, getProtocolMessageSizeMax, getProtocolSocketRecvBufferSize, getProtocolSocketSendBufferSize, getProtocolTrace, getProtocolTraceFile, getProtocolVersion, getReadOnly, getRegistrySharing, getServerName, getSqlTrace, getSqlTraceFile, getSslCaCertificateFile, getSslCertificateFile, getSslHomeDir, getSslKeyFile, getSslKeyPassword, getSslKeyPasswordCallback, getSslMode, getStrictMode, getUser, setApiTrace, setApiTraceFile, setApplicationName, setDatabaseName, setDatabaseUrl, setDataSourceName, setDescriptionCacheSize, setFetchSize, setFieldFormat, setFieldLengthMax, setHousekeeper, setLoginTimeout, setMoneyFractionalDigits, setNetworkTimeout, setParamFormat, setParsedSqlCacheSize, setPassword, setPortNumber, setPreparedStatementCacheSize, setPreparedStatementCacheThreshold, setProtocolBufferPooling, setProtocolEncoding, setProtocolIoMode, setProtocolIoThreads, setProtocolMessageSizeMax, setProtocolSocketRecvBufferSize, setProtocolSocketSendBufferSize, setProtocolTrace, setProtocolTraceFile, setProtocolVersion, setReadOnly, setRegistrySharing, setServerName, setSqlTrace, setSqlTraceFile, setSslCaCertificateFile, setSslCertificateFile, setSslHomeDir, setSslKeyFile, setSslKeyPassword, setSslKeyPasswordCallback, setSslMode, setStrictMode, setUser
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface javax.sql.CommonDataSource

        createShardingKeyBuilder, getParentLogger
      • Methods inherited from interface javax.sql.DataSource

        createConnectionBuilder, getLoginTimeout, getLogWriter, setLoginTimeout, setLogWriter
      • Methods inherited from interface javax.naming.Referenceable

        getReference
    • Constructor Detail

      • PGDataSource

        public PGDataSource()
        Constructor
    • Method Detail

      • getConnection

        public java.sql.Connection getConnection()
                                          throws java.sql.SQLException
        Specified by:
        getConnection in interface javax.sql.DataSource
        Throws:
        java.sql.SQLException
      • getConnection

        public java.sql.Connection getConnection​(java.lang.String user,
                                                 java.lang.String password)
                                          throws java.sql.SQLException
        Specified by:
        getConnection in interface javax.sql.DataSource
        Throws:
        java.sql.SQLException
      • unwrap

        public <T> T unwrap​(java.lang.Class<T> iface)
                     throws java.sql.SQLException
        Specified by:
        unwrap in interface java.sql.Wrapper
        Throws:
        java.sql.SQLException
      • isWrapperFor

        public boolean isWrapperFor​(java.lang.Class<?> iface)
                             throws java.sql.SQLException
        Specified by:
        isWrapperFor in interface java.sql.Wrapper
        Throws:
        java.sql.SQLException
      • createReference

        protected javax.naming.Reference createReference()
        Create a reference using the correct ObjectFactory instance
        Specified by:
        createReference in class AbstractDataSource
        Returns:
        The reference