com.foundationdb.sql.jdbc.jdbc4.AbstractJdbc4ResultSetMetaData Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fdb-sql-layer-jdbc Show documentation
Show all versions of fdb-sql-layer-jdbc Show documentation
The FoundationDB SQL Layer Driver for JDBC4
/*-------------------------------------------------------------------------
*
* Copyright (c) 2004-2011, PostgreSQL Global Development Group
*
*
*-------------------------------------------------------------------------
*/
package com.foundationdb.sql.jdbc.jdbc4;
import com.foundationdb.sql.jdbc.core.*;
import java.sql.SQLException;
abstract class AbstractJdbc4ResultSetMetaData extends com.foundationdb.sql.jdbc.jdbc2.AbstractJdbc2ResultSetMetaData
{
public AbstractJdbc4ResultSetMetaData(BaseConnection connection, Field[] fields)
{
super(connection, fields);
}
public boolean isWrapperFor(Class> iface) throws SQLException
{
return iface.isAssignableFrom(getClass());
}
public T unwrap(Class iface) throws SQLException
{
if (iface.isAssignableFrom(getClass()))
{
return (T) this;
}
throw new SQLException("Cannot unwrap to " + iface.getName());
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy