All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.postgresql.jdbc4.AbstractJdbc4ResultSetMetaData Maven / Gradle / Ivy

There is a newer version: 2.1-0-jdbc41
Show newest version
/*-------------------------------------------------------------------------
*
* Copyright (c) 2004-2011, PostgreSQL Global Development Group
*
*
*-------------------------------------------------------------------------
*/
package org.postgresql.jdbc4;

import org.postgresql.core.*;

import java.sql.SQLException;

abstract class AbstractJdbc4ResultSetMetaData extends org.postgresql.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 - 2025 Weber Informatics LLC | Privacy Policy