You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by fr...@apache.org on 2018/06/14 23:03:36 UTC
[2/7] calcite-avatica git commit: Fix static field access warnings
Fix static field access warnings
Fix warnings about accessing AvaticaConnection.HELPER static field by
using a class instance.
Project: http://git-wip-us.apache.org/repos/asf/calcite-avatica/repo
Commit: http://git-wip-us.apache.org/repos/asf/calcite-avatica/commit/da3f03ba
Tree: http://git-wip-us.apache.org/repos/asf/calcite-avatica/tree/da3f03ba
Diff: http://git-wip-us.apache.org/repos/asf/calcite-avatica/diff/da3f03ba
Branch: refs/heads/branch-avatica-1.12
Commit: da3f03babc3847ea06769304dc7f704c6f01154d
Parents: 4c6b55e
Author: Laurent Goujon <la...@online.fr>
Authored: Sun Mar 18 16:52:51 2018 -0700
Committer: Laurent Goujon <la...@apache.org>
Committed: Sat Jun 9 11:43:54 2018 -0700
----------------------------------------------------------------------
.../calcite/avatica/AvaticaResultSet.java | 202 +++++++++----------
.../calcite/avatica/AvaticaStatement.java | 55 ++---
2 files changed, 129 insertions(+), 128 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/calcite-avatica/blob/da3f03ba/core/src/main/java/org/apache/calcite/avatica/AvaticaResultSet.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/avatica/AvaticaResultSet.java b/core/src/main/java/org/apache/calcite/avatica/AvaticaResultSet.java
index 19d9317..3270fe7 100644
--- a/core/src/main/java/org/apache/calcite/avatica/AvaticaResultSet.java
+++ b/core/src/main/java/org/apache/calcite/avatica/AvaticaResultSet.java
@@ -369,7 +369,7 @@ public class AvaticaResultSet extends ArrayFactoryImpl implements ResultSet {
}
public String getCursorName() throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public ResultSetMetaData getMetaData() throws SQLException {
@@ -415,23 +415,23 @@ public class AvaticaResultSet extends ArrayFactoryImpl implements ResultSet {
}
public boolean isLast() throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void beforeFirst() throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void afterLast() throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public boolean first() throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public boolean last() throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public int getRow() throws SQLException {
@@ -439,15 +439,15 @@ public class AvaticaResultSet extends ArrayFactoryImpl implements ResultSet {
}
public boolean absolute(int row) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public boolean relative(int rows) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public boolean previous() throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void setFetchDirection(int direction) throws SQLException {
@@ -487,196 +487,196 @@ public class AvaticaResultSet extends ArrayFactoryImpl implements ResultSet {
}
public void updateNull(int columnIndex) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateBoolean(int columnIndex, boolean x) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateByte(int columnIndex, byte x) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateShort(int columnIndex, short x) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateInt(int columnIndex, int x) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateLong(int columnIndex, long x) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateFloat(int columnIndex, float x) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateDouble(int columnIndex, double x) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateBigDecimal(
int columnIndex, BigDecimal x) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateString(int columnIndex, String x) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateBytes(int columnIndex, byte[] x) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateDate(int columnIndex, Date x) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateTime(int columnIndex, Time x) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateTimestamp(
int columnIndex, Timestamp x) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateAsciiStream(
int columnIndex, InputStream x, int length) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateBinaryStream(
int columnIndex, InputStream x, int length) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateCharacterStream(
int columnIndex, Reader x, int length) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateObject(
int columnIndex, Object x, int scaleOrLength) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateObject(int columnIndex, Object x) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateNull(String columnLabel) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateBoolean(
String columnLabel, boolean x) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateByte(String columnLabel, byte x) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateShort(String columnLabel, short x) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateInt(String columnLabel, int x) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateLong(String columnLabel, long x) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateFloat(String columnLabel, float x) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateDouble(String columnLabel, double x) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateBigDecimal(
String columnLabel, BigDecimal x) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateString(String columnLabel, String x) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateBytes(String columnLabel, byte[] x) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateDate(String columnLabel, Date x) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateTime(String columnLabel, Time x) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateTimestamp(
String columnLabel, Timestamp x) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateAsciiStream(
String columnLabel, InputStream x, int length) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateBinaryStream(
String columnLabel, InputStream x, int length) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateCharacterStream(
String columnLabel, Reader reader, int length) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateObject(
String columnLabel, Object x, int scaleOrLength) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateObject(String columnLabel, Object x) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void insertRow() throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateRow() throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void deleteRow() throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void refreshRow() throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void cancelRowUpdates() throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void moveToInsertRow() throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void moveToCurrentRow() throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public AvaticaStatement getStatement() throws SQLException {
@@ -760,51 +760,51 @@ public class AvaticaResultSet extends ArrayFactoryImpl implements ResultSet {
}
public void updateRef(int columnIndex, Ref x) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateRef(String columnLabel, Ref x) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateBlob(int columnIndex, Blob x) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateBlob(String columnLabel, Blob x) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateClob(int columnIndex, Clob x) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateClob(String columnLabel, Clob x) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateArray(int columnIndex, Array x) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateArray(String columnLabel, Array x) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public RowId getRowId(int columnIndex) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public RowId getRowId(String columnLabel) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateRowId(int columnIndex, RowId x) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateRowId(String columnLabel, RowId x) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public int getHoldability() throws SQLException {
@@ -817,21 +817,21 @@ public class AvaticaResultSet extends ArrayFactoryImpl implements ResultSet {
public void updateNString(
int columnIndex, String nString) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateNString(
String columnLabel, String nString) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateNClob(int columnIndex, NClob nClob) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateNClob(
String columnLabel, NClob nClob) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public NClob getNClob(int columnIndex) throws SQLException {
@@ -852,12 +852,12 @@ public class AvaticaResultSet extends ArrayFactoryImpl implements ResultSet {
public void updateSQLXML(
int columnIndex, SQLXML xmlObject) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateSQLXML(
String columnLabel, SQLXML xmlObject) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public String getNString(int columnIndex) throws SQLException {
@@ -878,145 +878,145 @@ public class AvaticaResultSet extends ArrayFactoryImpl implements ResultSet {
public void updateNCharacterStream(
int columnIndex, Reader x, long length) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateNCharacterStream(
String columnLabel, Reader reader, long length) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateAsciiStream(
int columnIndex, InputStream x, long length) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateBinaryStream(
int columnIndex, InputStream x, long length) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateCharacterStream(
int columnIndex, Reader x, long length) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateAsciiStream(
String columnLabel, InputStream x, long length) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateBinaryStream(
String columnLabel, InputStream x, long length) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateCharacterStream(
String columnLabel, Reader reader, long length) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateBlob(
int columnIndex,
InputStream inputStream,
long length) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateBlob(
String columnLabel,
InputStream inputStream,
long length) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateClob(
int columnIndex, Reader reader, long length) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateClob(
String columnLabel, Reader reader, long length) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateNClob(
int columnIndex, Reader reader, long length) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateNClob(
String columnLabel, Reader reader, long length) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateNCharacterStream(
int columnIndex, Reader x) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateNCharacterStream(
String columnLabel, Reader reader) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateAsciiStream(
int columnIndex, InputStream x) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateBinaryStream(
int columnIndex, InputStream x) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateCharacterStream(
int columnIndex, Reader x) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateAsciiStream(
String columnLabel, InputStream x) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateBinaryStream(
String columnLabel, InputStream x) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateCharacterStream(
String columnLabel, Reader reader) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateBlob(
int columnIndex, InputStream inputStream) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateBlob(
String columnLabel, InputStream inputStream) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateClob(int columnIndex, Reader reader) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateClob(
String columnLabel, Reader reader) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateNClob(
int columnIndex, Reader reader) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void updateNClob(
String columnLabel, Reader reader) throws SQLException {
- throw statement.connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public <T> T getObject(int columnIndex, Class<T> type) throws SQLException {
@@ -1032,7 +1032,7 @@ public class AvaticaResultSet extends ArrayFactoryImpl implements ResultSet {
if (iface.isInstance(this)) {
return iface.cast(this);
}
- throw statement.connection.HELPER.createException(
+ throw AvaticaConnection.HELPER.createException(
"does not implement '" + iface + "'");
}
http://git-wip-us.apache.org/repos/asf/calcite-avatica/blob/da3f03ba/core/src/main/java/org/apache/calcite/avatica/AvaticaStatement.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/avatica/AvaticaStatement.java b/core/src/main/java/org/apache/calcite/avatica/AvaticaStatement.java
index 0676c5d..46de09c 100644
--- a/core/src/main/java/org/apache/calcite/avatica/AvaticaStatement.java
+++ b/core/src/main/java/org/apache/calcite/avatica/AvaticaStatement.java
@@ -132,7 +132,7 @@ public abstract class AvaticaStatement
private void checkNotPreparedOrCallable(String s) throws SQLException {
if (this instanceof PreparedStatement
|| this instanceof CallableStatement) {
- throw connection.HELPER.createException("Cannot call " + s
+ throw AvaticaConnection.HELPER.createException("Cannot call " + s
+ " on prepared or callable statement");
}
}
@@ -145,6 +145,7 @@ public abstract class AvaticaStatement
final long maxRowCount1 = maxRowCount <= 0 ? -1 : maxRowCount;
for (int i = 0; i < connection.maxRetriesPerExecute; i++) {
try {
+ @SuppressWarnings("unused")
Meta.ExecuteResult x =
connection.prepareAndExecuteInternal(this, sql, maxRowCount1);
return;
@@ -153,7 +154,7 @@ public abstract class AvaticaStatement
}
}
} catch (RuntimeException e) {
- throw connection.HELPER.createException("Error while executing SQL \"" + sql + "\": "
+ throw AvaticaConnection.HELPER.createException("Error while executing SQL \"" + sql + "\": "
+ e.getMessage(), e);
}
@@ -217,12 +218,12 @@ public abstract class AvaticaStatement
try {
executeInternal(sql);
if (openResultSet == null) {
- throw connection.HELPER.createException(
+ throw AvaticaConnection.HELPER.createException(
"Statement did not return a result set");
}
return openResultSet;
} catch (RuntimeException e) {
- throw connection.HELPER.createException("Error while executing SQL \"" + sql + "\": "
+ throw AvaticaConnection.HELPER.createException("Error while executing SQL \"" + sql + "\": "
+ e.getMessage(), e);
}
}
@@ -241,7 +242,7 @@ public abstract class AvaticaStatement
try {
close_();
} catch (RuntimeException e) {
- throw connection.HELPER.createException("While closing statement", e);
+ throw AvaticaConnection.HELPER.createException("While closing statement", e);
}
}
@@ -268,11 +269,11 @@ public abstract class AvaticaStatement
}
public int getMaxFieldSize() throws SQLException {
- throw connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void setMaxFieldSize(int max) throws SQLException {
- throw connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public final int getMaxRows() {
@@ -289,14 +290,14 @@ public abstract class AvaticaStatement
public void setLargeMaxRows(long maxRowCount) throws SQLException {
if (maxRowCount < 0) {
- throw connection.HELPER.createException(
+ throw AvaticaConnection.HELPER.createException(
"illegal maxRows value: " + maxRowCount);
}
this.maxRowCount = maxRowCount;
}
public void setEscapeProcessing(boolean enable) throws SQLException {
- throw connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public int getQueryTimeout() throws SQLException {
@@ -317,7 +318,7 @@ public abstract class AvaticaStatement
public void setQueryTimeout(int seconds) throws SQLException {
if (seconds < 0) {
- throw connection.HELPER.createException(
+ throw AvaticaConnection.HELPER.createException(
"illegal timeout value " + seconds);
}
setQueryTimeoutMillis(seconds * 1000);
@@ -344,7 +345,7 @@ public abstract class AvaticaStatement
}
public void setCursorName(String name) throws SQLException {
- throw connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public ResultSet getResultSet() throws SQLException {
@@ -386,11 +387,11 @@ public abstract class AvaticaStatement
}
public int getResultSetConcurrency() throws SQLException {
- throw connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public int getResultSetType() throws SQLException {
- throw connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public void addBatch(String sql) throws SQLException {
@@ -421,18 +422,18 @@ public abstract class AvaticaStatement
public boolean getMoreResults(int current) throws SQLException {
if (closed) {
- throw connection.HELPER.closed();
+ throw AvaticaConnection.HELPER.closed();
}
switch (current) {
case KEEP_CURRENT_RESULT:
case CLOSE_ALL_RESULTS:
- throw connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
case CLOSE_CURRENT_RESULT:
break;
default:
- throw connection.HELPER.createException("value " + current
+ throw AvaticaConnection.HELPER.createException("value " + current
+ " is not one of CLOSE_CURRENT_RESULT, KEEP_CURRENT_RESULT or CLOSE_ALL_RESULTS");
}
@@ -443,41 +444,41 @@ public abstract class AvaticaStatement
}
public ResultSet getGeneratedKeys() throws SQLException {
- throw connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public int executeUpdate(
String sql, int autoGeneratedKeys) throws SQLException {
- throw connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public int executeUpdate(
String sql, int[] columnIndexes) throws SQLException {
- throw connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public int executeUpdate(
String sql, String[] columnNames) throws SQLException {
- throw connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public boolean execute(
String sql, int autoGeneratedKeys) throws SQLException {
- throw connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public boolean execute(
String sql, int[] columnIndexes) throws SQLException {
- throw connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public boolean execute(
String sql, String[] columnNames) throws SQLException {
- throw connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public int getResultSetHoldability() throws SQLException {
- throw connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public boolean isClosed() throws SQLException {
@@ -485,11 +486,11 @@ public abstract class AvaticaStatement
}
public void setPoolable(boolean poolable) throws SQLException {
- throw connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
public boolean isPoolable() throws SQLException {
- throw connection.HELPER.unsupported();
+ throw AvaticaConnection.HELPER.unsupported();
}
// implements java.sql.Statement.closeOnCompletion (added in JDK 1.7)
@@ -508,7 +509,7 @@ public abstract class AvaticaStatement
if (iface.isInstance(this)) {
return iface.cast(this);
}
- throw connection.HELPER.createException(
+ throw AvaticaConnection.HELPER.createException(
"does not implement '" + iface + "'");
}