package cn.edu.ruc.kafka.statement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.SQLFeatureNotSupportedException;
import java.sql.SQLWarning;
/**
* This class implements the unused methods so that other sub-classes can be shorter and more clear.
* @author Hank Bian
* @version 0.0.1
* @see java.sql.Statement
*/
public abstract class Statement implements java.sql.Statement
{
/*
@Override
public ResultSet executeQuery(String sql) throws SQLException
{
return null;
}
@Override
public int executeUpdate(String sql) throws SQLException
{
return 0;
}
@Override
public void close() throws SQLException
{
}
*/
@Override
public int getMaxFieldSize() throws SQLException
{
throw new SQLFeatureNotSupportedException();
}
@Override
public void setMaxFieldSize(int max) throws SQLException
{
throw new SQLFeatureNotSupportedException();
}
@Override
public int getMaxRows() throws SQLException
{
throw new SQLFeatureNotSupportedException();
}
@Override
public void setMaxRows(int max) throws SQLException
{
throw new SQLFeatureNotSupportedException();
}
@Override
public void setEscapeProcessing(boolean enable) throws SQLException
{
throw new SQLFeatureNotSupportedException();
}
@Override
public int getQueryTimeout() throws SQLException
{
throw new SQLFeatureNotSupportedException();
}
@Override
public void setQueryTimeout(int seconds) throws SQLException
{
throw new SQLFeatureNotSupportedException();
}
@Override
public void cancel() throws SQLException
{
throw new SQLFeatureNotSupportedException();
}
@Override
public SQLWarning getWarnings() throws SQLException
{
throw new SQLFeatureNotSupportedException();
}
@Override
public void clearWarnings() throws SQLException
{
throw new SQLFeatureNotSupportedException();
}
@Override
public void setCursorName(String name) throws SQLException
{
throw new SQLFeatureNotSupportedException();
}
@Override
public boolean execute(String sql) throws SQLException
{
throw new SQLFeatureNotSupportedException();
}
/*
@Override
public ResultSet getResultSet() throws SQLException
{
return null;
}
@Override
public int getUpdateCount() throws SQLException
{
return 0;
}
*/
@Override
public boolean getMoreResults() throws SQLException
{
throw new SQLFeatureNotSupportedException();
}
@Override
public void setFetchDirection(int direction) throws SQLException
{
throw new SQLFeatureNotSupportedException();
}
@Override
public int getFetchDirection() throws SQLException
{
return ResultSet.FETCH_FORWARD;
}
@Override
public void setFetchSize(int rows) throws SQLException
{
throw new SQLFeatureNotSupportedException();
}
@Override
public int getFetchSize() throws SQLException
{
throw new SQLFeatureNotSupportedException();
}
@Override
public int getResultSetConcurrency() throws SQLException
{
throw new SQLFeatureNotSupportedException();
}
@Override
public int getResultSetType() throws SQLException
{
return ResultSet.TYPE_FORWARD_ONLY;
}
@Override
public void addBatch(String sql) throws SQLException
{
throw new SQLFeatureNotSupportedException();
}
@Override
public void clearBatch() throws SQLException
{
throw new SQLFeatureNotSupportedException();
}
@Override
public int[] executeBatch() throws SQLException
{
throw new SQLFeatureNotSupportedException();
}
/*
@Override
public Connection getConnection() throws SQLException
{
return null;
}
*/
@Override
public boolean getMoreResults(int current) throws SQLException
{
return false;
}
@Override
public ResultSet getGeneratedKeys() throws SQLException
{
throw new SQLFeatureNotSupportedException();
}
@Override
public int executeUpdate(String sql, int autoGeneratedKeys) throws SQLException
{
throw new SQLFeatureNotSupportedException();
}
@Override
public int executeUpdate(String sql, int[] columnIndexes) throws SQLException
{
throw new SQLFeatureNotSupportedException();
}
@Override
public int executeUpdate(String sql, String[] columnNames) throws SQLException
{
throw new SQLFeatureNotSupportedException();
}
@Override
public boolean execute(String sql, int autoGeneratedKeys) throws SQLException
{
throw new SQLFeatureNotSupportedException();
}
@Override
public boolean execute(String sql, int[] columnIndexes) throws SQLException
{
throw new SQLFeatureNotSupportedException();
}
@Override
public boolean execute(String sql, String[] columnNames) throws SQLException
{
throw new SQLFeatureNotSupportedException();
}
@Override
public int getResultSetHoldability() throws SQLException
{
throw new SQLFeatureNotSupportedException();
}
/*
@Override
public boolean isClosed() throws SQLException
{
return false;
}
*/
/*
@Override
public void setPoolable(boolean poolable) throws SQLException
{
}
@Override
public boolean isPoolable() throws SQLException
{
return false;
}
*/
@Override
public void closeOnCompletion() throws SQLException
{
throw new SQLFeatureNotSupportedException();
}
@Override
public boolean isCloseOnCompletion() throws SQLException
{
throw new SQLFeatureNotSupportedException();
}
@Override
public <T> T unwrap(Class<T> iface) throws SQLException
{
throw new SQLFeatureNotSupportedException();
}
@Override
public boolean isWrapperFor(Class<?> iface) throws SQLException
{
throw new SQLFeatureNotSupportedException();
}
}