You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by jb...@apache.org on 2011/06/18 21:19:13 UTC
svn commit: r1137231 [1/3] - in /cassandra/drivers/java: ./
src/org/apache/cassandra/cql/jdbc/
Author: jbellis
Date: Sat Jun 18 19:19:13 2011
New Revision: 1137231
URL: http://svn.apache.org/viewvc?rev=1137231&view=rev
Log:
improve jdbc semantics
patch by Rick Shaw; reviewed by jbellis for CASSANDRA-2754
Added:
cassandra/drivers/java/src/org/apache/cassandra/cql/jdbc/AbstractCassandraConnection.java
cassandra/drivers/java/src/org/apache/cassandra/cql/jdbc/AbstractStatement.java
Modified:
cassandra/drivers/java/CHANGES.txt
cassandra/drivers/java/src/org/apache/cassandra/cql/jdbc/AbstractResultSet.java
cassandra/drivers/java/src/org/apache/cassandra/cql/jdbc/CResultSet.java
cassandra/drivers/java/src/org/apache/cassandra/cql/jdbc/CassandraConnection.java
cassandra/drivers/java/src/org/apache/cassandra/cql/jdbc/CassandraDriver.java
cassandra/drivers/java/src/org/apache/cassandra/cql/jdbc/CassandraPreparedStatement.java
cassandra/drivers/java/src/org/apache/cassandra/cql/jdbc/CassandraResultSet.java
cassandra/drivers/java/src/org/apache/cassandra/cql/jdbc/CassandraStatement.java
cassandra/drivers/java/src/org/apache/cassandra/cql/jdbc/ColumnDecoder.java
cassandra/drivers/java/src/org/apache/cassandra/cql/jdbc/Connection.java
cassandra/drivers/java/src/org/apache/cassandra/cql/jdbc/TypedColumn.java
cassandra/drivers/java/src/org/apache/cassandra/cql/jdbc/Utils.java
Modified: cassandra/drivers/java/CHANGES.txt
URL: http://svn.apache.org/viewvc/cassandra/drivers/java/CHANGES.txt?rev=1137231&r1=1137230&r2=1137231&view=diff
==============================================================================
--- cassandra/drivers/java/CHANGES.txt (original)
+++ cassandra/drivers/java/CHANGES.txt Sat Jun 18 19:19:13 2011
@@ -1,2 +1,2 @@
1.0.4
- * improve JDBC spec compliance (CASSANDRA-2720)
+ * improve JDBC spec compliance (CASSANDRA-2720, 2754)
Added: cassandra/drivers/java/src/org/apache/cassandra/cql/jdbc/AbstractCassandraConnection.java
URL: http://svn.apache.org/viewvc/cassandra/drivers/java/src/org/apache/cassandra/cql/jdbc/AbstractCassandraConnection.java?rev=1137231&view=auto
==============================================================================
--- cassandra/drivers/java/src/org/apache/cassandra/cql/jdbc/AbstractCassandraConnection.java (added)
+++ cassandra/drivers/java/src/org/apache/cassandra/cql/jdbc/AbstractCassandraConnection.java Sat Jun 18 19:19:13 2011
@@ -0,0 +1,258 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.cassandra.cql.jdbc;
+
+import java.sql.Array;
+import java.sql.Blob;
+import java.sql.CallableStatement;
+import java.sql.Clob;
+import java.sql.NClob;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+import java.sql.SQLFeatureNotSupportedException;
+import java.sql.SQLXML;
+import java.sql.Savepoint;
+import java.sql.Struct;
+import java.util.Map;
+
+public class AbstractCassandraConnection
+{
+ protected static final String NOT_SUPPORTED = "the Cassandra implementation does not support this method";
+
+ public Array createArrayOf(String arg0, Object[] arg1) throws SQLException
+ {
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
+ }
+
+ public Blob createBlob() throws SQLException
+ {
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
+ }
+
+ public Clob createClob() throws SQLException
+ {
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
+ }
+
+ public NClob createNClob() throws SQLException
+ {
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
+ }
+
+ public SQLXML createSQLXML() throws SQLException
+ {
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
+ }
+
+ public Struct createStruct(String arg0, Object[] arg1) throws SQLException
+ {
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
+ }
+
+ public Map<String, Class<?>> getTypeMap() throws SQLException
+ {
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
+ }
+
+ public CallableStatement prepareCall(String arg0) throws SQLException
+ {
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
+ }
+
+ public CallableStatement prepareCall(String arg0, int arg1, int arg2) throws SQLException
+ {
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
+ }
+
+ public CallableStatement prepareCall(String arg0, int arg1, int arg2, int arg3) throws SQLException
+ {
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
+ }
+
+ public PreparedStatement prepareStatement(String arg0, int arg1) throws SQLException
+ {
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
+ }
+
+ public PreparedStatement prepareStatement(String arg0, int[] arg1) throws SQLException
+ {
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
+ }
+
+ public PreparedStatement prepareStatement(String arg0, String[] arg1) throws SQLException
+ {
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
+ }
+
+ public void releaseSavepoint(Savepoint arg0) throws SQLException
+ {
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
+ }
+
+ public void rollback(Savepoint arg0) throws SQLException
+ {
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
+ }
+
+ public Savepoint setSavepoint() throws SQLException
+ {
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
+ }
+ public Savepoint setSavepoint(String arg0) throws SQLException
+ {
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
+ }
+
+ public void setTypeMap(Map<String, Class<?>> arg0) throws SQLException
+ {
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
+ }
+
+}
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.cassandra.cql.jdbc;
+
+import java.sql.Array;
+import java.sql.Blob;
+import java.sql.CallableStatement;
+import java.sql.Clob;
+import java.sql.NClob;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+import java.sql.SQLFeatureNotSupportedException;
+import java.sql.SQLXML;
+import java.sql.Savepoint;
+import java.sql.Struct;
+import java.util.Map;
+
+public class AbstractCassandraConnection
+{
+ protected static final String NOT_SUPPORTED = "the Cassandra implementation does not support this method";
+
+ public Array createArrayOf(String arg0, Object[] arg1) throws SQLException
+ {
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
+ }
+
+ public Blob createBlob() throws SQLException
+ {
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
+ }
+
+ public Clob createClob() throws SQLException
+ {
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
+ }
+
+ public NClob createNClob() throws SQLException
+ {
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
+ }
+
+ public SQLXML createSQLXML() throws SQLException
+ {
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
+ }
+
+ public Struct createStruct(String arg0, Object[] arg1) throws SQLException
+ {
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
+ }
+
+ public Map<String, Class<?>> getTypeMap() throws SQLException
+ {
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
+ }
+
+ public CallableStatement prepareCall(String arg0) throws SQLException
+ {
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
+ }
+
+ public CallableStatement prepareCall(String arg0, int arg1, int arg2) throws SQLException
+ {
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
+ }
+
+ public CallableStatement prepareCall(String arg0, int arg1, int arg2, int arg3) throws SQLException
+ {
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
+ }
+
+ public PreparedStatement prepareStatement(String arg0, int arg1) throws SQLException
+ {
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
+ }
+
+ public PreparedStatement prepareStatement(String arg0, int[] arg1) throws SQLException
+ {
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
+ }
+
+ public PreparedStatement prepareStatement(String arg0, String[] arg1) throws SQLException
+ {
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
+ }
+
+ public void releaseSavepoint(Savepoint arg0) throws SQLException
+ {
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
+ }
+
+ public void rollback(Savepoint arg0) throws SQLException
+ {
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
+ }
+
+ public Savepoint setSavepoint() throws SQLException
+ {
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
+ }
+ public Savepoint setSavepoint(String arg0) throws SQLException
+ {
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
+ }
+
+ public void setTypeMap(Map<String, Class<?>> arg0) throws SQLException
+ {
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
+ }
+
+}
Modified: cassandra/drivers/java/src/org/apache/cassandra/cql/jdbc/AbstractResultSet.java
URL: http://svn.apache.org/viewvc/cassandra/drivers/java/src/org/apache/cassandra/cql/jdbc/AbstractResultSet.java?rev=1137231&r1=1137230&r2=1137231&view=diff
==============================================================================
--- cassandra/drivers/java/src/org/apache/cassandra/cql/jdbc/AbstractResultSet.java (original)
+++ cassandra/drivers/java/src/org/apache/cassandra/cql/jdbc/AbstractResultSet.java Sat Jun 18 19:19:13 2011
@@ -19,325 +19,200 @@ package org.apache.cassandra.cql.jdbc;
* under the License.
*
*/
-
-
import java.io.InputStream;
import java.io.Reader;
import java.math.BigDecimal;
-import java.net.URL;
import java.sql.*;
+import java.util.Map;
/** a class to hold all the unimplemented crap */
class AbstractResultSet
{
- public boolean absolute(int arg0) throws SQLException
- {
- throw new UnsupportedOperationException("method not supported");
- }
-
- public void afterLast() throws SQLException
- {
- throw new UnsupportedOperationException("method not supported");
- }
-
- public void beforeFirst() throws SQLException
- {
- throw new UnsupportedOperationException("method not supported");
- }
+ protected static final String NOT_SUPPORTED = "the Cassandra implementation does not support this method";
public void cancelRowUpdates() throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
- }
-
- public void clearWarnings() throws SQLException
- {
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public void deleteRow() throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
- }
-
- public int findColumn(String arg0) throws SQLException
- {
- throw new UnsupportedOperationException("method not supported");
- }
-
- public boolean first() throws SQLException
- {
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public Array getArray(int arg0) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public Array getArray(String arg0) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public InputStream getAsciiStream(int arg0) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public InputStream getAsciiStream(String arg0) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public InputStream getBinaryStream(int arg0) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public InputStream getBinaryStream(String arg0) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public Blob getBlob(int arg0) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public Blob getBlob(String arg0) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
- }
-
- public byte getByte(int arg0) throws SQLException
- {
- throw new UnsupportedOperationException("method not supported");
- }
-
- public byte getByte(String arg0) throws SQLException
- {
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public Reader getCharacterStream(int arg0) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public Reader getCharacterStream(String arg0) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public Clob getClob(int arg0) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public Clob getClob(String arg0) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
- }
-
- public int getConcurrency() throws SQLException
- {
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public String getCursorName() throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
- public int getFetchDirection() throws SQLException
+ public Reader getNCharacterStream(int arg0) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
- public int getFetchSize() throws SQLException
+ public Reader getNCharacterStream(String arg0) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
- public int getHoldability() throws SQLException
+ public NClob getNClob(int arg0) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
- public Ref getRef(int arg0) throws SQLException
+ public NClob getNClob(String arg0) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
- public Ref getRef(String arg0) throws SQLException
+ public String getNString(int arg0) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
- public RowId getRowId(int arg0) throws SQLException
+ public String getNString(String arg0) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
- public RowId getRowId(String arg0) throws SQLException
+ public Object getObject(int arg0, Map<String, Class<?>> arg1) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
- public SQLXML getSQLXML(int arg0) throws SQLException
+ public Object getObject(String arg0, Map<String, Class<?>> arg1) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
- public SQLXML getSQLXML(String arg0) throws SQLException
- {
- throw new UnsupportedOperationException("method not supported");
- }
-
- public short getShort(int arg0) throws SQLException
+ public Ref getRef(int arg0) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
- public short getShort(String arg0) throws SQLException
+ public Ref getRef(String arg0) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
- public Statement getStatement() throws SQLException
+ public RowId getRowId(int arg0) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
- public URL getURL(int arg0) throws SQLException
+ public SQLXML getSQLXML(int arg0) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
- public URL getURL(String arg0) throws SQLException
+ public SQLXML getSQLXML(String arg0) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public InputStream getUnicodeStream(int arg0) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public InputStream getUnicodeStream(String arg0) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
- }
-
- public SQLWarning getWarnings() throws SQLException
- {
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public void insertRow() throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public void moveToCurrentRow() throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public void moveToInsertRow() throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
- }
-
- public boolean previous() throws SQLException
- {
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public void refreshRow() throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
- }
-
- public boolean relative(int arg0) throws SQLException
- {
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public boolean rowDeleted() throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public boolean rowInserted() throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public boolean rowUpdated() throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
- }
-
- public void setFetchDirection(int arg0) throws SQLException
- {
- throw new UnsupportedOperationException("method not supported");
- }
-
- public void setFetchSize(int arg0) throws SQLException
- {
- throw new UnsupportedOperationException("method not supported");
- }
-
- public Reader getNCharacterStream(int arg0) throws SQLException
- {
- throw new UnsupportedOperationException("method not supported");
- }
-
- public Reader getNCharacterStream(String arg0) throws SQLException
- {
- throw new UnsupportedOperationException("method not supported");
- }
-
- public NClob getNClob(int arg0) throws SQLException
- {
- throw new UnsupportedOperationException("method not supported");
- }
-
- public NClob getNClob(String arg0) throws SQLException
- {
- throw new UnsupportedOperationException("method not supported");
- }
-
- public String getNString(int arg0) throws SQLException
- {
- throw new UnsupportedOperationException("method not supported");
- }
-
- public String getNString(String arg0) throws SQLException
- {
- throw new UnsupportedOperationException("method not supported");
- }
-
- public BigDecimal getBigDecimal(int arg0) throws SQLException
- {
- throw new UnsupportedOperationException("method not supported");
- }
-
- public BigDecimal getBigDecimal(String arg0) throws SQLException
- {
- throw new UnsupportedOperationException("method not supported");
- }
-
- public BigDecimal getBigDecimal(int arg0, int arg1) throws SQLException
- {
- throw new UnsupportedOperationException("method not supported");
- }
-
- public BigDecimal getBigDecimal(String arg0, int arg1) throws SQLException
- {
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
//
@@ -346,416 +221,416 @@ class AbstractResultSet
public void updateArray(int arg0, Array arg1) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public void updateArray(String arg0, Array arg1) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public void updateAsciiStream(int arg0, InputStream arg1) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
- public void updateAsciiStream(String arg0, InputStream arg1) throws SQLException
+ public void updateAsciiStream(int arg0, InputStream arg1, int arg2) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
- public void updateAsciiStream(int arg0, InputStream arg1, int arg2) throws SQLException
+ public void updateAsciiStream(int arg0, InputStream arg1, long arg2) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
- public void updateAsciiStream(String arg0, InputStream arg1, int arg2) throws SQLException
+ public void updateAsciiStream(String arg0, InputStream arg1) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
- public void updateAsciiStream(int arg0, InputStream arg1, long arg2) throws SQLException
+ public void updateAsciiStream(String arg0, InputStream arg1, int arg2) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public void updateAsciiStream(String arg0, InputStream arg1, long arg2) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public void updateBigDecimal(int arg0, BigDecimal arg1) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public void updateBigDecimal(String arg0, BigDecimal arg1) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public void updateBinaryStream(int arg0, InputStream arg1) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
- public void updateBinaryStream(String arg0, InputStream arg1) throws SQLException
+ public void updateBinaryStream(int arg0, InputStream arg1, int arg2) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
- public void updateBinaryStream(int arg0, InputStream arg1, int arg2) throws SQLException
+ public void updateBinaryStream(int arg0, InputStream arg1, long arg2) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
- public void updateBinaryStream(String arg0, InputStream arg1, int arg2) throws SQLException
+ public void updateBinaryStream(String arg0, InputStream arg1) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
- public void updateBinaryStream(int arg0, InputStream arg1, long arg2) throws SQLException
+ public void updateBinaryStream(String arg0, InputStream arg1, int arg2) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public void updateBinaryStream(String arg0, InputStream arg1, long arg2) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public void updateBlob(int arg0, Blob arg1) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
- public void updateBlob(String arg0, Blob arg1) throws SQLException
+ public void updateBlob(int arg0, InputStream arg1) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
- public void updateBlob(int arg0, InputStream arg1) throws SQLException
+ public void updateBlob(int arg0, InputStream arg1, long arg2) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
- public void updateBlob(String arg0, InputStream arg1) throws SQLException
+ public void updateBlob(String arg0, Blob arg1) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
- public void updateBlob(int arg0, InputStream arg1, long arg2) throws SQLException
+ public void updateBlob(String arg0, InputStream arg1) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public void updateBlob(String arg0, InputStream arg1, long arg2) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public void updateBoolean(int arg0, boolean arg1) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public void updateBoolean(String arg0, boolean arg1) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public void updateByte(int arg0, byte arg1) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public void updateByte(String arg0, byte arg1) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public void updateBytes(int arg0, byte[] arg1) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public void updateBytes(String arg0, byte[] arg1) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public void updateCharacterStream(int arg0, Reader arg1) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
- public void updateCharacterStream(String arg0, Reader arg1) throws SQLException
+ public void updateCharacterStream(int arg0, Reader arg1, int arg2) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
- public void updateCharacterStream(int arg0, Reader arg1, int arg2) throws SQLException
+ public void updateCharacterStream(int arg0, Reader arg1, long arg2) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
- public void updateCharacterStream(String arg0, Reader arg1, int arg2) throws SQLException
+ public void updateCharacterStream(String arg0, Reader arg1) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
- public void updateCharacterStream(int arg0, Reader arg1, long arg2) throws SQLException
+ public void updateCharacterStream(String arg0, Reader arg1, int arg2) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public void updateCharacterStream(String arg0, Reader arg1, long arg2) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public void updateClob(int arg0, Clob arg1) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
- public void updateClob(String arg0, Clob arg1) throws SQLException
+ public void updateClob(int arg0, Reader arg1) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
- public void updateClob(int arg0, Reader arg1) throws SQLException
+ public void updateClob(int arg0, Reader arg1, long arg2) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
- public void updateClob(String arg0, Reader arg1) throws SQLException
+ public void updateClob(String arg0, Clob arg1) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
- public void updateClob(int arg0, Reader arg1, long arg2) throws SQLException
+ public void updateClob(String arg0, Reader arg1) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public void updateClob(String arg0, Reader arg1, long arg2) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public void updateDate(int arg0, Date arg1) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public void updateDate(String arg0, Date arg1) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public void updateDouble(int arg0, double arg1) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public void updateDouble(String arg0, double arg1) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public void updateFloat(int arg0, float arg1) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public void updateFloat(String arg0, float arg1) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public void updateInt(int arg0, int arg1) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public void updateInt(String arg0, int arg1) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public void updateLong(int arg0, long arg1) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public void updateLong(String arg0, long arg1) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public void updateNCharacterStream(int arg0, Reader arg1) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
- public void updateNCharacterStream(String arg0, Reader arg1) throws SQLException
+ public void updateNCharacterStream(int arg0, Reader arg1, long arg2) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
- public void updateNCharacterStream(int arg0, Reader arg1, long arg2) throws SQLException
+ public void updateNCharacterStream(String arg0, Reader arg1) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public void updateNCharacterStream(String arg0, Reader arg1, long arg2) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public void updateNClob(int arg0, NClob arg1) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
- public void updateNClob(String arg0, NClob arg1) throws SQLException
+ public void updateNClob(int arg0, Reader arg1) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
- public void updateNClob(int arg0, Reader arg1) throws SQLException
+ public void updateNClob(int arg0, Reader arg1, long arg2) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
- public void updateNClob(String arg0, Reader arg1) throws SQLException
+ public void updateNClob(String arg0, NClob arg1) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
- public void updateNClob(int arg0, Reader arg1, long arg2) throws SQLException
+ public void updateNClob(String arg0, Reader arg1) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public void updateNClob(String arg0, Reader arg1, long arg2) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public void updateNString(int arg0, String arg1) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public void updateNString(String arg0, String arg1) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public void updateNull(int arg0) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public void updateNull(String arg0) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public void updateObject(int arg0, Object arg1) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
- public void updateObject(String arg0, Object arg1) throws SQLException
+ public void updateObject(int arg0, Object arg1, int arg2) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
- public void updateObject(int arg0, Object arg1, int arg2) throws SQLException
+ public void updateObject(String arg0, Object arg1) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public void updateObject(String arg0, Object arg1, int arg2) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public void updateRef(int arg0, Ref arg1) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public void updateRef(String arg0, Ref arg1) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public void updateRow() throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public void updateRowId(int arg0, RowId arg1) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public void updateRowId(String arg0, RowId arg1) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
- public void updateSQLXML(int arg0, SQLXML arg1) throws SQLException
+ public void updateShort(int arg0, short arg1) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
- public void updateSQLXML(String arg0, SQLXML arg1) throws SQLException
+ public void updateShort(String arg0, short arg1) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
- public void updateShort(int arg0, short arg1) throws SQLException
+ public void updateSQLXML(int arg0, SQLXML arg1) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
- public void updateShort(String arg0, short arg1) throws SQLException
+ public void updateSQLXML(String arg0, SQLXML arg1) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public void updateString(int arg0, String arg1) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public void updateString(String arg0, String arg1) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public void updateTime(int arg0, Time arg1) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public void updateTime(String arg0, Time arg1) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public void updateTimestamp(int arg0, Timestamp arg1) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
public void updateTimestamp(String arg0, Timestamp arg1) throws SQLException
{
- throw new UnsupportedOperationException("method not supported");
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
}
}
Added: cassandra/drivers/java/src/org/apache/cassandra/cql/jdbc/AbstractStatement.java
URL: http://svn.apache.org/viewvc/cassandra/drivers/java/src/org/apache/cassandra/cql/jdbc/AbstractStatement.java?rev=1137231&view=auto
==============================================================================
--- cassandra/drivers/java/src/org/apache/cassandra/cql/jdbc/AbstractStatement.java (added)
+++ cassandra/drivers/java/src/org/apache/cassandra/cql/jdbc/AbstractStatement.java Sat Jun 18 19:19:13 2011
@@ -0,0 +1,128 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.cassandra.cql.jdbc;
+
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.SQLFeatureNotSupportedException;
+
+public class AbstractStatement
+{
+ protected static final String NOT_SUPPORTED = "the Cassandra implementation does not support this method";
+
+ public void cancel() throws SQLException
+ {
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
+ }
+
+ public boolean execute(String arg0, int[] arg1) throws SQLException
+ {
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
+ }
+
+ public boolean execute(String arg0, String[] arg1) throws SQLException
+ {
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
+ }
+
+ public int executeUpdate(String arg0, int[] arg1) throws SQLException
+ {
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
+ }
+
+ public int executeUpdate(String arg0, String[] arg1) throws SQLException
+ {
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
+ }
+ public ResultSet getGeneratedKeys() throws SQLException
+ {
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
+ }
+
+ public void setCursorName(String arg0) throws SQLException
+ {
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
+ }
+}
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.cassandra.cql.jdbc;
+
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.SQLFeatureNotSupportedException;
+
+public class AbstractStatement
+{
+ protected static final String NOT_SUPPORTED = "the Cassandra implementation does not support this method";
+
+ public void cancel() throws SQLException
+ {
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
+ }
+
+ public boolean execute(String arg0, int[] arg1) throws SQLException
+ {
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
+ }
+
+ public boolean execute(String arg0, String[] arg1) throws SQLException
+ {
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
+ }
+
+ public int executeUpdate(String arg0, int[] arg1) throws SQLException
+ {
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
+ }
+
+ public int executeUpdate(String arg0, String[] arg1) throws SQLException
+ {
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
+ }
+ public ResultSet getGeneratedKeys() throws SQLException
+ {
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
+ }
+
+ public void setCursorName(String arg0) throws SQLException
+ {
+ throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
+ }
+}