harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ton...@apache.org
Subject svn commit: r598905 - in /harmony/enhanced/classlib/trunk/modules/sql/src: main/java/org/apache/harmony/sql/internal/rowset/SyncResolverImpl.java test/java/org/apache/harmony/sql/tests/internal/rowset/SyncResolverTest.java
Date Wed, 28 Nov 2007 08:25:51 GMT
Author: tonywu
Date: Wed Nov 28 00:25:51 2007
New Revision: 598905

URL: http://svn.apache.org/viewvc?rev=598905&view=rev
Log:
Apply patch HARMONY-5212 ([classlib][sql] add org.apache.harmony.sql.internal.rowset.SyncResolverImpl
implement javax.sql.rowset.spi.SyncResolver)

Added:
    harmony/enhanced/classlib/trunk/modules/sql/src/main/java/org/apache/harmony/sql/internal/rowset/SyncResolverImpl.java
  (with props)
    harmony/enhanced/classlib/trunk/modules/sql/src/test/java/org/apache/harmony/sql/tests/internal/rowset/SyncResolverTest.java
  (with props)

Added: harmony/enhanced/classlib/trunk/modules/sql/src/main/java/org/apache/harmony/sql/internal/rowset/SyncResolverImpl.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/sql/src/main/java/org/apache/harmony/sql/internal/rowset/SyncResolverImpl.java?rev=598905&view=auto
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/sql/src/main/java/org/apache/harmony/sql/internal/rowset/SyncResolverImpl.java
(added)
+++ harmony/enhanced/classlib/trunk/modules/sql/src/main/java/org/apache/harmony/sql/internal/rowset/SyncResolverImpl.java
Wed Nov 28 00:25:51 2007
@@ -0,0 +1,646 @@
+/* 
+ * 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.harmony.sql.internal.rowset;
+
+import java.io.InputStream;
+import java.io.Reader;
+import java.math.BigDecimal;
+import java.sql.Array;
+import java.sql.Blob;
+import java.sql.Clob;
+import java.sql.Date;
+import java.sql.Ref;
+import java.sql.ResultSetMetaData;
+import java.sql.SQLException;
+import java.sql.SQLWarning;
+import java.sql.Statement;
+import java.sql.Time;
+import java.sql.Timestamp;
+import java.util.Calendar;
+import java.util.Map;
+
+import javax.sql.rowset.BaseRowSet;
+import javax.sql.rowset.spi.SyncResolver;
+
+import org.apache.harmony.luni.util.NotImplementedException;
+
+/**
+ * TODO seems RI's implementation is not complete, now we follow RI throw
+ * <code>UnsupportedOperationException</code>. To complete implementation of
+ * this class may need extends
+ * org.apache.harmony.sql.internal.rowset.CachedRowSetImpl class
+ * 
+ */
+public class SyncResolverImpl extends BaseRowSet implements SyncResolver {
+
+    private static final long serialVersionUID = 4964648528867743289L;
+
+    public Object getConflictValue(int index) throws SQLException {
+        // TODO not yet implemented
+        throw new NotImplementedException();
+    }
+
+    public Object getConflictValue(String columnName) throws SQLException {
+        // TODO not yet implemented
+        throw new NotImplementedException();
+    }
+
+    public int getStatus() {
+        // TODO not yet implemented
+        throw new NotImplementedException();
+    }
+
+    public boolean nextConflict() throws SQLException {
+        // TODO not yet implemented
+        throw new NotImplementedException();
+    }
+
+    public boolean previousConflict() throws SQLException {
+        // TODO not yet implemented
+        throw new NotImplementedException();
+    }
+
+    public void setResolvedValue(int index, Object obj) throws SQLException {
+        // TODO not yet implemented
+        throw new NotImplementedException();
+
+    }
+
+    public void setResolvedValue(String columnName, Object obj)
+            throws SQLException {
+        // TODO not yet implemented
+        throw new NotImplementedException();
+
+    }
+
+    public int getRow() throws SQLException {
+        // TODO not yet implemented
+        throw new NotImplementedException();
+    }
+
+    public void execute() throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public boolean absolute(int row) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public void afterLast() throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public void beforeFirst() throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public void cancelRowUpdates() throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public void clearWarnings() throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public void close() throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public void deleteRow() throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public int findColumn(String columnName) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public boolean first() throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public Array getArray(int columnIndex) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public Array getArray(String colName) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public InputStream getAsciiStream(int columnIndex) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public InputStream getAsciiStream(String columnName) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public BigDecimal getBigDecimal(int columnIndex) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public BigDecimal getBigDecimal(int columnIndex, int scale)
+            throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public BigDecimal getBigDecimal(String columnName) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public BigDecimal getBigDecimal(String columnName, int scale)
+            throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public InputStream getBinaryStream(int columnIndex) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public InputStream getBinaryStream(String columnName) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public Blob getBlob(int columnIndex) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public Blob getBlob(String columnName) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public boolean getBoolean(int columnIndex) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public boolean getBoolean(String columnName) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public byte getByte(int columnIndex) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public byte getByte(String columnName) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public byte[] getBytes(int columnIndex) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public byte[] getBytes(String columnName) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public Reader getCharacterStream(int columnIndex) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public Reader getCharacterStream(String columnName) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public Clob getClob(int columnIndex) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public Clob getClob(String colName) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public String getCursorName() throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public Date getDate(int columnIndex) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public Date getDate(int columnIndex, Calendar cal) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public Date getDate(String columnName) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public Date getDate(String columnName, Calendar cal) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public double getDouble(int columnIndex) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public double getDouble(String columnName) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public float getFloat(int columnIndex) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public float getFloat(String columnName) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public int getInt(int columnIndex) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public int getInt(String columnName) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public long getLong(int columnIndex) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public long getLong(String columnName) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public ResultSetMetaData getMetaData() throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public Object getObject(int columnIndex) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public Object getObject(int columnIndex, Map<String, Class<?>> map)
+            throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public Object getObject(String columnName) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public Object getObject(String columnName, Map<String, Class<?>> map)
+            throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public Ref getRef(int columnIndex) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public Ref getRef(String colName) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public short getShort(int columnIndex) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public short getShort(String columnName) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public Statement getStatement() throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public String getString(int columnIndex) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public String getString(String columnName) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public Time getTime(int columnIndex) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public Time getTime(int columnIndex, Calendar cal) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public Time getTime(String columnName) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public Time getTime(String columnName, Calendar cal) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public Timestamp getTimestamp(int columnIndex) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public Timestamp getTimestamp(int columnIndex, Calendar cal)
+            throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public Timestamp getTimestamp(String columnName) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public Timestamp getTimestamp(String columnName, Calendar cal)
+            throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public java.net.URL getURL(int columnIndex) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public java.net.URL getURL(String columnName) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public InputStream getUnicodeStream(int columnIndex) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public InputStream getUnicodeStream(String columnName) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public SQLWarning getWarnings() throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public void insertRow() throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public boolean isAfterLast() throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public boolean isBeforeFirst() throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public boolean isFirst() throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public boolean isLast() throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public boolean last() throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public void moveToCurrentRow() throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public void moveToInsertRow() throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public boolean next() throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public boolean previous() throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public void refreshRow() throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public boolean relative(int rows) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public boolean rowDeleted() throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public boolean rowInserted() throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public boolean rowUpdated() throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public void updateArray(int columnIndex, Array x) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public void updateArray(String columnName, Array x) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public void updateAsciiStream(int columnIndex, InputStream x, int length)
+            throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public void updateAsciiStream(String columnName, InputStream x, int length)
+            throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public void updateBigDecimal(int columnIndex, BigDecimal x)
+            throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public void updateBigDecimal(String columnName, BigDecimal x)
+            throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public void updateBinaryStream(int columnIndex, InputStream x, int length)
+            throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public void updateBinaryStream(String columnName, InputStream x, int length)
+            throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public void updateBlob(int columnIndex, Blob x) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public void updateBlob(String columnName, Blob x) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public void updateBoolean(int columnIndex, boolean x) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public void updateBoolean(String columnName, boolean x) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public void updateByte(int columnIndex, byte x) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public void updateByte(String columnName, byte x) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public void updateBytes(int columnIndex, byte[] x) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public void updateBytes(String columnName, byte[] x) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public void updateCharacterStream(int columnIndex, Reader x, int length)
+            throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public void updateCharacterStream(String columnName, Reader reader,
+            int length) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public void updateClob(int columnIndex, Clob x) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public void updateClob(String columnName, Clob x) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public void updateDate(int columnIndex, Date x) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public void updateDate(String columnName, Date x) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public void updateDouble(int columnIndex, double x) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public void updateDouble(String columnName, double x) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public void updateFloat(int columnIndex, float x) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public void updateFloat(String columnName, float x) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public void updateInt(int columnIndex, int x) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public void updateInt(String columnName, int x) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public void updateLong(int columnIndex, long x) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public void updateLong(String columnName, long x) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public void updateNull(int columnIndex) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public void updateNull(String columnName) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public void updateObject(int columnIndex, Object x) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public void updateObject(int columnIndex, Object x, int scale)
+            throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public void updateObject(String columnName, Object x) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public void updateObject(String columnName, Object x, int scale)
+            throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public void updateRef(int columnIndex, Ref x) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public void updateRef(String columnName, Ref x) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public void updateRow() throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public void updateShort(int columnIndex, short x) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public void updateShort(String columnName, short x) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public void updateString(int columnIndex, String x) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public void updateString(String columnName, String x) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public void updateTime(int columnIndex, Time x) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public void updateTime(String columnName, Time x) throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public void updateTimestamp(int columnIndex, Timestamp x)
+            throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public void updateTimestamp(String columnName, Timestamp x)
+            throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+    public boolean wasNull() throws SQLException {
+        throw new UnsupportedOperationException();
+    }
+
+}

