You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-dev@jackrabbit.apache.org by Michael Dürig <md...@apache.org> on 2015/06/11 10:05:22 UTC

Re: svn commit: r1684669 - in /jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document: ./ rdb/


On 10.6.15 3:21 , reschke@apache.org wrote:
> Author: reschke
> Date: Wed Jun 10 13:21:45 2015
> New Revision: 1684669
>
> URL: http://svn.apache.org/r1684669
> Log:
> OAK-1266: DataSourceWrapper for RDBDocumentStore tests that implements some logging
>
> Added:
>      jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBConnectionWrapper.java   (with props)
>      jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBDataSourceWrapper.java   (with props)
>      jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBLogEntry.java   (with props)
>      jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBPreparedStatementWrapper.java   (with props)
>      jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBResultSetWrapper.java   (with props)
> Modified:
>      jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentStoreFixture.java

This breaks compilation on 1.6:

[ERROR] /home/jenkins/jenkins-slave/workspace/Apache Jackrabbit Oak 
matrix/jdk/jdk-1.6u45/label/Ubuntu/nsfixtures/SEGMENT_MK/profile/unittesting/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBResultSetWrapper.java:[292,24] 
cannot find symbol
symbol  : method getObject(int,java.lang.Class<T>)
location: interface java.sql.ResultSet


See e.g. 
https://builds.apache.org/job/Apache%20Jackrabbit%20Oak%20matrix/191/jdk=jdk-1.6u45,label=Ubuntu,nsfixtures=SEGMENT_MK,profile=unittesting/console

