org.postgresql.ds.jdbc4.AbstractJdbc4SimpleDataSource Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of postgresql Show documentation
Show all versions of postgresql Show documentation
PostgreSQL JDBC Driver JDBC4
/*-------------------------------------------------------------------------
*
* Copyright (c) 2004-2014, PostgreSQL Global Development Group
*
*
*-------------------------------------------------------------------------
*/
package org.postgresql.ds.jdbc4;
import java.sql.SQLException;
import java.sql.SQLFeatureNotSupportedException;
import org.postgresql.ds.jdbc23.AbstractJdbc23SimpleDataSource;
public abstract class AbstractJdbc4SimpleDataSource extends AbstractJdbc23SimpleDataSource
{
public boolean isWrapperFor(Class iface) throws SQLException
{
return iface.isAssignableFrom(getClass());
}
public T unwrap(Class iface) throws SQLException
{
if (iface.isAssignableFrom(getClass()))
{
return iface.cast(this);
}
throw new SQLException("Cannot unwrap to " + iface.getName());
}
public java.util.logging.Logger getParentLogger() throws SQLFeatureNotSupportedException
{
throw org.postgresql.Driver.notImplemented(this.getClass(), "getParentLogger()");
}
}