Propchange: harmony/enhanced/classlib/trunk/modules/sql/src/main/java/org/apache/harmony/sql/internal/rowset/SyncResolverImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/classlib/trunk/modules/sql/src/test/java/org/apache/harmony/sql/tests/internal/rowset/SyncResolverTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/org/apache/harmony/sql/tests/internal/rowset/SyncResolverTest.java?rev=598905&view=auto
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/sql/src/test/java/org/apache/harmony/sql/tests/internal/rowset/SyncResolverTest.java
(added)
+++ harmony/enhanced/classlib/trunk/modules/sql/src/test/java/org/apache/harmony/sql/tests/internal/rowset/SyncResolverTest.java
Wed Nov 28 00:25:51 2007
@@ -0,0 +1,267 @@
+/* 
+ * 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.harmony.sql.tests.internal.rowset;
+
+import javax.sql.rowset.spi.SyncResolver;
+
+import org.apache.harmony.sql.internal.rowset.SyncResolverImpl;
+
+public class SyncResolverTest extends CachedRowSetTestCase {
+    @Override
+    public void setUp() throws Exception {
+        super.setUp();
+    }
+
+    @Override
+    public void tearDown() throws Exception {
+        super.tearDown();
+    }
+
+    public void testNotSupportMethods() throws Exception {
+        /*
+         * TODO uncomment below fragment code when Harmony support detect
+         * conflict, so the test can run on both RI and Harmony
+         */
+        // CachedRowSet copy = crset.createCopy();
+        //
+        // copy.absolute(3);
+        // crset.absolute(3);
+        //
+        // copy.updateString(2, "updated");
+        // assertEquals("updated", copy.getString(2));
+        // assertEquals("test3", crset.getString(2));
+        //
+        // copy.updateRow();
+        // copy.acceptChanges();
+        //
+        // assertEquals(copy.getString(2), "updated");
+        // assertEquals(crset.getString(2), "test3");
+        //
+        // crset.updateString(2, "again");
+        //
+        // assertEquals(copy.getString(2), "updated");
+        // assertEquals(crset.getString(2), "again");
+        //
+        // crset.updateRow();
+        //
+        // SyncProviderException ex = null;
+        // try {
+        // crset.acceptChanges(conn);
+        // } catch (SyncProviderException e) {
+        // ex = e;
+        // }
+        //
+        // SyncResolver resolver = ex.getSyncResolver();
+        SyncResolver resolver = new SyncResolverImpl();
+
+        try {
+            resolver.absolute(1);
+            fail("Should throw UnsupportedOperationException");
+        } catch (UnsupportedOperationException e) {
+            // expected
+        }
+        try {
+            resolver.relative(1);
+            fail("Should throw UnsupportedOperationException");
+        } catch (UnsupportedOperationException e) {
+            // expected
+        }
+        try {
+            resolver.next();
+            fail("Should throw UnsupportedOperationException");
+        } catch (UnsupportedOperationException e) {
+            // expected
+        }
+        try {
+            resolver.previous();
+            fail("Should throw UnsupportedOperationException");
+        } catch (UnsupportedOperationException e) {
+            // expected
+        }
+        try {
+            resolver.isAfterLast();
+            fail("Should throw UnsupportedOperationException");
+        } catch (UnsupportedOperationException e) {
+            // expected
+        }
+        try {
+            resolver.isBeforeFirst();
+            fail("Should throw UnsupportedOperationException");
+        } catch (UnsupportedOperationException e) {
+            // expected
+        }
+        try {
+            resolver.isFirst();
+            fail("Should throw UnsupportedOperationException");
+        } catch (UnsupportedOperationException e) {
+            // expected
+        }
+        try {
+            resolver.isLast();
+            fail("Should throw UnsupportedOperationException");
+        } catch (UnsupportedOperationException e) {
+            // expected
+        }
+        try {
+            resolver.getMetaData();
+            fail("Should throw UnsupportedOperationException");
+        } catch (UnsupportedOperationException e) {
+            // expected
+        }
+
+        try {
+            resolver.getString(2);
+            fail("Should throw UnsupportedOperationException");
+        } catch (UnsupportedOperationException e) {
+            // expected
+        }
+
+        try {
+            resolver.getCursorName();
+            fail("Should throw UnsupportedOperationException");
+        } catch (UnsupportedOperationException e) {
+            // expected
+        }
+
+        try {
+            resolver.updateString(2, "hello");
+            fail("Should throw UnsupportedOperationException");
+        } catch (UnsupportedOperationException e) {
+            // expected
+        }
+
+        try {
+            resolver.rowDeleted();
+            fail("Should throw UnsupportedOperationException");
+        } catch (UnsupportedOperationException e) {
+            // expected
+        }
+
+        try {
+            resolver.rowInserted();
+            fail("Should throw UnsupportedOperationException");
+        } catch (UnsupportedOperationException e) {
+            // expected
+        }
+
+        try {
+            resolver.rowUpdated();
+            fail("Should throw UnsupportedOperationException");
+        } catch (UnsupportedOperationException e) {
+            // expected
+        }
+
+        try {
+            resolver.getWarnings();
+            fail("Should throw UnsupportedOperationException");
+        } catch (UnsupportedOperationException e) {
+            // expected
+        }
+
+        try {
+            resolver.getStatement();
+            fail("Should throw UnsupportedOperationException");
+        } catch (UnsupportedOperationException e) {
+            // expected
+        }
+
+        try {
+            resolver.findColumn("ID");
+            fail("Should throw UnsupportedOperationException");
+        } catch (UnsupportedOperationException e) {
+            // expected
+        }
+
+        try {
+            resolver.wasNull();
+            fail("Should throw UnsupportedOperationException");
+        } catch (UnsupportedOperationException e) {
+            // expected
+        }
+
+        try {
+            resolver.moveToCurrentRow();
+            fail("Should throw UnsupportedOperationException");
+        } catch (UnsupportedOperationException e) {
+            // expected
+        }
+
+        try {
+            resolver.moveToInsertRow();
+            fail("Should throw UnsupportedOperationException");
+        } catch (UnsupportedOperationException e) {
+            // expected
+        }
+
+        try {
+            resolver.refreshRow();
+            fail("Should throw UnsupportedOperationException");
+        } catch (UnsupportedOperationException e) {
+            // expected
+        }
+
+        try {
+            resolver.execute();
+            fail("Should throw UnsupportedOperationException");
+        } catch (UnsupportedOperationException e) {
+            // expected
+        }
+
+        try {
+            resolver.clearWarnings();
+            fail("Should throw UnsupportedOperationException");
+        } catch (UnsupportedOperationException e) {
+            // expected
+        }
+
+        try {
+            resolver.deleteRow();
+            fail("Should throw UnsupportedOperationException");
+        } catch (UnsupportedOperationException e) {
+            // expected
+        }
+
+        try {
+            resolver.insertRow();
+            fail("Should throw UnsupportedOperationException");
+        } catch (UnsupportedOperationException e) {
+            // expected
+        }
+
+        try {
+            resolver.updateRow();
+            fail("Should throw UnsupportedOperationException");
+        } catch (UnsupportedOperationException e) {
+            // expected
+        }
+
+        try {
+            resolver.cancelRowUpdates();
+            fail("Should throw UnsupportedOperationException");
+        } catch (UnsupportedOperationException e) {
+            // expected
+        }
+
+        try {
+            resolver.close();
+            fail("Should throw UnsupportedOperationException");
+        } catch (UnsupportedOperationException e) {
+            // expected
+        }
+    }
+}

Propchange: harmony/enhanced/classlib/trunk/modules/sql/src/test/java/org/apache/harmony/sql/tests/internal/rowset/SyncResolverTest.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message