Files
Druid/src/main/java/com/alibaba/druid/pool/ha/HAStatement.java
T
wenshao ab2fb2ad56 支持HA
git-svn-id: http://code.alibabatech.com/svn/druid/trunk@460 b9813039-fb51-4c41-a8b9-e21c2acb5095
2011-07-17 08:36:42 +00:00

291 lines
6.8 KiB
Java

package com.alibaba.druid.pool.ha;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.SQLWarning;
import java.sql.Statement;
import com.alibaba.druid.pool.WrapperAdapter;
public class HAStatement extends WrapperAdapter implements Statement {
private final HAConnection conn;
private final long id;
private Integer resultSetType;
private Integer resultSetConcurrency;
private Integer resultSetHoldability;
public HAStatement(HAConnection conn, long id){
super();
this.conn = conn;
this.id = id;
}
public HAStatement(HAConnection conn, long id, int resultSetType, int resultSetConcurrency){
super();
this.conn = conn;
this.id = id;
this.resultSetType = resultSetType;
this.resultSetConcurrency = resultSetConcurrency;
}
public HAStatement(HAConnection conn, long id, int resultSetType, int resultSetConcurrency, int resultSetHoldability){
super();
this.conn = conn;
this.id = id;
this.resultSetType = resultSetType;
this.resultSetConcurrency = resultSetConcurrency;
this.resultSetHoldability = resultSetHoldability;
}
public HAConnection getConn() {
return conn;
}
public long getId() {
return id;
}
@Override
public ResultSet executeQuery(String sql) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public int executeUpdate(String sql) throws SQLException {
// TODO Auto-generated method stub
return 0;
}
@Override
public void close() throws SQLException {
// TODO Auto-generated method stub
}
@Override
public int getMaxFieldSize() throws SQLException {
// TODO Auto-generated method stub
return 0;
}
@Override
public void setMaxFieldSize(int max) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public int getMaxRows() throws SQLException {
// TODO Auto-generated method stub
return 0;
}
@Override
public void setMaxRows(int max) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void setEscapeProcessing(boolean enable) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public int getQueryTimeout() throws SQLException {
// TODO Auto-generated method stub
return 0;
}
@Override
public void setQueryTimeout(int seconds) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void cancel() throws SQLException {
// TODO Auto-generated method stub
}
@Override
public SQLWarning getWarnings() throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public void clearWarnings() throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void setCursorName(String name) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public boolean execute(String sql) throws SQLException {
// TODO Auto-generated method stub
return false;
}
@Override
public ResultSet getResultSet() throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public int getUpdateCount() throws SQLException {
// TODO Auto-generated method stub
return 0;
}
@Override
public boolean getMoreResults() throws SQLException {
// TODO Auto-generated method stub
return false;
}
@Override
public void setFetchDirection(int direction) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public int getFetchDirection() throws SQLException {
// TODO Auto-generated method stub
return 0;
}
@Override
public void setFetchSize(int rows) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public int getFetchSize() throws SQLException {
// TODO Auto-generated method stub
return 0;
}
@Override
public int getResultSetConcurrency() throws SQLException {
// TODO Auto-generated method stub
return 0;
}
@Override
public int getResultSetType() throws SQLException {
// TODO Auto-generated method stub
return 0;
}
@Override
public void addBatch(String sql) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void clearBatch() throws SQLException {
// TODO Auto-generated method stub
}
@Override
public int[] executeBatch() throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public Connection getConnection() throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public boolean getMoreResults(int current) throws SQLException {
// TODO Auto-generated method stub
return false;
}
@Override
public ResultSet getGeneratedKeys() throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public int executeUpdate(String sql, int autoGeneratedKeys) throws SQLException {
// TODO Auto-generated method stub
return 0;
}
@Override
public int executeUpdate(String sql, int[] columnIndexes) throws SQLException {
// TODO Auto-generated method stub
return 0;
}
@Override
public int executeUpdate(String sql, String[] columnNames) throws SQLException {
// TODO Auto-generated method stub
return 0;
}
@Override
public boolean execute(String sql, int autoGeneratedKeys) throws SQLException {
// TODO Auto-generated method stub
return false;
}
@Override
public boolean execute(String sql, int[] columnIndexes) throws SQLException {
// TODO Auto-generated method stub
return false;
}
@Override
public boolean execute(String sql, String[] columnNames) throws SQLException {
// TODO Auto-generated method stub
return false;
}
@Override
public int getResultSetHoldability() throws SQLException {
// TODO Auto-generated method stub
return 0;
}
@Override
public boolean isClosed() throws SQLException {
// TODO Auto-generated method stub
return false;
}
@Override
public void setPoolable(boolean poolable) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public boolean isPoolable() throws SQLException {
// TODO Auto-generated method stub
return false;
}
}