[jboss-cvs] JBossAS SVN: r111733 - in projects/jboss-jca/branches/performance: noopdb and 10 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Jul 8 12:12:12 EDT 2011
Author: jesper.pedersen
Date: 2011-07-08 12:12:12 -0400 (Fri, 08 Jul 2011)
New Revision: 111733
Added:
projects/jboss-jca/branches/performance/noopdb/
projects/jboss-jca/branches/performance/noopdb/build.xml
projects/jboss-jca/branches/performance/noopdb/src/
projects/jboss-jca/branches/performance/noopdb/src/main/
projects/jboss-jca/branches/performance/noopdb/src/main/java/
projects/jboss-jca/branches/performance/noopdb/src/main/java/org/
projects/jboss-jca/branches/performance/noopdb/src/main/java/org/jboss/
projects/jboss-jca/branches/performance/noopdb/src/main/java/org/jboss/jca/
projects/jboss-jca/branches/performance/noopdb/src/main/java/org/jboss/jca/noopdb/
projects/jboss-jca/branches/performance/noopdb/src/main/java/org/jboss/jca/noopdb/NoopDBConnection.java
projects/jboss-jca/branches/performance/noopdb/src/main/java/org/jboss/jca/noopdb/NoopDBDriver.java
projects/jboss-jca/branches/performance/noopdb/src/main/java/org/jboss/jca/noopdb/NoopDBPreparedStatement.java
projects/jboss-jca/branches/performance/noopdb/src/main/java/org/jboss/jca/noopdb/NoopDBResultSet.java
projects/jboss-jca/branches/performance/noopdb/src/main/java/org/jboss/jca/noopdb/NoopDBStatement.java
projects/jboss-jca/branches/performance/noopdb/src/main/java/org/jboss/jca/noopdb/NoopDBWrapper.java
projects/jboss-jca/branches/performance/noopdb/src/main/java/org/jboss/jca/noopdb/package.html
projects/jboss-jca/branches/performance/noopdb/src/main/resources/
projects/jboss-jca/branches/performance/noopdb/src/main/resources/META-INF/
projects/jboss-jca/branches/performance/noopdb/src/main/resources/META-INF/services/
projects/jboss-jca/branches/performance/noopdb/src/main/resources/META-INF/services/java.sql.Driver
Modified:
projects/jboss-jca/branches/performance/build.xml
projects/jboss-jca/branches/performance/ivy.xml
Log:
Add NoopDB
Modified: projects/jboss-jca/branches/performance/build.xml
===================================================================
--- projects/jboss-jca/branches/performance/build.xml 2011-07-08 15:20:37 UTC (rev 111732)
+++ projects/jboss-jca/branches/performance/build.xml 2011-07-08 16:12:12 UTC (rev 111733)
@@ -184,7 +184,7 @@
<ant dir="rars" inheritRefs="true" target="jars"/>
<ant dir="extensions" inheritRefs="true" target="jars"/>
<ant dir="apps" inheritRefs="true" target="jars"/>
- <ant dir="pojos" inheritRefs="true" target="jars"/>
+ <ant dir="noopdb" inheritRefs="true" target="jars"/>
</target>
<!-- =================================
@@ -192,7 +192,6 @@
================================= -->
<target name="docs" depends="jars">
<ant dir="rars" inheritRefs="true" target="docs"/>
- <ant dir="pojos" inheritRefs="true" target="docs"/>
</target>
<!-- =================================
Modified: projects/jboss-jca/branches/performance/ivy.xml
===================================================================
--- projects/jboss-jca/branches/performance/ivy.xml 2011-07-08 15:20:37 UTC (rev 111732)
+++ projects/jboss-jca/branches/performance/ivy.xml 2011-07-08 16:12:12 UTC (rev 111733)
@@ -45,7 +45,7 @@
<dependency org="org.jboss.javaee" name="jboss-ejb-api" rev="${version.jboss.ejb.api}" conf="common"/>
<dependency org="org.jboss.javaee" name="jboss-jca-api" rev="${version.jboss.jca.api}" conf="common"/>
<dependency org="org.jboss.javaee" name="jboss-servlet-api" rev="${version.jboss.servlet-api}" conf="web"/>
- <dependency org="org.jboss.javaee" name="jboss-transaction-api" rev="${version.jboss.jboss-transaction-api}" conf="common"/>
+ <dependency org="org.jboss.javaee" name="jboss-transaction-api" rev="${version.jboss.jboss-transaction-api}" conf="common,perfenv"/>
<dependency org="org.jboss.jbossas" name="jboss-server-manager" rev="${version.jboss.server.manager}" conf="jbossas"/>
<!-- <dependency org="org.jboss.logging" name="jboss-logging-log4j" rev="${version.jboss.logging}" conf="common"/> -->
<dependency org="org.jboss.remoting" name="jboss-remoting" rev="${version.jboss.remoting}" conf="sjc"/>
Added: projects/jboss-jca/branches/performance/noopdb/build.xml
===================================================================
--- projects/jboss-jca/branches/performance/noopdb/build.xml (rev 0)
+++ projects/jboss-jca/branches/performance/noopdb/build.xml 2011-07-08 16:12:12 UTC (rev 111733)
@@ -0,0 +1,99 @@
+<!--
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+-->
+<project name="ironjacamar-performance-noopdb"
+ default="jars"
+ xmlns:ivy="antlib:org.apache.ivy.ant">
+
+ <!-- =================================
+ Properties
+ ================================= -->
+ <property name="build.noopdb.dir" value="${build.dir}/noopdb" />
+
+ <!-- =================================
+ Target: compile
+ ================================= -->
+ <target name="compile">
+ <mkdir dir="${build.noopdb.dir}" />
+ <mkdir dir="${build.noopdb.dir}/impl" />
+
+ <javac srcdir="src/main"
+ destdir="${build.noopdb.dir}/impl"
+ classpathref="lib.path.id"
+ debug="${javac.debug}"
+ deprecation="${javac.deprecation}"
+ optimize="${javac.optimize}">
+ <compilerarg value="-Xlint"/>
+ </javac>
+ </target>
+
+ <!-- =================================
+ Target: jars
+ ================================= -->
+ <target name="jars" depends="compile">
+ <mkdir dir="${build.noopdb.dir}/jars" />
+
+ <copy todir="${build.noopdb.dir}/jars">
+ <fileset dir="src/main/resources" includes="**/*"/>
+ </copy>
+
+ <copy todir="${build.noopdb.dir}/jars">
+ <fileset dir="${build.noopdb.dir}/impl"
+ includes="**"/>
+ </copy>
+
+ <jar destfile="${target.dir}/ironjacamar-performance-noopdb.jar"
+ basedir="${build.noopdb.dir}/jars">
+ <manifest>
+ <attribute name="Implementation-Title" value="IronJacamar Performance (Noopdb)"/>
+ <attribute name="Implementation-Vendor" value="The IronJacamar project (http://www.jboss.org/ironjacamar)"/>
+ <attribute name="Implementation-Vendor-Id" value="org.jboss"/>
+ </manifest>
+ </jar>
+
+ </target>
+
+ <!-- =================================
+ Target: docs
+ ================================= -->
+ <target name="docs" depends="compile">
+ <mkdir dir="${target.dir}/docs/performance"/>
+ <mkdir dir="${target.dir}/docs/performance/noopdb"/>
+ <javadoc packagenames="org.*"
+ sourcepath="src/main/java"
+ destdir="${target.dir}/docs/performance/noopdb"
+ author="true"
+ version="true"
+ windowtitle="IronJacamar Performance NoopDB"
+ doctitle="IronJacamar Performance NoopDB"
+ use="true"
+ additionalparam="-author -version"
+ classpath="${build.noopdb.dir}/impl"
+ classpathref="lib.path.id"
+ bottom="Copyright © 2010 Red Hat Middleware LLC (http://www.jboss.com/)">
+ <link offline="true" href="http://java.sun.com/j2se/5/docs/api/" packagelistLoc="${java.home}/../docs/api"/>
+ </javadoc>
+ <copy todir="${target.dir}/docs/performance/noopdb" overwrite="true">
+ <fileset dir="${tools.dir}/api"/>
+ </copy>
+ </target>
+
+</project>
Added: projects/jboss-jca/branches/performance/noopdb/src/main/java/org/jboss/jca/noopdb/NoopDBConnection.java
===================================================================
--- projects/jboss-jca/branches/performance/noopdb/src/main/java/org/jboss/jca/noopdb/NoopDBConnection.java (rev 0)
+++ projects/jboss-jca/branches/performance/noopdb/src/main/java/org/jboss/jca/noopdb/NoopDBConnection.java 2011-07-08 16:12:12 UTC (rev 111733)
@@ -0,0 +1,484 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.jca.noopdb;
+
+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.Map;
+import java.util.Properties;
+
+/**
+ * NoopDB connection.
+ *
+ * @author <a href="mailto:jesper.pedersen at jboss.org">Jesper Pedersen</a>
+ */
+public class NoopDBConnection implements Connection
+{
+ private boolean closed;
+ private String user;
+ private String password;
+
+ private String stringProperty;
+
+ /**
+ * Constructor
+ * @param info The properties
+ */
+ public NoopDBConnection(Properties info)
+ {
+ if (info != null)
+ {
+ user = info.getProperty("user");
+ password = info.getProperty("password");
+
+ stringProperty = info.getProperty("StringProperty");
+ }
+
+ this.closed = false;
+ }
+
+ /**
+ * Get the user
+ * @return The value
+ */
+ public String getUser()
+ {
+ return user;
+ }
+
+ /**
+ * Get the password
+ * @return The value
+ */
+ public String getPassword()
+ {
+ return password;
+ }
+
+ /**
+ * Get the StringProperty
+ * @return The value
+ */
+ public String getStringProperty()
+ {
+ return stringProperty;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setReadOnly(boolean readOnly) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isReadOnly() throws SQLException
+ {
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void close() throws SQLException
+ {
+ closed = true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isClosed() throws SQLException
+ {
+ return closed;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Statement createStatement() throws SQLException
+ {
+ return new NoopDBStatement(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException
+ {
+ return new NoopDBStatement(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability)
+ throws SQLException
+ {
+ return new NoopDBStatement(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public PreparedStatement prepareStatement(String sql) throws SQLException
+ {
+ return new NoopDBPreparedStatement(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency)
+ throws SQLException
+ {
+ return new NoopDBPreparedStatement(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency,
+ int resultSetHoldability) throws SQLException
+ {
+ return new NoopDBPreparedStatement(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public PreparedStatement prepareStatement(String sql, int autoGeneratedKeys) throws SQLException
+ {
+ return new NoopDBPreparedStatement(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public PreparedStatement prepareStatement(String sql, int[] columnIndexes) throws SQLException
+ {
+ return new NoopDBPreparedStatement(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public PreparedStatement prepareStatement(String sql, String[] columnNames) throws SQLException
+ {
+ return new NoopDBPreparedStatement(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public CallableStatement prepareCall(String sql) throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency) throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency,
+ int resultSetHoldability) throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String nativeSQL(String sql) throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setAutoCommit(boolean autocommit) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean getAutoCommit() throws SQLException
+ {
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void commit() throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void rollback() throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void rollback(Savepoint savepoint) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public DatabaseMetaData getMetaData() throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setCatalog(String catalog) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getCatalog() throws SQLException
+ {
+ return "";
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setTransactionIsolation(int isolationLevel) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int getTransactionIsolation() throws SQLException
+ {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public SQLWarning getWarnings() throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void clearWarnings() throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @SuppressWarnings("unchecked")
+ public Map<String, Class<?>> getTypeMap() throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @SuppressWarnings("unchecked")
+ public void setTypeMap(Map<String, Class<?>> typeMap) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setHoldability(int holdability) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int getHoldability() throws SQLException
+ {
+ return -1;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Savepoint setSavepoint() throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Savepoint setSavepoint(String name) throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void releaseSavepoint(Savepoint savepoint) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Array createArrayOf(String typeName, Object[] elements) throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Blob createBlob() throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Clob createClob() throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public NClob createNClob() throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public SQLXML createSQLXML() throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Struct createStruct(String typeName, Object[] attributes) throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Properties getClientInfo() throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getClientInfo(String name) throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isValid(int timeout) throws SQLException
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setClientInfo(Properties properties) throws SQLClientInfoException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setClientInfo(String name, String value) throws SQLClientInfoException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isWrapperFor(Class<?> iface)
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public <T> T unwrap(Class<T> iface)
+ {
+ return null;
+ }
+}
Added: projects/jboss-jca/branches/performance/noopdb/src/main/java/org/jboss/jca/noopdb/NoopDBDriver.java
===================================================================
--- projects/jboss-jca/branches/performance/noopdb/src/main/java/org/jboss/jca/noopdb/NoopDBDriver.java (rev 0)
+++ projects/jboss-jca/branches/performance/noopdb/src/main/java/org/jboss/jca/noopdb/NoopDBDriver.java 2011-07-08 16:12:12 UTC (rev 111733)
@@ -0,0 +1,85 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.jca.noopdb;
+
+import java.sql.Connection;
+import java.sql.Driver;
+import java.sql.DriverManager;
+import java.sql.DriverPropertyInfo;
+import java.sql.SQLException;
+import java.util.Properties;
+
+/**
+ * JDBC driver
+ */
+public class NoopDBDriver implements Driver
+{
+ /**
+ * {@inheritDoc}
+ */
+ public Connection connect(String url, Properties info) throws SQLException
+ {
+ return new NoopDBConnection(info);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean acceptsURL(String url) throws SQLException
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public DriverPropertyInfo[] getPropertyInfo(String url, Properties info) throws SQLException
+ {
+ Driver driver = DriverManager.getDriver(url);
+ return driver.getPropertyInfo(url, info);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int getMajorVersion()
+ {
+ return 1;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int getMinorVersion()
+ {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean jdbcCompliant()
+ {
+ return false;
+ }
+}
Added: projects/jboss-jca/branches/performance/noopdb/src/main/java/org/jboss/jca/noopdb/NoopDBPreparedStatement.java
===================================================================
--- projects/jboss-jca/branches/performance/noopdb/src/main/java/org/jboss/jca/noopdb/NoopDBPreparedStatement.java (rev 0)
+++ projects/jboss-jca/branches/performance/noopdb/src/main/java/org/jboss/jca/noopdb/NoopDBPreparedStatement.java 2011-07-08 16:12:12 UTC (rev 111733)
@@ -0,0 +1,454 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.jca.noopdb;
+
+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;
+
+/**
+ * NoopDB prepare statement.
+ *
+ * @author <a href="mailto:jesper.pedersen at jboss.org">Jesper Pedersen</a>
+ */
+ at SuppressWarnings("deprecation")
+public class NoopDBPreparedStatement extends NoopDBStatement implements PreparedStatement
+{
+ /**
+ * Constructor
+ * @param connection The connection
+ */
+ public NoopDBPreparedStatement(NoopDBConnection connection)
+ {
+ super(connection);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public ResultSet executeQuery() throws SQLException
+ {
+ return new NoopDBResultSet(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int executeUpdate() throws SQLException
+ {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setNull(int parameterIndex, int sqlType) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setBoolean(int parameterIndex, boolean x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setByte(int parameterIndex, byte x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setShort(int parameterIndex, short x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setInt(int parameterIndex, int x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setLong(int parameterIndex, long x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setFloat(int parameterIndex, float x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setDouble(int parameterIndex, double x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setBigDecimal(int parameterIndex, BigDecimal x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setString(int parameterIndex, String x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setBytes(int parameterIndex, byte[] x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setDate(int parameterIndex, Date x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setTime(int parameterIndex, Time x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setTimestamp(int parameterIndex, Timestamp x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setAsciiStream(int parameterIndex, InputStream x, int length) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setUnicodeStream(int parameterIndex, InputStream x, int length) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setBinaryStream(int parameterIndex, InputStream x, int length) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void clearParameters() throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setObject(int parameterIndex, Object x, int targetSqlType) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setObject(int parameterIndex, Object x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean execute() throws SQLException
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void addBatch() throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setCharacterStream(int parameterIndex, Reader reader, int length) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setRef(int parameterIndex, Ref x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setBlob(int parameterIndex, Blob x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setClob(int parameterIndex, Clob x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setArray(int parameterIndex, Array x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public ResultSetMetaData getMetaData() throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setDate(int parameterIndex, Date x, Calendar cal) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setTime(int parameterIndex, Time x, Calendar cal) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setTimestamp(int parameterIndex, Timestamp x, Calendar cal) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setNull(int parameterIndex, int sqlType, String typeName) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setURL(int parameterIndex, URL x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public ParameterMetaData getParameterMetaData() throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setRowId(int parameterIndex, RowId x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setNString(int parameterIndex, String value) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setNCharacterStream(int parameterIndex, Reader value, long length) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setNClob(int parameterIndex, NClob value) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setClob(int parameterIndex, Reader reader, long length) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setBlob(int parameterIndex, InputStream inputStream, long length) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setNClob(int parameterIndex, Reader reader, long length) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setObject(int parameterIndex, Object x, int targetSqlType, int scaleOrLength) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setAsciiStream(int parameterIndex, InputStream x, long length) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setBinaryStream(int parameterIndex, InputStream x, long length) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setCharacterStream(int parameterIndex, Reader reader, long length) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setAsciiStream(int parameterIndex, InputStream x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setBinaryStream(int parameterIndex, InputStream x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setCharacterStream(int parameterIndex, Reader reader) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setNCharacterStream(int parameterIndex, Reader value) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setClob(int parameterIndex, Reader reader) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setBlob(int parameterIndex, InputStream inputStream) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setNClob(int parameterIndex, Reader reader) throws SQLException
+ {
+ }
+}
Added: projects/jboss-jca/branches/performance/noopdb/src/main/java/org/jboss/jca/noopdb/NoopDBResultSet.java
===================================================================
--- projects/jboss-jca/branches/performance/noopdb/src/main/java/org/jboss/jca/noopdb/NoopDBResultSet.java (rev 0)
+++ projects/jboss-jca/branches/performance/noopdb/src/main/java/org/jboss/jca/noopdb/NoopDBResultSet.java 2011-07-08 16:12:12 UTC (rev 111733)
@@ -0,0 +1,1478 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.jca.noopdb;
+
+import java.io.InputStream;
+import java.io.Reader;
+import java.math.BigDecimal;
+import java.sql.Connection;
+import java.sql.Date;
+import java.sql.PreparedStatement;
+import java.sql.Statement;
+import java.sql.ResultSet;
+import java.sql.ResultSetMetaData;
+import java.sql.SQLWarning;
+import java.sql.SQLException;
+import java.sql.SQLXML;
+import java.sql.NClob;
+import java.sql.RowId;
+import java.sql.Array;
+import java.sql.Blob;
+import java.sql.Clob;
+import java.sql.Ref;
+import java.sql.Time;
+import java.sql.Timestamp;
+import java.util.Calendar;
+import java.util.Map;
+import java.net.URL;
+
+/**
+ * NoopDB result set.
+ *
+ * @author <a href="mailto:jesper.pedersen at jboss.org">Jesper Pedersen</a>
+ */
+ at SuppressWarnings("deprecation")
+public class NoopDBResultSet extends NoopDBWrapper implements ResultSet
+{
+ private NoopDBStatement statement;
+ private boolean next;
+ private boolean closed;
+
+ /**
+ * Constructor
+ * @param statement The statement
+ */
+ public NoopDBResultSet(NoopDBStatement statement)
+ {
+ this.statement = statement;
+ this.next = true;
+ this.closed = false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean next() throws SQLException
+ {
+ boolean result = next;
+
+ if (next)
+ next = false;
+
+ return result;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void close() throws SQLException
+ {
+ closed = true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean wasNull() throws SQLException
+ {
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getString(int columnIndex) throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean getBoolean(int columnIndex) throws SQLException
+ {
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public byte getByte(int columnIndex) throws SQLException
+ {
+ return -1;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public short getShort(int columnIndex) throws SQLException
+ {
+ return -1;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int getInt(int columnIndex) throws SQLException
+ {
+ return -1;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public long getLong(int columnIndex) throws SQLException
+ {
+ return -1;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public float getFloat(int columnIndex) throws SQLException
+ {
+ return -1.0f;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public double getDouble(int columnIndex) throws SQLException
+ {
+ return -1.0d;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public byte[] getBytes(int columnIndex) throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Date getDate(int columnIndex) throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Time getTime(int columnIndex) throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Timestamp getTimestamp(int columnIndex) throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public InputStream getAsciiStream(int columnIndex) throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public InputStream getUnicodeStream(int columnIndex) throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public InputStream getBinaryStream(int columnIndex) throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getString(String columnLabel) throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean getBoolean(String columnLabel) throws SQLException
+ {
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public byte getByte(String columnLabel) throws SQLException
+ {
+ return -1;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public short getShort(String columnLabel) throws SQLException
+ {
+ return -1;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int getInt(String columnLabel) throws SQLException
+ {
+ return -1;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public long getLong(String columnLabel) throws SQLException
+ {
+ return -1;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public float getFloat(String columnLabel) throws SQLException
+ {
+ return -1.0f;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public double getDouble(String columnLabel) throws SQLException
+ {
+ return -1.0d;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public BigDecimal getBigDecimal(String columnLabel, int scale) throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public byte[] getBytes(String columnLabel) throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Date getDate(String columnLabel) throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Time getTime(String columnLabel) throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Timestamp getTimestamp(String columnLabel) throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public InputStream getAsciiStream(String columnLabel) throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public InputStream getUnicodeStream(String columnLabel) throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public InputStream getBinaryStream(String columnLabel) throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public SQLWarning getWarnings() throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void clearWarnings() throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getCursorName() throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public ResultSetMetaData getMetaData() throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Object getObject(int columnIndex) throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Object getObject(String columnLabel) throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int findColumn(String columnLabel) throws SQLException
+ {
+ return -1;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Reader getCharacterStream(int columnIndex) throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Reader getCharacterStream(String columnLabel) throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public BigDecimal getBigDecimal(int columnIndex) throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public BigDecimal getBigDecimal(String columnLabel) throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isBeforeFirst() throws SQLException
+ {
+ return next;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isAfterLast() throws SQLException
+ {
+ return !next;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isFirst() throws SQLException
+ {
+ return next;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isLast() throws SQLException
+ {
+ return !next;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void beforeFirst() throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void afterLast() throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean first() throws SQLException
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean last() throws SQLException
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int getRow() throws SQLException
+ {
+ return 1;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean absolute(int row) throws SQLException
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean relative(int rows) throws SQLException
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean previous() throws SQLException
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setFetchDirection(int direction) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int getFetchDirection() throws SQLException
+ {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setFetchSize(int rows) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int getFetchSize() throws SQLException
+ {
+ return 1;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int getType() throws SQLException
+ {
+ return ResultSet.TYPE_FORWARD_ONLY;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int getConcurrency() throws SQLException
+ {
+ return ResultSet.CONCUR_READ_ONLY;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean rowUpdated() throws SQLException
+ {
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean rowInserted() throws SQLException
+ {
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean rowDeleted() throws SQLException
+ {
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateNull(int columnIndex) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateBoolean(int columnIndex, boolean x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateByte(int columnIndex, byte x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateShort(int columnIndex, short x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateInt(int columnIndex, int x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateLong(int columnIndex, long x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateFloat(int columnIndex, float x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateDouble(int columnIndex, double x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateBigDecimal(int columnIndex, BigDecimal x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateString(int columnIndex, String x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateBytes(int columnIndex, byte[] x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateDate(int columnIndex, Date x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateTime(int columnIndex, Time x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateTimestamp(int columnIndex, Timestamp x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateAsciiStream(int columnIndex, InputStream x, int length) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateBinaryStream(int columnIndex, InputStream x, int length) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateCharacterStream(int columnIndex, Reader x, int length) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateObject(int columnIndex, Object x, int scaleOrLength) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateObject(int columnIndex, Object x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateNull(String columnLabel) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateBoolean(String columnLabel, boolean x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateByte(String columnLabel, byte x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateShort(String columnLabel, short x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateInt(String columnLabel, int x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateLong(String columnLabel, long x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateFloat(String columnLabel, float x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateDouble(String columnLabel, double x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateBigDecimal(String columnLabel, BigDecimal x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateString(String columnLabel, String x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateBytes(String columnLabel, byte[] x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateDate(String columnLabel, Date x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateTime(String columnLabel, Time x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateTimestamp(String columnLabel, Timestamp x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateAsciiStream(String columnLabel, InputStream x, int length) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateBinaryStream(String columnLabel, InputStream x, int length) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateCharacterStream(String columnLabel, Reader reader, int length) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateObject(String columnLabel, Object x, int scaleOrLength) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateObject(String columnLabel, Object x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void insertRow() throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateRow() throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void deleteRow() throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void refreshRow() throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void cancelRowUpdates() throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void moveToInsertRow() throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void moveToCurrentRow() throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Statement getStatement() throws SQLException
+ {
+ return statement;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Object getObject(int columnIndex, Map<String, Class<?>> map) throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Ref getRef(int columnIndex) throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Blob getBlob(int columnIndex) throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Clob getClob(int columnIndex) throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Array getArray(int columnIndex) throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Object getObject(String columnLabel, Map<String, Class<?>> map) throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Ref getRef(String columnLabel) throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Blob getBlob(String columnLabel) throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Clob getClob(String columnLabel) throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Array getArray(String columnLabel) throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Date getDate(int columnIndex, Calendar cal) throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Date getDate(String columnLabel, Calendar cal) throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Time getTime(int columnIndex, Calendar cal) throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Time getTime(String columnLabel, Calendar cal) throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Timestamp getTimestamp(int columnIndex, Calendar cal) throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Timestamp getTimestamp(String columnLabel, Calendar cal) throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public URL getURL(int columnIndex) throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public URL getURL(String columnLabel) throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateRef(int columnIndex, Ref x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateRef(String columnLabel, Ref x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateBlob(int columnIndex, Blob x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateBlob(String columnLabel, Blob x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateClob(int columnIndex, Clob x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateClob(String columnLabel, Clob x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateArray(int columnIndex, Array x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateArray(String columnLabel, Array x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public RowId getRowId(int columnIndex) throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public RowId getRowId(String columnLabel) throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateRowId(int columnIndex, RowId x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateRowId(String columnLabel, RowId x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int getHoldability() throws SQLException
+ {
+ return ResultSet.CLOSE_CURSORS_AT_COMMIT;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isClosed() throws SQLException
+ {
+ return closed;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateNString(int columnIndex, String nString) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateNString(String columnLabel, String nString) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateNClob(int columnIndex, NClob nClob) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateNClob(String columnLabel, NClob nClob) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public NClob getNClob(int columnIndex) throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public NClob getNClob(String columnLabel) throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public SQLXML getSQLXML(int columnIndex) throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public SQLXML getSQLXML(String columnLabel) throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateSQLXML(int columnIndex, SQLXML xmlObject) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateSQLXML(String columnLabel, SQLXML xmlObject) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getNString(int columnIndex) throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getNString(String columnLabel) throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Reader getNCharacterStream(int columnIndex) throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Reader getNCharacterStream(String columnLabel) throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateNCharacterStream(int columnIndex, Reader x, long length) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateNCharacterStream(String columnLabel, Reader reader, long length) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateAsciiStream(int columnIndex, InputStream x, long length) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateBinaryStream(int columnIndex, InputStream x, long length) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateCharacterStream(int columnIndex, Reader x, long length) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateAsciiStream(String columnLabel, InputStream x, long length) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateBinaryStream(String columnLabel, InputStream x, long length) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateCharacterStream(String columnLabel, Reader reader, long length) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateBlob(int columnIndex, InputStream inputStream, long length) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateBlob(String columnLabel, InputStream inputStream, long length) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateClob(int columnIndex, Reader reader, long length) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateClob(String columnLabel, Reader reader, long length) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateNClob(int columnIndex, Reader reader, long length) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateNClob(String columnLabel, Reader reader, long length) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateNCharacterStream(int columnIndex, Reader x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateNCharacterStream(String columnLabel, Reader reader) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateAsciiStream(int columnIndex, InputStream x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateBinaryStream(int columnIndex, InputStream x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateCharacterStream(int columnIndex, Reader x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateAsciiStream(String columnLabel, InputStream x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateBinaryStream(String columnLabel, InputStream x) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateCharacterStream(String columnLabel, Reader reader) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateBlob(int columnIndex, InputStream inputStream) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateBlob(String columnLabel, InputStream inputStream) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateClob(int columnIndex, Reader reader) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateClob(String columnLabel, Reader reader) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateNClob(int columnIndex, Reader reader) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateNClob(String columnLabel, Reader reader) throws SQLException
+ {
+ }
+}
Added: projects/jboss-jca/branches/performance/noopdb/src/main/java/org/jboss/jca/noopdb/NoopDBStatement.java
===================================================================
--- projects/jboss-jca/branches/performance/noopdb/src/main/java/org/jboss/jca/noopdb/NoopDBStatement.java (rev 0)
+++ projects/jboss-jca/branches/performance/noopdb/src/main/java/org/jboss/jca/noopdb/NoopDBStatement.java 2011-07-08 16:12:12 UTC (rev 111733)
@@ -0,0 +1,369 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.jca.noopdb;
+
+import java.sql.Array;
+import java.sql.Blob;
+import java.sql.Clob;
+import java.sql.Connection;
+import java.sql.NClob;
+import java.sql.Ref;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.SQLWarning;
+import java.sql.Statement;
+import java.sql.RowId;
+import java.sql.Time;
+import java.sql.Timestamp;
+import java.net.URL;
+import java.util.Calendar;
+
+/**
+ * NoopDB statement.
+ *
+ * @author <a href="mailto:jesper.pedersen at jboss.org">Jesper Pedersen</a>
+ */
+ at SuppressWarnings("deprecation")
+public class NoopDBStatement extends NoopDBWrapper implements Statement
+{
+ private NoopDBConnection connection;
+ private boolean closed;
+
+ /**
+ * Constructor
+ * @param connection The connection
+ */
+ public NoopDBStatement(NoopDBConnection connection)
+ {
+ this.connection = connection;
+ this.closed = false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public ResultSet executeQuery(String sql) throws SQLException
+ {
+ return new NoopDBResultSet(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int executeUpdate(String sql) throws SQLException
+ {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void close() throws SQLException
+ {
+ closed = true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int getMaxFieldSize() throws SQLException
+ {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setMaxFieldSize(int max) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int getMaxRows() throws SQLException
+ {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setMaxRows(int max) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setEscapeProcessing(boolean enable) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int getQueryTimeout() throws SQLException
+ {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setQueryTimeout(int seconds) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void cancel() throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public SQLWarning getWarnings() throws SQLException
+ {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void clearWarnings() throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setCursorName(String name) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean execute(String sql) throws SQLException
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public ResultSet getResultSet() throws SQLException
+ {
+ return new NoopDBResultSet(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int getUpdateCount() throws SQLException
+ {
+ return -1;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean getMoreResults() throws SQLException
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setFetchDirection(int direction) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int getFetchDirection() throws SQLException
+ {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setFetchSize(int rows) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int getFetchSize() throws SQLException
+ {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int getResultSetConcurrency() throws SQLException
+ {
+ return ResultSet.CONCUR_READ_ONLY;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int getResultSetType() throws SQLException
+ {
+ return ResultSet.TYPE_FORWARD_ONLY;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void addBatch(String sql) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void clearBatch() throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int[] executeBatch() throws SQLException
+ {
+ return new int[0];
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Connection getConnection() throws SQLException
+ {
+ return connection;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean getMoreResults(int current) throws SQLException
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public ResultSet getGeneratedKeys() throws SQLException
+ {
+ return new NoopDBResultSet(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int executeUpdate(String sql, int autoGeneratedKeys) throws SQLException
+ {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int executeUpdate(String sql, int[] columnIndexes) throws SQLException
+ {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int executeUpdate(String sql, String[] columnNames) throws SQLException
+ {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean execute(String sql, int autoGeneratedKeys) throws SQLException
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean execute(String sql, int[] columnIndexes) throws SQLException
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean execute(String sql, String[] columnNames) throws SQLException
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int getResultSetHoldability() throws SQLException
+ {
+ return ResultSet.CLOSE_CURSORS_AT_COMMIT;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isClosed() throws SQLException
+ {
+ return closed;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setPoolable(boolean poolable) throws SQLException
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isPoolable() throws SQLException
+ {
+ return false;
+ }
+}
Added: projects/jboss-jca/branches/performance/noopdb/src/main/java/org/jboss/jca/noopdb/NoopDBWrapper.java
===================================================================
--- projects/jboss-jca/branches/performance/noopdb/src/main/java/org/jboss/jca/noopdb/NoopDBWrapper.java (rev 0)
+++ projects/jboss-jca/branches/performance/noopdb/src/main/java/org/jboss/jca/noopdb/NoopDBWrapper.java 2011-07-08 16:12:12 UTC (rev 111733)
@@ -0,0 +1,57 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.jca.noopdb;
+
+import java.sql.SQLException;
+import java.sql.Wrapper;
+
+/**
+ * NoopDB wrapper.
+ *
+ * @author <a href="mailto:jesper.pedersen at jboss.org">Jesper Pedersen</a>
+ */
+public class NoopDBWrapper implements Wrapper
+{
+ /**
+ * Constructor
+ */
+ public NoopDBWrapper()
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isWrapperFor(Class<?> iface) throws SQLException
+ {
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public <T> T unwrap(Class<T> iface) throws SQLException
+ {
+ return null;
+ }
+}
Added: projects/jboss-jca/branches/performance/noopdb/src/main/java/org/jboss/jca/noopdb/package.html
===================================================================
--- projects/jboss-jca/branches/performance/noopdb/src/main/java/org/jboss/jca/noopdb/package.html (rev 0)
+++ projects/jboss-jca/branches/performance/noopdb/src/main/java/org/jboss/jca/noopdb/package.html 2011-07-08 16:12:12 UTC (rev 111733)
@@ -0,0 +1,3 @@
+<body>
+This package contains the NoopDB implementation.
+</body>
Added: projects/jboss-jca/branches/performance/noopdb/src/main/resources/META-INF/services/java.sql.Driver
===================================================================
--- projects/jboss-jca/branches/performance/noopdb/src/main/resources/META-INF/services/java.sql.Driver (rev 0)
+++ projects/jboss-jca/branches/performance/noopdb/src/main/resources/META-INF/services/java.sql.Driver 2011-07-08 16:12:12 UTC (rev 111733)
@@ -0,0 +1 @@
+org.jboss.jca.noopdb.NoopDBDriver
More information about the jboss-cvs-commits
mailing list