Michael
>
> Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentStoreFixture.java
> URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentStoreFixture.java?rev=1684669&r1=1684668&r2=1684669&view=diff
> ==============================================================================
> --- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentStoreFixture.java (original)
> +++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentStoreFixture.java Wed Jun 10 13:21:45 2015
> @@ -21,6 +21,7 @@ import javax.sql.DataSource;
>   import org.apache.jackrabbit.oak.plugins.document.memory.MemoryDocumentStore;
>   import org.apache.jackrabbit.oak.plugins.document.mongo.MongoDocumentStore;
>   import org.apache.jackrabbit.oak.plugins.document.rdb.RDBDataSourceFactory;
> +import org.apache.jackrabbit.oak.plugins.document.rdb.RDBDataSourceWrapper;
>   import org.apache.jackrabbit.oak.plugins.document.rdb.RDBDocumentStore;
>   import org.apache.jackrabbit.oak.plugins.document.rdb.RDBOptions;
>   import org.apache.jackrabbit.oak.plugins.document.util.MongoConnection;
> @@ -119,7 +120,7 @@ public abstract class DocumentStoreFixtu
>           public RDBFixture(String name, String url, String username, String passwd) {
>               this.name = name;
>               try {
> -                dataSource = RDBDataSourceFactory.forJdbcUrl(url, username, passwd);
> +                dataSource = new RDBDataSourceWrapper(RDBDataSourceFactory.forJdbcUrl(url, username, passwd));
>               } catch (Exception ex) {
>                   LOG.info("Database instance not available at " + url + ", skipping tests...", ex);
>               }
>
> Added: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBConnectionWrapper.java
> URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBConnectionWrapper.java?rev=1684669&view=auto
> ==============================================================================
> --- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBConnectionWrapper.java (added)
> +++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBConnectionWrapper.java Wed Jun 10 13:21:45 2015
> @@ -0,0 +1,331 @@
> +/*
> + * 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.jackrabbit.oak.plugins.document.rdb;
> +
> +import java.sql.Array;
> +import java.sql.Blob;
> +import java.sql.CallableStatement;
> +import java.sql.Clob;
> +import java.sql.Connection;
> +import java.sql.DatabaseMetaData;
> +import java.sql.NClob;
> +import java.sql.PreparedStatement;
> +import java.sql.SQLClientInfoException;
> +import java.sql.SQLException;
> +import java.sql.SQLWarning;
> +import java.sql.SQLXML;
> +import java.sql.Savepoint;
> +import java.sql.Statement;
> +import java.sql.Struct;
> +import java.util.List;
> +import java.util.Map;
> +import java.util.Properties;
> +import java.util.concurrent.Executor;
> +
> +public class RDBConnectionWrapper implements Connection {
> +
> +    private final RDBDataSourceWrapper datasource;
> +    private final Connection connection;
> +    private final long constart;
> +
> +    public RDBConnectionWrapper(RDBDataSourceWrapper datasource, Connection connection) {
> +        this.datasource = datasource;
> +        this.connection = connection;
> +        this.constart = System.nanoTime();
> +    }
> +
> +    public void abort(Executor arg0) throws SQLException {
> +        connection.abort(arg0);
> +    }
> +
> +    public void clearWarnings() throws SQLException {
> +        connection.clearWarnings();
> +    }
> +
> +    public void close() throws SQLException {
> +        long start = System.nanoTime();
> +        SQLException x = null;
> +        try {
> +            connection.close();
> +        } catch (SQLException ex) {
> +            x = ex;
> +            throw ex;
> +        } finally {
> +            List<RDBLogEntry> l = datasource.getLog();
> +            if (l != null) {
> +                String message = "connection.close() after " + ((start - constart) / 1000) + "us";
> +                if (x != null) {
> +                    message += " " + x.getMessage();
> +                }
> +                l.add(new RDBLogEntry(start, message));
> +            }
> +        }
> +    }
> +
> +    public void commit() throws SQLException {
> +        long start = System.nanoTime();
> +        SQLException x = null;
> +        try {
> +            connection.commit();
> +        } catch (SQLException ex) {
> +            x = ex;
> +            throw ex;
> +        } finally {
> +            List<RDBLogEntry> l = datasource.getLog();
> +            if (l != null) {
> +                String message = "connection.commit()";
> +                if (x != null) {
> +                    message += " " + x.getMessage();
> +                }
> +                l.add(new RDBLogEntry(start, message));
> +            }
> +        }
> +    }
> +
> +    public Array createArrayOf(String arg0, Object[] arg1) throws SQLException {
> +        return connection.createArrayOf(arg0, arg1);
> +    }
> +
> +    public Blob createBlob() throws SQLException {
> +        return connection.createBlob();
> +    }
> +
> +    public Clob createClob() throws SQLException {
> +        return connection.createClob();
> +    }
> +
> +    public NClob createNClob() throws SQLException {
> +        return connection.createNClob();
> +    }
> +
> +    public SQLXML createSQLXML() throws SQLException {
> +        return connection.createSQLXML();
> +    }
> +
> +    public Statement createStatement() throws SQLException {
> +        return connection.createStatement();
> +    }
> +
> +    public Statement createStatement(int arg0, int arg1, int arg2) throws SQLException {
> +        return connection.createStatement(arg0, arg1, arg2);
> +    }
> +
> +    public Statement createStatement(int arg0, int arg1) throws SQLException {
> +        return connection.createStatement(arg0, arg1);
> +    }
> +
> +    public Struct createStruct(String arg0, Object[] arg1) throws SQLException {
> +        return connection.createStruct(arg0, arg1);
> +    }
> +
> +    public boolean getAutoCommit() throws SQLException {
> +        return connection.getAutoCommit();
> +    }
> +
> +    public String getCatalog() throws SQLException {
> +        return connection.getCatalog();
> +    }
> +
> +    public Properties getClientInfo() throws SQLException {
> +        return connection.getClientInfo();
> +    }
> +
> +    public String getClientInfo(String arg0) throws SQLException {
> +        return connection.getClientInfo(arg0);
> +    }
> +
> +    public int getHoldability() throws SQLException {
> +        return connection.getHoldability();
> +    }
> +
> +    public DatabaseMetaData getMetaData() throws SQLException {
> +        return connection.getMetaData();
> +    }
> +
> +    public int getNetworkTimeout() throws SQLException {
> +        return connection.getNetworkTimeout();
> +    }
> +
> +    public String getSchema() throws SQLException {
> +        return connection.getSchema();
> +    }
> +
> +    public int getTransactionIsolation() throws SQLException {
> +        return connection.getTransactionIsolation();
> +    }
> +
> +    public Map<String, Class<?>> getTypeMap() throws SQLException {
> +        return connection.getTypeMap();
> +    }
> +
> +    public SQLWarning getWarnings() throws SQLException {
> +        return connection.getWarnings();
> +    }
> +
> +    public boolean isClosed() throws SQLException {
> +        return connection.isClosed();
> +    }
> +
> +    public boolean isReadOnly() throws SQLException {
> +        return connection.isReadOnly();
> +    }
> +
> +    public boolean isValid(int arg0) throws SQLException {
> +        return connection.isValid(arg0);
> +    }
> +
> +    public boolean isWrapperFor(Class<?> iface) throws SQLException {
> +        return connection.isWrapperFor(iface);
> +    }
> +
> +    public String nativeSQL(String arg0) throws SQLException {
> +        return connection.nativeSQL(arg0);
> +    }
> +
> +    public CallableStatement prepareCall(String arg0, int arg1, int arg2, int arg3) throws SQLException {
> +        return connection.prepareCall(arg0, arg1, arg2, arg3);
> +    }
> +
> +    public CallableStatement prepareCall(String arg0, int arg1, int arg2) throws SQLException {
> +        return connection.prepareCall(arg0, arg1, arg2);
> +    }
> +
> +    public CallableStatement prepareCall(String arg0) throws SQLException {
> +        return connection.prepareCall(arg0);
> +    }
> +
> +    public PreparedStatement prepareStatement(String arg0, int arg1, int arg2, int arg3) throws SQLException {
> +        return connection.prepareStatement(arg0, arg1, arg2, arg3);
> +    }
> +
> +    public PreparedStatement prepareStatement(String arg0, int arg1, int arg2) throws SQLException {
> +        return connection.prepareStatement(arg0, arg1, arg2);
> +    }
> +
> +    public PreparedStatement prepareStatement(String arg0, int arg1) throws SQLException {
> +        return connection.prepareStatement(arg0, arg1);
> +    }
> +
> +    public PreparedStatement prepareStatement(String arg0, int[] arg1) throws SQLException {
> +        return connection.prepareStatement(arg0, arg1);
> +    }
> +
> +    public PreparedStatement prepareStatement(String arg0, String[] arg1) throws SQLException {
> +        return connection.prepareStatement(arg0, arg1);
> +    }
> +
> +    public PreparedStatement prepareStatement(String sql) throws SQLException {
> +        long start = System.nanoTime();
> +        SQLException x = null;
> +        try {
> +            PreparedStatement statement = connection.prepareStatement(sql);
> +            return new RDBPreparedStatementWrapper(datasource, statement);
> +        } catch (SQLException ex) {
> +            x = ex;
> +            throw ex;
> +        } finally {
> +            List<RDBLogEntry> l = datasource.getLog();
> +            if (l != null) {
> +                String message = "connection.prepareStatement(\"" + sql + "\")";
> +                if (x != null) {
> +                    message += " " + x.getMessage();
> +                }
> +                l.add(new RDBLogEntry(start, message));
> +            }
> +        }
> +    }
> +
> +    public void releaseSavepoint(Savepoint arg0) throws SQLException {
> +        connection.releaseSavepoint(arg0);
> +    }
> +
> +    public void rollback() throws SQLException {
> +        long start = System.nanoTime();
> +        SQLException x = null;
> +        try {
> +            connection.rollback();
> +        } catch (SQLException ex) {
> +            x = ex;
> +            throw ex;
> +        } finally {
> +            List<RDBLogEntry> l = datasource.getLog();
> +            if (l != null) {
> +                String message = "connection.rollback()";
> +                if (x != null) {
> +                    message += " " + x.getMessage();
> +                }
> +                l.add(new RDBLogEntry(start, message));
> +            }
> +        }
> +    }
> +
> +    public void rollback(Savepoint arg0) throws SQLException {
> +        connection.rollback(arg0);
> +    }
> +
> +    public void setAutoCommit(boolean arg0) throws SQLException {
> +        connection.setAutoCommit(arg0);
> +    }
> +
> +    public void setCatalog(String arg0) throws SQLException {
> +        connection.setCatalog(arg0);
> +    }
> +
> +    public void setClientInfo(Properties arg0) throws SQLClientInfoException {
> +        connection.setClientInfo(arg0);
> +    }
> +
> +    public void setClientInfo(String arg0, String arg1) throws SQLClientInfoException {
> +        connection.setClientInfo(arg0, arg1);
> +    }
> +
> +    public void setHoldability(int arg0) throws SQLException {
> +        connection.setHoldability(arg0);
> +    }
> +
> +    public void setNetworkTimeout(Executor arg0, int arg1) throws SQLException {
> +        connection.setNetworkTimeout(arg0, arg1);
> +    }
> +
> +    public void setReadOnly(boolean arg0) throws SQLException {
> +        connection.setReadOnly(arg0);
> +    }
> +
> +    public Savepoint setSavepoint() throws SQLException {
> +        return connection.setSavepoint();
> +    }
> +
> +    public Savepoint setSavepoint(String arg0) throws SQLException {
> +        return connection.setSavepoint(arg0);
> +    }
> +
> +    public void setSchema(String arg0) throws SQLException {
> +        connection.setSchema(arg0);
> +    }
> +
> +    public void setTransactionIsolation(int arg0) throws SQLException {
> +        connection.setTransactionIsolation(arg0);
> +    }
> +
> +    public void setTypeMap(Map<String, Class<?>> arg0) throws SQLException {
> +        connection.setTypeMap(arg0);
> +    }
> +
> +    public <T> T unwrap(Class<T> iface) throws SQLException {
> +        return connection.unwrap(iface);
> +    }
> +}
>
> Propchange: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBConnectionWrapper.java
> ------------------------------------------------------------------------------
>      svn:eol-style = native
>
> Added: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBDataSourceWrapper.java
> URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBDataSourceWrapper.java?rev=1684669&view=auto
> ==============================================================================
> --- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBDataSourceWrapper.java (added)
> +++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBDataSourceWrapper.java Wed Jun 10 13:21:45 2015
> @@ -0,0 +1,134 @@
> +/*
> + * 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.jackrabbit.oak.plugins.document.rdb;
> +
> +import java.io.PrintWriter;
> +import java.sql.Connection;
> +import java.sql.SQLException;
> +import java.sql.SQLFeatureNotSupportedException;
> +import java.util.ArrayList;
> +import java.util.List;
> +import java.util.Map;
> +import java.util.concurrent.ConcurrentHashMap;
> +import java.util.logging.Logger;
> +
> +import javax.sql.DataSource;
> +
> +/**
> + * A wrapper for {@link DataSource} that offers logging of various
> + * operations.
> + * <p>
> + * Note that the implementations currently focus on method invocations done
> + * by {@link RDBDocumentStore} and thus may not be applicable for other use cases.
> + */
> +public class RDBDataSourceWrapper implements DataSource {
> +
> +    // sample use in BasicDocumentStoreTest:
> +
> +    // to start
> +    // if (super.rdbDataSource != null) {
> +    // ((RDBDataSourceWrapper) super.rdbDataSource).startLog();
> +    // }
> +
> +    // to dump
> +    // if (super.rdbDataSource != null) {
> +    // RDBLogEntry.DUMP(System.err, ((RDBDataSourceWrapper)
> +    // super.rdbDataSource).stopLog());
> +    // }
> +
> +    private final DataSource ds;
> +
> +    // Logging
> +
> +    private Map<Thread, List<RDBLogEntry>> loggerMap = new ConcurrentHashMap<Thread, List<RDBLogEntry>>();
> +
> +    protected List<RDBLogEntry> getLog() {
> +        return loggerMap.get(Thread.currentThread());
> +    }
> +
> +    private void startLog(Thread thread) {
> +        loggerMap.put(thread, new ArrayList<RDBLogEntry>());
> +    }
> +
> +    /**
> +     * Start logging for the current thread.
> +     */
> +    public void startLog() {
> +        startLog(Thread.currentThread());
> +    }
> +
> +    private List<RDBLogEntry> stopLog(Thread thread) {
> +        return loggerMap.remove(thread);
> +    }
> +
> +    /**
> +     * End logging for the current thread and obtain log results.
> +     */
> +    public List<RDBLogEntry> stopLog() {
> +        return stopLog(Thread.currentThread());
> +    }
> +
> +    // DataSource
> +
> +    public RDBDataSourceWrapper(DataSource ds) {
> +        this.ds = ds;
> +    }
> +
> +    public Connection getConnection() throws SQLException {
> +        long start = System.nanoTime();
> +        try {
> +            return new RDBConnectionWrapper(this, ds.getConnection());
> +        } finally {
> +            List<RDBLogEntry> l = getLog();
> +            if (l != null) {
> +                l.add(new RDBLogEntry(start, "got connection"));
> +            }
> +        }
> +    }
> +
> +    public Connection getConnection(String username, String password) throws SQLException {
> +        return ds.getConnection(username, password);
> +    }
> +
> +    public PrintWriter getLogWriter() throws SQLException {
> +        return ds.getLogWriter();
> +    }
> +
> +    public int getLoginTimeout() throws SQLException {
> +        return ds.getLoginTimeout();
> +    }
> +
> +    public Logger getParentLogger() throws SQLFeatureNotSupportedException {
> +        return ds.getParentLogger();
> +    }
> +
> +    public boolean isWrapperFor(Class<?> iface) throws SQLException {
> +        return ds.isWrapperFor(iface);
> +    }
> +
> +    public void setLogWriter(PrintWriter out) throws SQLException {
> +        ds.setLogWriter(out);
> +    }
> +
> +    public void setLoginTimeout(int seconds) throws SQLException {
> +        ds.setLoginTimeout(seconds);
> +    }
> +
> +    public <T> T unwrap(Class<T> iface) throws SQLException {
> +        return ds.unwrap(iface);
> +    }
> +}
>
> Propchange: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBDataSourceWrapper.java
> ------------------------------------------------------------------------------
>      svn:eol-style = native
>
> Added: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBLogEntry.java
> URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBLogEntry.java?rev=1684669&view=auto
> ==============================================================================
> --- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBLogEntry.java (added)
> +++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBLogEntry.java Wed Jun 10 13:21:45 2015
> @@ -0,0 +1,56 @@
> +/*
> + * 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.jackrabbit.oak.plugins.document.rdb;
> +
> +import java.io.PrintStream;
> +import java.util.List;
> +
> +/**
> + * A single item in a log generated by {@link RDBDataSourceWrapper}.
> + */
> +public class RDBLogEntry {
> +
> +    private final long start;
> +    private final long duration;
> +    private final String caller;
> +    private final String message;
> +
> +    public RDBLogEntry(long start, String message) {
> +        this.start = start;
> +        this.duration = System.nanoTime() - this.start;
> +        this.message = message;
> +        String t = null;
> +        for (StackTraceElement ste : new Exception().getStackTrace()) {
> +            if (ste.getClassName().equals(RDBDocumentStore.class.getName())) {
> +                t = ste.getMethodName() + ":" + ste.getLineNumber();
> +            }
> +        }
> +        caller = t;
> +    }
> +
> +    public String toString() {
> +        return String.format("%d %6d %s %s", this.start / 1000, this.duration / 1000, this.caller, this.message);
> +    }
> +
> +    public static void DUMP(PrintStream out, List<RDBLogEntry> log) {
> +        if (log != null) {
> +            for (RDBLogEntry entry : log) {
> +                out.println(entry);
> +            }
> +        }
> +    }
> +}
>
> Propchange: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBLogEntry.java
> ------------------------------------------------------------------------------
>      svn:eol-style = native
>
> Added: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBPreparedStatementWrapper.java
> URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBPreparedStatementWrapper.java?rev=1684669&view=auto
> ==============================================================================
> --- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBPreparedStatementWrapper.java (added)
> +++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBPreparedStatementWrapper.java Wed Jun 10 13:21:45 2015
> @@ -0,0 +1,490 @@
> +/*
> + * 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.jackrabbit.oak.plugins.document.rdb;
> +
> +import java.io.InputStream;
> +import java.io.Reader;
> +import java.math.BigDecimal;
> +import java.net.URL;
> +import java.sql.Array;
> +import java.sql.Blob;
> +import java.sql.Clob;
> +import java.sql.Connection;
> +import java.sql.Date;
> +import java.sql.NClob;
> +import java.sql.ParameterMetaData;
> +import java.sql.PreparedStatement;
> +import java.sql.Ref;
> +import java.sql.ResultSet;
> +import java.sql.ResultSetMetaData;
> +import java.sql.RowId;
> +import java.sql.SQLException;
> +import java.sql.SQLWarning;
> +import java.sql.SQLXML;
> +import java.sql.Time;
> +import java.sql.Timestamp;
> +import java.util.Calendar;
> +import java.util.List;
> +
> +public class RDBPreparedStatementWrapper implements PreparedStatement {
> +
> +    private final RDBDataSourceWrapper datasource;
> +    private final PreparedStatement statement;
> +    private ResultSet resultSet = null;
> +
> +    public RDBPreparedStatementWrapper(RDBDataSourceWrapper datasource, PreparedStatement statement) {
> +        this.datasource = datasource;
> +        this.statement = statement;
> +    }
> +
> +    public void addBatch() throws SQLException {
> +        statement.addBatch();
> +    }
> +
> +    public void addBatch(String sql) throws SQLException {
> +        statement.addBatch(sql);
> +    }
> +
> +    public void cancel() throws SQLException {
> +        statement.cancel();
> +    }
> +
> +    public void clearBatch() throws SQLException {
> +        statement.clearBatch();
> +    }
> +
> +    public void clearParameters() throws SQLException {
> +        statement.clearParameters();
> +    }
> +
> +    public void clearWarnings() throws SQLException {
> +        statement.clearWarnings();
> +    }
> +
> +    public void close() throws SQLException {
> +        if (resultSet != null) {
> +            resultSet.close();
> +        }
> +        statement.close();
> +    }
> +
> +    public void closeOnCompletion() throws SQLException {
> +        statement.closeOnCompletion();
> +    }
> +
> +    public boolean execute() throws SQLException {
> +        return statement.execute();
> +    }
> +
> +    public boolean execute(String sql, int autoGeneratedKeys) throws SQLException {
> +        return statement.execute(sql, autoGeneratedKeys);
> +    }
> +
> +    public boolean execute(String sql, int[] columnIndexes) throws SQLException {
> +        return statement.execute(sql, columnIndexes);
> +    }
> +
> +    public boolean execute(String sql, String[] columnNames) throws SQLException {
> +        return statement.execute(sql, columnNames);
> +    }
> +
> +    public boolean execute(String sql) throws SQLException {
> +        return statement.execute(sql);
> +    }
> +
> +    public int[] executeBatch() throws SQLException {
> +        return statement.executeBatch();
> +    }
> +
> +    public ResultSet executeQuery() throws SQLException {
> +        long start = System.nanoTime();
> +        SQLException x = null;
> +        try {
> +            resultSet = new RDBResultSetWrapper(datasource, statement.executeQuery());
> +            return resultSet;
> +        } catch (SQLException ex) {
> +            x = ex;
> +            throw ex;
> +        } finally {
> +            List<RDBLogEntry> l = datasource.getLog();
> +            if (l != null) {
> +                String message = "statement.executeQuery()";
> +                if (x != null) {
> +                    message += " -> " + x.getMessage();
> +                }
> +                l.add(new RDBLogEntry(start, message));
> +            }
> +        }
> +    }
> +
> +    public ResultSet executeQuery(String sql) throws SQLException {
> +        return statement.executeQuery(sql);
> +    }
> +
> +    public int executeUpdate() throws SQLException {
> +        long start = System.nanoTime();
> +        SQLException x = null;
> +        Integer result = null;
> +        try {
> +            result = statement.executeUpdate();
> +            return result;
> +        } catch (SQLException ex) {
> +            x = ex;
> +            throw ex;
> +        } finally {
> +            List<RDBLogEntry> l = datasource.getLog();
> +            if (l != null) {
> +                String message = "statement.executeUpdate()";
> +                if (result != null) {
> +                    message += " -> " + result;
> +                }
> +                if (x != null) {
> +                    message += " -> " + x.getMessage();
> +                }
> +                l.add(new RDBLogEntry(start, message));
> +            }
> +        }
> +    }
> +
> +    public int executeUpdate(String sql, int autoGeneratedKeys) throws SQLException {
> +        return statement.executeUpdate(sql, autoGeneratedKeys);
> +    }
> +
> +    public int executeUpdate(String sql, int[] columnIndexes) throws SQLException {
> +        return statement.executeUpdate(sql, columnIndexes);
> +    }
> +
> +    public int executeUpdate(String sql, String[] columnNames) throws SQLException {
> +        return statement.executeUpdate(sql, columnNames);
> +    }
> +
> +    public int executeUpdate(String sql) throws SQLException {
> +        return statement.executeUpdate(sql);
> +    }
> +
> +    public Connection getConnection() throws SQLException {
> +        return statement.getConnection();
> +    }
> +
> +    public int getFetchDirection() throws SQLException {
> +        return statement.getFetchDirection();
> +    }
> +
> +    public int getFetchSize() throws SQLException {
> +        return statement.getFetchSize();
> +    }
> +
> +    public ResultSet getGeneratedKeys() throws SQLException {
> +        return statement.getGeneratedKeys();
> +    }
> +
> +    public int getMaxFieldSize() throws SQLException {
> +        return statement.getMaxFieldSize();
> +    }
> +
> +    public int getMaxRows() throws SQLException {
> +        return statement.getMaxRows();
> +    }
> +
> +    public ResultSetMetaData getMetaData() throws SQLException {
> +        return statement.getMetaData();
> +    }
> +
> +    public boolean getMoreResults() throws SQLException {
> +        return statement.getMoreResults();
> +    }
> +
> +    public boolean getMoreResults(int current) throws SQLException {
> +        return statement.getMoreResults(current);
> +    }
> +
> +    public ParameterMetaData getParameterMetaData() throws SQLException {
> +        return statement.getParameterMetaData();
> +    }
> +
> +    public int getQueryTimeout() throws SQLException {
> +        return statement.getQueryTimeout();
> +    }
> +
> +    public ResultSet getResultSet() throws SQLException {
> +        return statement.getResultSet();
> +    }
> +
> +    public int getResultSetConcurrency() throws SQLException {
> +        return statement.getResultSetConcurrency();
> +    }
> +
> +    public int getResultSetHoldability() throws SQLException {
> +        return statement.getResultSetHoldability();
> +    }
> +
> +    public int getResultSetType() throws SQLException {
> +        return statement.getResultSetType();
> +    }
> +
> +    public int getUpdateCount() throws SQLException {
> +        return statement.getUpdateCount();
> +    }
> +
> +    public SQLWarning getWarnings() throws SQLException {
> +        return statement.getWarnings();
> +    }
> +
> +    public boolean isCloseOnCompletion() throws SQLException {
> +        return statement.isCloseOnCompletion();
> +    }
> +
> +    public boolean isClosed() throws SQLException {
> +        return statement.isClosed();
> +    }
> +
> +    public boolean isPoolable() throws SQLException {
> +        return statement.isPoolable();
> +    }
> +
> +    public boolean isWrapperFor(Class<?> iface) throws SQLException {
> +        return statement.isWrapperFor(iface);
> +    }
> +
> +    public void setArray(int parameterIndex, Array x) throws SQLException {
> +        statement.setArray(parameterIndex, x);
> +    }
> +
> +    public void setAsciiStream(int parameterIndex, InputStream x, int length) throws SQLException {
> +        statement.setAsciiStream(parameterIndex, x, length);
> +    }
> +
> +    public void setAsciiStream(int parameterIndex, InputStream x, long length) throws SQLException {
> +        statement.setAsciiStream(parameterIndex, x, length);
> +    }
> +
> +    public void setAsciiStream(int parameterIndex, InputStream x) throws SQLException {
> +        statement.setAsciiStream(parameterIndex, x);
> +    }
> +
> +    public void setBigDecimal(int parameterIndex, BigDecimal x) throws SQLException {
> +        statement.setBigDecimal(parameterIndex, x);
> +    }
> +
> +    public void setBinaryStream(int parameterIndex, InputStream x, int length) throws SQLException {
> +        statement.setBinaryStream(parameterIndex, x, length);
> +    }
> +
> +    public void setBinaryStream(int parameterIndex, InputStream x, long length) throws SQLException {
> +        statement.setBinaryStream(parameterIndex, x, length);
> +    }
> +
> +    public void setBinaryStream(int parameterIndex, InputStream x) throws SQLException {
> +        statement.setBinaryStream(parameterIndex, x);
> +    }
> +
> +    public void setBlob(int parameterIndex, Blob x) throws SQLException {
> +        statement.setBlob(parameterIndex, x);
> +    }
> +
> +    public void setBlob(int parameterIndex, InputStream inputStream, long length) throws SQLException {
> +        statement.setBlob(parameterIndex, inputStream, length);
> +    }
> +
> +    public void setBlob(int parameterIndex, InputStream inputStream) throws SQLException {
> +        statement.setBlob(parameterIndex, inputStream);
> +    }
> +
> +    public void setBoolean(int parameterIndex, boolean x) throws SQLException {
> +        statement.setBoolean(parameterIndex, x);
> +    }
> +
> +    public void setByte(int parameterIndex, byte x) throws SQLException {
> +        statement.setByte(parameterIndex, x);
> +    }
> +
> +    public void setBytes(int parameterIndex, byte[] x) throws SQLException {
> +        statement.setBytes(parameterIndex, x);
> +    }
> +
> +    public void setCharacterStream(int parameterIndex, Reader reader, int length) throws SQLException {
> +        statement.setCharacterStream(parameterIndex, reader, length);
> +    }
> +
> +    public void setCharacterStream(int parameterIndex, Reader reader, long length) throws SQLException {
> +        statement.setCharacterStream(parameterIndex, reader, length);
> +    }
> +
> +    public void setCharacterStream(int parameterIndex, Reader reader) throws SQLException {
> +        statement.setCharacterStream(parameterIndex, reader);
> +    }
> +
> +    public void setClob(int parameterIndex, Clob x) throws SQLException {
> +        statement.setClob(parameterIndex, x);
> +    }
> +
> +    public void setClob(int parameterIndex, Reader reader, long length) throws SQLException {
> +        statement.setClob(parameterIndex, reader, length);
> +    }
> +
> +    public void setClob(int parameterIndex, Reader reader) throws SQLException {
> +        statement.setClob(parameterIndex, reader);
> +    }
> +
> +    public void setCursorName(String name) throws SQLException {
> +        statement.setCursorName(name);
> +    }
> +
> +    public void setDate(int parameterIndex, Date x, Calendar cal) throws SQLException {
> +        statement.setDate(parameterIndex, x, cal);
> +    }
> +
> +    public void setDate(int parameterIndex, Date x) throws SQLException {
> +        statement.setDate(parameterIndex, x);
> +    }
> +
> +    public void setDouble(int parameterIndex, double x) throws SQLException {
> +        statement.setDouble(parameterIndex, x);
> +    }
> +
> +    public void setEscapeProcessing(boolean enable) throws SQLException {
> +        statement.setEscapeProcessing(enable);
> +    }
> +
> +    public void setFetchDirection(int direction) throws SQLException {
> +        statement.setFetchDirection(direction);
> +    }
> +
> +    public void setFetchSize(int rows) throws SQLException {
> +        statement.setFetchSize(rows);
> +    }
> +
> +    public void setFloat(int parameterIndex, float x) throws SQLException {
> +        statement.setFloat(parameterIndex, x);
> +    }
> +
> +    public void setInt(int parameterIndex, int x) throws SQLException {
> +        statement.setInt(parameterIndex, x);
> +    }
> +
> +    public void setLong(int parameterIndex, long x) throws SQLException {
> +        statement.setLong(parameterIndex, x);
> +    }
> +
> +    public void setMaxFieldSize(int max) throws SQLException {
> +        statement.setMaxFieldSize(max);
> +    }
> +
> +    public void setMaxRows(int max) throws SQLException {
> +        statement.setMaxRows(max);
> +    }
> +
> +    public void setNCharacterStream(int parameterIndex, Reader value, long length) throws SQLException {
> +        statement.setNCharacterStream(parameterIndex, value, length);
> +    }
> +
> +    public void setNCharacterStream(int parameterIndex, Reader value) throws SQLException {
> +        statement.setNCharacterStream(parameterIndex, value);
> +    }
> +
> +    public void setNClob(int parameterIndex, NClob value) throws SQLException {
> +        statement.setNClob(parameterIndex, value);
> +    }
> +
> +    public void setNClob(int parameterIndex, Reader reader, long length) throws SQLException {
> +        statement.setNClob(parameterIndex, reader, length);
> +    }
> +
> +    public void setNClob(int parameterIndex, Reader reader) throws SQLException {
> +        statement.setNClob(parameterIndex, reader);
> +    }
> +
> +    public void setNString(int parameterIndex, String value) throws SQLException {
> +        statement.setNString(parameterIndex, value);
> +    }
> +
> +    public void setNull(int parameterIndex, int sqlType, String typeName) throws SQLException {
> +        statement.setNull(parameterIndex, sqlType, typeName);
> +    }
> +
> +    public void setNull(int parameterIndex, int sqlType) throws SQLException {
> +        statement.setNull(parameterIndex, sqlType);
> +    }
> +
> +    public void setObject(int parameterIndex, Object x, int targetSqlType, int scaleOrLength) throws SQLException {
> +        statement.setObject(parameterIndex, x, targetSqlType, scaleOrLength);
> +    }
> +
> +    public void setObject(int parameterIndex, Object x, int targetSqlType) throws SQLException {
> +        statement.setObject(parameterIndex, x, targetSqlType);
> +    }
> +
> +    public void setObject(int parameterIndex, Object x) throws SQLException {
> +        statement.setObject(parameterIndex, x);
> +    }
> +
> +    public void setPoolable(boolean poolable) throws SQLException {
> +        statement.setPoolable(poolable);
> +    }
> +
> +    public void setQueryTimeout(int seconds) throws SQLException {
> +        statement.setQueryTimeout(seconds);
> +    }
> +
> +    public void setRef(int parameterIndex, Ref x) throws SQLException {
> +        statement.setRef(parameterIndex, x);
> +    }
> +
> +    public void setRowId(int parameterIndex, RowId x) throws SQLException {
> +        statement.setRowId(parameterIndex, x);
> +    }
> +
> +    public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException {
> +        statement.setSQLXML(parameterIndex, xmlObject);
> +    }
> +
> +    public void setShort(int parameterIndex, short x) throws SQLException {
> +        statement.setShort(parameterIndex, x);
> +    }
> +
> +    public void setString(int parameterIndex, String x) throws SQLException {
> +        statement.setString(parameterIndex, x);
> +    }
> +
> +    public void setTime(int parameterIndex, Time x, Calendar cal) throws SQLException {
> +        statement.setTime(parameterIndex, x, cal);
> +    }
> +
> +    public void setTime(int parameterIndex, Time x) throws SQLException {
> +        statement.setTime(parameterIndex, x);
> +    }
> +
> +    public void setTimestamp(int parameterIndex, Timestamp x, Calendar cal) throws SQLException {
> +        statement.setTimestamp(parameterIndex, x, cal);
> +    }
> +
> +    public void setTimestamp(int parameterIndex, Timestamp x) throws SQLException {
> +        statement.setTimestamp(parameterIndex, x);
> +    }
> +
> +    public void setURL(int parameterIndex, URL x) throws SQLException {
> +        statement.setURL(parameterIndex, x);
> +    }
> +
> +    public void setUnicodeStream(int parameterIndex, InputStream x, int length) throws SQLException {
> +        statement.setUnicodeStream(parameterIndex, x, length);
> +    }
> +
> +    public <T> T unwrap(Class<T> iface) throws SQLException {
> +        return statement.unwrap(iface);
> +    }
> +}
>
> Propchange: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBPreparedStatementWrapper.java
> ------------------------------------------------------------------------------
>      svn:eol-style = native
>
> Added: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBResultSetWrapper.java
> URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBResultSetWrapper.java?rev=1684669&view=auto
> ==============================================================================
> --- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBResultSetWrapper.java (added)
> +++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBResultSetWrapper.java Wed Jun 10 13:21:45 2015
> @@ -0,0 +1,838 @@
> +/*
> + * 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.jackrabbit.oak.plugins.document.rdb;
> +
> +import java.io.InputStream;
> +import java.io.Reader;
> +import java.math.BigDecimal;
> +import java.net.URL;
> +import java.sql.Array;
> +import java.sql.Blob;
> +import java.sql.Clob;
> +import java.sql.Date;
> +import java.sql.NClob;
> +import java.sql.Ref;
> +import java.sql.ResultSet;
> +import java.sql.ResultSetMetaData;
> +import java.sql.RowId;
> +import java.sql.SQLException;
> +import java.sql.SQLWarning;
> +import java.sql.SQLXML;
> +import java.sql.Statement;
> +import java.sql.Time;
> +import java.sql.Timestamp;
> +import java.util.Calendar;
> +import java.util.List;
> +import java.util.Map;
> +
> +public class RDBResultSetWrapper implements ResultSet {
> +
> +    private final RDBDataSourceWrapper datasource;
> +    private final ResultSet resultSet;
> +    private final long rsstart;
> +    int results = 0;
> +
> +    public RDBResultSetWrapper(RDBDataSourceWrapper datasource, ResultSet resultSet) {
> +        this.datasource = datasource;
> +        this.resultSet = resultSet;
> +        this.rsstart = System.nanoTime();
> +    }
> +
> +    public boolean absolute(int row) throws SQLException {
> +        return resultSet.absolute(row);
> +    }
> +
> +    public void afterLast() throws SQLException {
> +        resultSet.afterLast();
> +    }
> +
> +    public void beforeFirst() throws SQLException {
> +        resultSet.beforeFirst();
> +    }
> +
> +    public void cancelRowUpdates() throws SQLException {
> +        resultSet.cancelRowUpdates();
> +    }
> +
> +    public void clearWarnings() throws SQLException {
> +        resultSet.clearWarnings();
> +    }
> +
> +    public void close() throws SQLException {
> +        long start = System.nanoTime();
> +        SQLException x = null;
> +        try {
> +            resultSet.close();
> +        } catch (SQLException ex) {
> +            x = ex;
> +            throw ex;
> +        } finally {
> +            List<RDBLogEntry> l = datasource.getLog();
> +            if (l != null) {
> +                String message = results + " results; resultSet.close() after " + ((start - rsstart) / 1000) + "us";
> +                if (x != null) {
> +                    message += " " + x.getMessage();
> +                }
> +                l.add(new RDBLogEntry(start, message));
> +            }
> +        }
> +    }
> +
> +    public void deleteRow() throws SQLException {
> +        resultSet.deleteRow();
> +    }
> +
> +    public int findColumn(String columnLabel) throws SQLException {
> +        return resultSet.findColumn(columnLabel);
> +    }
> +
> +    public boolean first() throws SQLException {
> +        return resultSet.first();
> +    }
> +
> +    public Array getArray(int columnIndex) throws SQLException {
> +        return resultSet.getArray(columnIndex);
> +    }
> +
> +    public Array getArray(String columnLabel) throws SQLException {
> +        return resultSet.getArray(columnLabel);
> +    }
> +
> +    public InputStream getAsciiStream(int columnIndex) throws SQLException {
> +        return resultSet.getAsciiStream(columnIndex);
> +    }
> +
> +    public InputStream getAsciiStream(String columnLabel) throws SQLException {
> +        return resultSet.getAsciiStream(columnLabel);
> +    }
> +
> +    public BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException {
> +        return resultSet.getBigDecimal(columnIndex, scale);
> +    }
> +
> +    public BigDecimal getBigDecimal(int columnIndex) throws SQLException {
> +        return resultSet.getBigDecimal(columnIndex);
> +    }
> +
> +    public BigDecimal getBigDecimal(String columnLabel, int scale) throws SQLException {
> +        return resultSet.getBigDecimal(columnLabel, scale);
> +    }
> +
> +    public BigDecimal getBigDecimal(String columnLabel) throws SQLException {
> +        return resultSet.getBigDecimal(columnLabel);
> +    }
> +
> +    public InputStream getBinaryStream(int columnIndex) throws SQLException {
> +        return resultSet.getBinaryStream(columnIndex);
> +    }
> +
> +    public InputStream getBinaryStream(String columnLabel) throws SQLException {
> +        return resultSet.getBinaryStream(columnLabel);
> +    }
> +
> +    public Blob getBlob(int columnIndex) throws SQLException {
> +        return resultSet.getBlob(columnIndex);
> +    }
> +
> +    public Blob getBlob(String columnLabel) throws SQLException {
> +        return resultSet.getBlob(columnLabel);
> +    }
> +
> +    public boolean getBoolean(int columnIndex) throws SQLException {
> +        return resultSet.getBoolean(columnIndex);
> +    }
> +
> +    public boolean getBoolean(String columnLabel) throws SQLException {
> +        return resultSet.getBoolean(columnLabel);
> +    }
> +
> +    public byte getByte(int columnIndex) throws SQLException {
> +        return resultSet.getByte(columnIndex);
> +    }
> +
> +    public byte getByte(String columnLabel) throws SQLException {
> +        return resultSet.getByte(columnLabel);
> +    }
> +
> +    public byte[] getBytes(int columnIndex) throws SQLException {
> +        return resultSet.getBytes(columnIndex);
> +    }
> +
> +    public byte[] getBytes(String columnLabel) throws SQLException {
> +        return resultSet.getBytes(columnLabel);
> +    }
> +
> +    public Reader getCharacterStream(int columnIndex) throws SQLException {
> +        return resultSet.getCharacterStream(columnIndex);
> +    }
> +
> +    public Reader getCharacterStream(String columnLabel) throws SQLException {
> +        return resultSet.getCharacterStream(columnLabel);
> +    }
> +
> +    public Clob getClob(int columnIndex) throws SQLException {
> +        return resultSet.getClob(columnIndex);
> +    }
> +
> +    public Clob getClob(String columnLabel) throws SQLException {
> +        return resultSet.getClob(columnLabel);
> +    }
> +
> +    public int getConcurrency() throws SQLException {
> +        return resultSet.getConcurrency();
> +    }
> +
> +    public String getCursorName() throws SQLException {
> +        return resultSet.getCursorName();
> +    }
> +
> +    public Date getDate(int columnIndex, Calendar cal) throws SQLException {
> +        return resultSet.getDate(columnIndex, cal);
> +    }
> +
> +    public Date getDate(int columnIndex) throws SQLException {
> +        return resultSet.getDate(columnIndex);
> +    }
> +
> +    public Date getDate(String columnLabel, Calendar cal) throws SQLException {
> +        return resultSet.getDate(columnLabel, cal);
> +    }
> +
> +    public Date getDate(String columnLabel) throws SQLException {
> +        return resultSet.getDate(columnLabel);
> +    }
> +
> +    public double getDouble(int columnIndex) throws SQLException {
> +        return resultSet.getDouble(columnIndex);
> +    }
> +
> +    public double getDouble(String columnLabel) throws SQLException {
> +        return resultSet.getDouble(columnLabel);
> +    }
> +
> +    public int getFetchDirection() throws SQLException {
> +        return resultSet.getFetchDirection();
> +    }
> +
> +    public int getFetchSize() throws SQLException {
> +        return resultSet.getFetchSize();
> +    }
> +
> +    public float getFloat(int columnIndex) throws SQLException {
> +        return resultSet.getFloat(columnIndex);
> +    }
> +
> +    public float getFloat(String columnLabel) throws SQLException {
> +        return resultSet.getFloat(columnLabel);
> +    }
> +
> +    public int getHoldability() throws SQLException {
> +        return resultSet.getHoldability();
> +    }
> +
> +    public int getInt(int columnIndex) throws SQLException {
> +        return resultSet.getInt(columnIndex);
> +    }
> +
> +    public int getInt(String columnLabel) throws SQLException {
> +        return resultSet.getInt(columnLabel);
> +    }
> +
> +    public long getLong(int columnIndex) throws SQLException {
> +        return resultSet.getLong(columnIndex);
> +    }
> +
> +    public long getLong(String columnLabel) throws SQLException {
> +        return resultSet.getLong(columnLabel);
> +    }
> +
> +    public ResultSetMetaData getMetaData() throws SQLException {
> +        return resultSet.getMetaData();
> +    }
> +
> +    public Reader getNCharacterStream(int columnIndex) throws SQLException {
> +        return resultSet.getNCharacterStream(columnIndex);
> +    }
> +
> +    public Reader getNCharacterStream(String columnLabel) throws SQLException {
> +        return resultSet.getNCharacterStream(columnLabel);
> +    }
> +
> +    public NClob getNClob(int columnIndex) throws SQLException {
> +        return resultSet.getNClob(columnIndex);
> +    }
> +
> +    public NClob getNClob(String columnLabel) throws SQLException {
> +        return resultSet.getNClob(columnLabel);
> +    }
> +
> +    public String getNString(int columnIndex) throws SQLException {
> +        return resultSet.getNString(columnIndex);
> +    }
> +
> +    public String getNString(String columnLabel) throws SQLException {
> +        return resultSet.getNString(columnLabel);
> +    }
> +
> +    public <T> T getObject(int columnIndex, Class<T> type) throws SQLException {
> +        return resultSet.getObject(columnIndex, type);
> +    }
> +
> +    public Object getObject(int columnIndex, Map<String, Class<?>> map) throws SQLException {
> +        return resultSet.getObject(columnIndex, map);
> +    }
> +
> +    public Object getObject(int columnIndex) throws SQLException {
> +        return resultSet.getObject(columnIndex);
> +    }
> +
> +    public <T> T getObject(String columnLabel, Class<T> type) throws SQLException {
> +        return resultSet.getObject(columnLabel, type);
> +    }
> +
> +    public Object getObject(String columnLabel, Map<String, Class<?>> map) throws SQLException {
> +        return resultSet.getObject(columnLabel, map);
> +    }
> +
> +    public Object getObject(String columnLabel) throws SQLException {
> +        return resultSet.getObject(columnLabel);
> +    }
> +
> +    public Ref getRef(int columnIndex) throws SQLException {
> +        return resultSet.getRef(columnIndex);
> +    }
> +
> +    public Ref getRef(String columnLabel) throws SQLException {
> +        return resultSet.getRef(columnLabel);
> +    }
> +
> +    public int getRow() throws SQLException {
> +        return resultSet.getRow();
> +    }
> +
> +    public RowId getRowId(int columnIndex) throws SQLException {
> +        return resultSet.getRowId(columnIndex);
> +    }
> +
> +    public RowId getRowId(String columnLabel) throws SQLException {
> +        return resultSet.getRowId(columnLabel);
> +    }
> +
> +    public SQLXML getSQLXML(int columnIndex) throws SQLException {
> +        return resultSet.getSQLXML(columnIndex);
> +    }
> +
> +    public SQLXML getSQLXML(String columnLabel) throws SQLException {
> +        return resultSet.getSQLXML(columnLabel);
> +    }
> +
> +    public short getShort(int columnIndex) throws SQLException {
> +        return resultSet.getShort(columnIndex);
> +    }
> +
> +    public short getShort(String columnLabel) throws SQLException {
> +        return resultSet.getShort(columnLabel);
> +    }
> +
> +    public Statement getStatement() throws SQLException {
> +        return resultSet.getStatement();
> +    }
> +
> +    public String getString(int columnIndex) throws SQLException {
> +        return resultSet.getString(columnIndex);
> +    }
> +
> +    public String getString(String columnLabel) throws SQLException {
> +        return resultSet.getString(columnLabel);
> +    }
> +
> +    public Time getTime(int columnIndex, Calendar cal) throws SQLException {
> +        return resultSet.getTime(columnIndex, cal);
> +    }
> +
> +    public Time getTime(int columnIndex) throws SQLException {
> +        return resultSet.getTime(columnIndex);
> +    }
> +
> +    public Time getTime(String columnLabel, Calendar cal) throws SQLException {
> +        return resultSet.getTime(columnLabel, cal);
> +    }
> +
> +    public Time getTime(String columnLabel) throws SQLException {
> +        return resultSet.getTime(columnLabel);
> +    }
> +
> +    public Timestamp getTimestamp(int columnIndex, Calendar cal) throws SQLException {
> +        return resultSet.getTimestamp(columnIndex, cal);
> +    }
> +
> +    public Timestamp getTimestamp(int columnIndex) throws SQLException {
> +        return resultSet.getTimestamp(columnIndex);
> +    }
> +
> +    public Timestamp getTimestamp(String columnLabel, Calendar cal) throws SQLException {
> +        return resultSet.getTimestamp(columnLabel, cal);
> +    }
> +
> +    public Timestamp getTimestamp(String columnLabel) throws SQLException {
> +        return resultSet.getTimestamp(columnLabel);
> +    }
> +
> +    public int getType() throws SQLException {
> +        return resultSet.getType();
> +    }
> +
> +    public URL getURL(int columnIndex) throws SQLException {
> +        return resultSet.getURL(columnIndex);
> +    }
> +
> +    public URL getURL(String columnLabel) throws SQLException {
> +        return resultSet.getURL(columnLabel);
> +    }
> +
> +    public InputStream getUnicodeStream(int columnIndex) throws SQLException {
> +        return resultSet.getUnicodeStream(columnIndex);
> +    }
> +
> +    public InputStream getUnicodeStream(String columnLabel) throws SQLException {
> +        return resultSet.getUnicodeStream(columnLabel);
> +    }
> +
> +    public SQLWarning getWarnings() throws SQLException {
> +        return resultSet.getWarnings();
> +    }
> +
> +    public void insertRow() throws SQLException {
> +        resultSet.insertRow();
> +    }
> +
> +    public boolean isAfterLast() throws SQLException {
> +        return resultSet.isAfterLast();
> +    }
> +
> +    public boolean isBeforeFirst() throws SQLException {
> +        return resultSet.isBeforeFirst();
> +    }
> +
> +    public boolean isClosed() throws SQLException {
> +        return resultSet.isClosed();
> +    }
> +
> +    public boolean isFirst() throws SQLException {
> +        return resultSet.isFirst();
> +    }
> +
> +    public boolean isLast() throws SQLException {
> +        return resultSet.isLast();
> +    }
> +
> +    public boolean isWrapperFor(Class<?> arg0) throws SQLException {
> +        return resultSet.isWrapperFor(arg0);
> +    }
> +
> +    public boolean last() throws SQLException {
> +        return resultSet.last();
> +    }
> +
> +    public void moveToCurrentRow() throws SQLException {
> +        resultSet.moveToCurrentRow();
> +    }
> +
> +    public void moveToInsertRow() throws SQLException {
> +        resultSet.moveToInsertRow();
> +    }
> +
> +    public boolean next() throws SQLException {
> +        boolean r = resultSet.next();
> +        if (r) {
> +            results += 1;
> +        }
> +        return r;
> +    }
> +
> +    public boolean previous() throws SQLException {
> +        return resultSet.previous();
> +    }
> +
> +    public void refreshRow() throws SQLException {
> +        resultSet.refreshRow();
> +    }
> +
> +    public boolean relative(int rows) throws SQLException {
> +        return resultSet.relative(rows);
> +    }
> +
> +    public boolean rowDeleted() throws SQLException {
> +        return resultSet.rowDeleted();
> +    }
> +
> +    public boolean rowInserted() throws SQLException {
> +        return resultSet.rowInserted();
> +    }
> +
> +    public boolean rowUpdated() throws SQLException {
> +        return resultSet.rowUpdated();
> +    }
> +
> +    public void setFetchDirection(int direction) throws SQLException {
> +        resultSet.setFetchDirection(direction);
> +    }
> +
> +    public void setFetchSize(int rows) throws SQLException {
> +        resultSet.setFetchSize(rows);
> +    }
> +
> +    public <T> T unwrap(Class<T> arg0) throws SQLException {
> +        return resultSet.unwrap(arg0);
> +    }
> +
> +    public void updateArray(int columnIndex, Array x) throws SQLException {
> +        resultSet.updateArray(columnIndex, x);
> +    }
> +
> +    public void updateArray(String columnLabel, Array x) throws SQLException {
> +        resultSet.updateArray(columnLabel, x);
> +    }
> +
> +    public void updateAsciiStream(int columnIndex, InputStream x, int length) throws SQLException {
> +        resultSet.updateAsciiStream(columnIndex, x, length);
> +    }
> +
> +    public void updateAsciiStream(int columnIndex, InputStream x, long length) throws SQLException {
> +        resultSet.updateAsciiStream(columnIndex, x, length);
> +    }
> +
> +    public void updateAsciiStream(int columnIndex, InputStream x) throws SQLException {
> +        resultSet.updateAsciiStream(columnIndex, x);
> +    }
> +
> +    public void updateAsciiStream(String columnLabel, InputStream x, int length) throws SQLException {
> +        resultSet.updateAsciiStream(columnLabel, x, length);
> +    }
> +
> +    public void updateAsciiStream(String columnLabel, InputStream x, long length) throws SQLException {
> +        resultSet.updateAsciiStream(columnLabel, x, length);
> +    }
> +
> +    public void updateAsciiStream(String columnLabel, InputStream x) throws SQLException {
> +        resultSet.updateAsciiStream(columnLabel, x);
> +    }
> +
> +    public void updateBigDecimal(int columnIndex, BigDecimal x) throws SQLException {
> +        resultSet.updateBigDecimal(columnIndex, x);
> +    }
> +
> +    public void updateBigDecimal(String columnLabel, BigDecimal x) throws SQLException {
> +        resultSet.updateBigDecimal(columnLabel, x);
> +    }
> +
> +    public void updateBinaryStream(int columnIndex, InputStream x, int length) throws SQLException {
> +        resultSet.updateBinaryStream(columnIndex, x, length);
> +    }
> +
> +    public void updateBinaryStream(int columnIndex, InputStream x, long length) throws SQLException {
> +        resultSet.updateBinaryStream(columnIndex, x, length);
> +    }
> +
> +    public void updateBinaryStream(int columnIndex, InputStream x) throws SQLException {
> +        resultSet.updateBinaryStream(columnIndex, x);
> +    }
> +
> +    public void updateBinaryStream(String columnLabel, InputStream x, int length) throws SQLException {
> +        resultSet.updateBinaryStream(columnLabel, x, length);
> +    }
> +
> +    public void updateBinaryStream(String columnLabel, InputStream x, long length) throws SQLException {
> +        resultSet.updateBinaryStream(columnLabel, x, length);
> +    }
> +
> +    public void updateBinaryStream(String columnLabel, InputStream x) throws SQLException {
> +        resultSet.updateBinaryStream(columnLabel, x);
> +    }
> +
> +    public void updateBlob(int columnIndex, Blob x) throws SQLException {
> +        resultSet.updateBlob(columnIndex, x);
> +    }
> +
> +    public void updateBlob(int columnIndex, InputStream inputStream, long length) throws SQLException {
> +        resultSet.updateBlob(columnIndex, inputStream, length);
> +    }
> +
> +    public void updateBlob(int columnIndex, InputStream inputStream) throws SQLException {
> +        resultSet.updateBlob(columnIndex, inputStream);
> +    }
> +
> +    public void updateBlob(String columnLabel, Blob x) throws SQLException {
> +        resultSet.updateBlob(columnLabel, x);
> +    }
> +
> +    public void updateBlob(String columnLabel, InputStream inputStream, long length) throws SQLException {
> +        resultSet.updateBlob(columnLabel, inputStream, length);
> +    }
> +
> +    public void updateBlob(String columnLabel, InputStream inputStream) throws SQLException {
> +        resultSet.updateBlob(columnLabel, inputStream);
> +    }
> +
> +    public void updateBoolean(int columnIndex, boolean x) throws SQLException {
> +        resultSet.updateBoolean(columnIndex, x);
> +    }
> +
> +    public void updateBoolean(String columnLabel, boolean x) throws SQLException {
> +        resultSet.updateBoolean(columnLabel, x);
> +    }
> +
> +    public void updateByte(int columnIndex, byte x) throws SQLException {
> +        resultSet.updateByte(columnIndex, x);
> +    }
> +
> +    public void updateByte(String columnLabel, byte x) throws SQLException {
> +        resultSet.updateByte(columnLabel, x);
> +    }
> +
> +    public void updateBytes(int columnIndex, byte[] x) throws SQLException {
> +        resultSet.updateBytes(columnIndex, x);
> +    }
> +
> +    public void updateBytes(String columnLabel, byte[] x) throws SQLException {
> +        resultSet.updateBytes(columnLabel, x);
> +    }
> +
> +    public void updateCharacterStream(int columnIndex, Reader x, int length) throws SQLException {
> +        resultSet.updateCharacterStream(columnIndex, x, length);
> +    }
> +
> +    public void updateCharacterStream(int columnIndex, Reader x, long length) throws SQLException {
> +        resultSet.updateCharacterStream(columnIndex, x, length);
> +    }
> +
> +    public void updateCharacterStream(int columnIndex, Reader x) throws SQLException {
> +        resultSet.updateCharacterStream(columnIndex, x);
> +    }
> +
> +    public void updateCharacterStream(String columnLabel, Reader reader, int length) throws SQLException {
> +        resultSet.updateCharacterStream(columnLabel, reader, length);
> +    }
> +
> +    public void updateCharacterStream(String columnLabel, Reader reader, long length) throws SQLException {
> +        resultSet.updateCharacterStream(columnLabel, reader, length);
> +    }
> +
> +    public void updateCharacterStream(String columnLabel, Reader reader) throws SQLException {
> +        resultSet.updateCharacterStream(columnLabel, reader);
> +    }
> +
> +    public void updateClob(int columnIndex, Clob x) throws SQLException {
> +        resultSet.updateClob(columnIndex, x);
> +    }
> +
> +    public void updateClob(int columnIndex, Reader reader, long length) throws SQLException {
> +        resultSet.updateClob(columnIndex, reader, length);
> +    }
> +
> +    public void updateClob(int columnIndex, Reader reader) throws SQLException {
> +        resultSet.updateClob(columnIndex, reader);
> +    }
> +
> +    public void updateClob(String columnLabel, Clob x) throws SQLException {
> +        resultSet.updateClob(columnLabel, x);
> +    }
> +
> +    public void updateClob(String columnLabel, Reader reader, long length) throws SQLException {
> +        resultSet.updateClob(columnLabel, reader, length);
> +    }
> +
> +    public void updateClob(String columnLabel, Reader reader) throws SQLException {
> +        resultSet.updateClob(columnLabel, reader);
> +    }
> +
> +    public void updateDate(int columnIndex, Date x) throws SQLException {
> +        resultSet.updateDate(columnIndex, x);
> +    }
> +
> +    public void updateDate(String columnLabel, Date x) throws SQLException {
> +        resultSet.updateDate(columnLabel, x);
> +    }
> +
> +    public void updateDouble(int columnIndex, double x) throws SQLException {
> +        resultSet.updateDouble(columnIndex, x);
> +    }
> +
> +    public void updateDouble(String columnLabel, double x) throws SQLException {
> +        resultSet.updateDouble(columnLabel, x);
> +    }
> +
> +    public void updateFloat(int columnIndex, float x) throws SQLException {
> +        resultSet.updateFloat(columnIndex, x);
> +    }
> +
> +    public void updateFloat(String columnLabel, float x) throws SQLException {
> +        resultSet.updateFloat(columnLabel, x);
> +    }
> +
> +    public void updateInt(int columnIndex, int x) throws SQLException {
> +        resultSet.updateInt(columnIndex, x);
> +    }
> +
> +    public void updateInt(String columnLabel, int x) throws SQLException {
> +        resultSet.updateInt(columnLabel, x);
> +    }
> +
> +    public void updateLong(int columnIndex, long x) throws SQLException {
> +        resultSet.updateLong(columnIndex, x);
> +    }
> +
> +    public void updateLong(String columnLabel, long x) throws SQLException {
> +        resultSet.updateLong(columnLabel, x);
> +    }
> +
> +    public void updateNCharacterStream(int columnIndex, Reader x, long length) throws SQLException {
> +        resultSet.updateNCharacterStream(columnIndex, x, length);
> +    }
> +
> +    public void updateNCharacterStream(int columnIndex, Reader x) throws SQLException {
> +        resultSet.updateNCharacterStream(columnIndex, x);
> +    }
> +
> +    public void updateNCharacterStream(String columnLabel, Reader reader, long length) throws SQLException {
> +        resultSet.updateNCharacterStream(columnLabel, reader, length);
> +    }
> +
> +    public void updateNCharacterStream(String columnLabel, Reader reader) throws SQLException {
> +        resultSet.updateNCharacterStream(columnLabel, reader);
> +    }
> +
> +    public void updateNClob(int columnIndex, NClob nClob) throws SQLException {
> +        resultSet.updateNClob(columnIndex, nClob);
> +    }
> +
> +    public void updateNClob(int columnIndex, Reader reader, long length) throws SQLException {
> +        resultSet.updateNClob(columnIndex, reader, length);
> +    }
> +
> +    public void updateNClob(int columnIndex, Reader reader) throws SQLException {
> +        resultSet.updateNClob(columnIndex, reader);
> +    }
> +
> +    public void updateNClob(String columnLabel, NClob nClob) throws SQLException {
> +        resultSet.updateNClob(columnLabel, nClob);
> +    }
> +
> +    public void updateNClob(String columnLabel, Reader reader, long length) throws SQLException {
> +        resultSet.updateNClob(columnLabel, reader, length);
> +    }
> +
> +    public void updateNClob(String columnLabel, Reader reader) throws SQLException {
> +        resultSet.updateNClob(columnLabel, reader);
> +    }
> +
> +    public void updateNString(int columnIndex, String nString) throws SQLException {
> +        resultSet.updateNString(columnIndex, nString);
> +    }
> +
> +    public void updateNString(String columnLabel, String nString) throws SQLException {
> +        resultSet.updateNString(columnLabel, nString);
> +    }
> +
> +    public void updateNull(int columnIndex) throws SQLException {
> +        resultSet.updateNull(columnIndex);
> +    }
> +
> +    public void updateNull(String columnLabel) throws SQLException {
> +        resultSet.updateNull(columnLabel);
> +    }
> +
> +    public void updateObject(int columnIndex, Object x, int scaleOrLength) throws SQLException {
> +        resultSet.updateObject(columnIndex, x, scaleOrLength);
> +    }
> +
> +    public void updateObject(int columnIndex, Object x) throws SQLException {
> +        resultSet.updateObject(columnIndex, x);
> +    }
> +
> +    public void updateObject(String columnLabel, Object x, int scaleOrLength) throws SQLException {
> +        resultSet.updateObject(columnLabel, x, scaleOrLength);
> +    }
> +
> +    public void updateObject(String columnLabel, Object x) throws SQLException {
> +        resultSet.updateObject(columnLabel, x);
> +    }
> +
> +    public void updateRef(int columnIndex, Ref x) throws SQLException {
> +        resultSet.updateRef(columnIndex, x);
> +    }
> +
> +    public void updateRef(String columnLabel, Ref x) throws SQLException {
> +        resultSet.updateRef(columnLabel, x);
> +    }
> +
> +    public void updateRow() throws SQLException {
> +        resultSet.updateRow();
> +    }
> +
> +    public void updateRowId(int columnIndex, RowId x) throws SQLException {
> +        resultSet.updateRowId(columnIndex, x);
> +    }
> +
> +    public void updateRowId(String columnLabel, RowId x) throws SQLException {
> +        resultSet.updateRowId(columnLabel, x);
> +    }
> +
> +    public void updateSQLXML(int columnIndex, SQLXML xmlObject) throws SQLException {
> +        resultSet.updateSQLXML(columnIndex, xmlObject);
> +    }
> +
> +    public void updateSQLXML(String columnLabel, SQLXML xmlObject) throws SQLException {
> +        resultSet.updateSQLXML(columnLabel, xmlObject);
> +    }
> +
> +    public void updateShort(int columnIndex, short x) throws SQLException {
> +        resultSet.updateShort(columnIndex, x);
> +    }
> +
> +    public void updateShort(String columnLabel, short x) throws SQLException {
> +        resultSet.updateShort(columnLabel, x);
> +    }
> +
> +    public void updateString(int columnIndex, String x) throws SQLException {
> +        resultSet.updateString(columnIndex, x);
> +    }
> +
> +    public void updateString(String columnLabel, String x) throws SQLException {
> +        resultSet.updateString(columnLabel, x);
> +    }
> +
> +    public void updateTime(int columnIndex, Time x) throws SQLException {
> +        resultSet.updateTime(columnIndex, x);
> +    }
> +
> +    public void updateTime(String columnLabel, Time x) throws SQLException {
> +        resultSet.updateTime(columnLabel, x);
> +    }
> +
> +    public void updateTimestamp(int columnIndex, Timestamp x) throws SQLException {
> +        resultSet.updateTimestamp(columnIndex, x);
> +    }
> +
> +    public void updateTimestamp(String columnLabel, Timestamp x) throws SQLException {
> +        resultSet.updateTimestamp(columnLabel, x);
> +    }
> +
> +    public boolean wasNull() throws SQLException {
> +        return resultSet.wasNull();
> +    }
> +}
>
> Propchange: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBResultSetWrapper.java
> ------------------------------------------------------------------------------
>      svn:eol-style = native
>
>