//============================================================================== // ConnectionAdapter.java //============================================================================== package tribble.sql; import java.lang.UnsupportedOperationException; import java.sql.CallableStatement; import java.sql.Connection; import java.sql.DatabaseMetaData; import java.sql.PreparedStatement; import java.sql.SQLException; import java.sql.SQLWarning; import java.sql.Savepoint; import java.sql.Statement; import java.util.Map; /******************************************************************************* * JDBC connection adapter class. * Provides all the methods required by the java.sql.Connection class, * most of which do nothing but throw an UnsupportedOperationException. * Subclasses that extend this base class can then implement only the methods * that they need. * * *
* Copyright ©2008 by David R. Tribble, all rights reserved.
* Permission is granted to any person or entity except those designated by
* by the United States Department of State as a terrorist, or terrorist
* government or agency, to use and distribute this source code provided
* that the original copyright notice remains present and unaltered.
*
* @see StatementAdapter
*/
public class ConnectionAdapter
implements java.sql.Connection
{
static final String REV =
"@(#)tribble/sql/ConnectionAdapter.java $Revision: 1.2 $ $Date: 2008/09/06 17:48:01 $\n";
// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
// Constructors
/***************************************************************************
* Constructor.
*
* @since 1.1, 2008-09-02
*/
public ConnectionAdapter()
{ }
// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
// Methods
public void close()
throws SQLException
{ }
public boolean isClosed()
throws SQLException
{
return false;
}
public Statement createStatement()
throws SQLException
{
throw new UnsupportedOperationException("Not implemented");
}
public Statement createStatement(int t, int c)
throws SQLException
{
throw new UnsupportedOperationException("Not implemented");
}
public Statement createStatement(int t, int c, int h)
throws SQLException
{
throw new UnsupportedOperationException("Not implemented");
}
public PreparedStatement prepareStatement(String stmt)
throws SQLException
{
throw new UnsupportedOperationException("Not implemented");
}
public PreparedStatement prepareStatement(String stmt, String[] parms)
throws SQLException
{
throw new UnsupportedOperationException("Not implemented");
}
public PreparedStatement prepareStatement(String stmt, int[] parms)
throws SQLException
{
throw new UnsupportedOperationException("Not implemented");
}
public PreparedStatement prepareStatement(String stmt, int a)
throws SQLException
{
throw new UnsupportedOperationException("Not implemented");
}
public PreparedStatement prepareStatement(String stmt, int a, int b)
throws SQLException
{
throw new UnsupportedOperationException("Not implemented");
}
public PreparedStatement prepareStatement(String stmt, int a, int b, int c)
throws SQLException
{
throw new UnsupportedOperationException("Not implemented");
}
public CallableStatement prepareCall(String stmt)
throws SQLException
{
throw new UnsupportedOperationException("Not implemented");
}
public CallableStatement prepareCall(String stmt, String[] parms)
throws SQLException
{
throw new UnsupportedOperationException("Not implemented");
}
public CallableStatement prepareCall(String stmt, String t)
throws SQLException
{
throw new UnsupportedOperationException("Not implemented");
}
public CallableStatement prepareCall(String stmt, int[] parms)
throws SQLException
{
throw new UnsupportedOperationException("Not implemented");
}
public CallableStatement prepareCall(String stmt, int t)
throws SQLException
{
throw new UnsupportedOperationException("Not implemented");
}
public CallableStatement prepareCall(String stmt, int t, int c)
throws SQLException
{
throw new UnsupportedOperationException("Not implemented");
}
public CallableStatement prepareCall(String stmt, int t, int c, int h)
throws SQLException
{
throw new UnsupportedOperationException("Not implemented");
}
public Savepoint setSavepoint()
throws SQLException
{
throw new UnsupportedOperationException("Not implemented");
}
public Savepoint setSavepoint(String s)
throws SQLException
{
throw new UnsupportedOperationException("Not implemented");
}
public void releaseSavepoint(Savepoint p)
throws SQLException
{
throw new UnsupportedOperationException("Not implemented");
}
public void rollback()
throws SQLException
{ }
public void rollback(Savepoint p)
throws SQLException
{ }
public void commit()
throws SQLException
{ }
public String nativeSQL(String sql)
throws SQLException
{
throw new UnsupportedOperationException("Not implemented");
}
public void setTypeMap(Map m)
throws SQLException
{
throw new UnsupportedOperationException("Not implemented");
}
public Map getTypeMap()
throws SQLException
{
throw new UnsupportedOperationException("Not implemented");
}
public Object getObject(String s, Map m)
throws SQLException
{
throw new UnsupportedOperationException("Not implemented");
}
public SQLWarning getWarnings()
throws SQLException
{
return null;
}
public void clearWarnings()
throws SQLException
{ }
public DatabaseMetaData getMetaData()
throws SQLException
{
throw new UnsupportedOperationException("Not implemented");
}
public String getCatalog()
throws SQLException
{
throw new UnsupportedOperationException("Not implemented");
}
public void setCatalog(String c)
throws SQLException
{
throw new UnsupportedOperationException("Not implemented");
}
public boolean isReadOnly()
throws SQLException
{
return false;
}
public void setReadOnly(boolean f)
throws SQLException
{ }
public boolean getAutoCommit()
throws SQLException
{
return false;
}
public void setAutoCommit(boolean f)
throws SQLException
{ }
public int getTransactionIsolation()
throws SQLException
{
throw new UnsupportedOperationException("Not implemented");
}
public void setTransactionIsolation(int t)
throws SQLException
{ }
public int getHoldability()
throws SQLException
{
throw new UnsupportedOperationException("Not implemented");
}
public void setHoldability(int t)
throws SQLException
{ }
}
// End ConnectionAdapter.java