Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2012-08-14 09:02:11 +0000
committerEike Stepper2012-08-14 09:02:11 +0000
commit7cc89ae0efe2ab1fd6d4ed071b4a6f96852ff336 (patch)
treea25cd6b00c3d9fb9b022f0de778f29a3b85bd034 /plugins
parent1c66e50f1d97bcf7f72093668d4173cdeaedfa3e (diff)
downloadcdo-7cc89ae0efe2ab1fd6d4ed071b4a6f96852ff336.tar.gz
cdo-7cc89ae0efe2ab1fd6d4ed071b4a6f96852ff336.tar.xz
cdo-7cc89ae0efe2ab1fd6d4ed071b4a6f96852ff336.zip
Remove unused WrappedPreparedStatement class
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/jdbc/WrappedPreparedStatement.java81
2 files changed, 0 insertions, 82 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server.db/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.server.db/META-INF/MANIFEST.MF
index b864c538c5..f33fce42e2 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.server.db/META-INF/MANIFEST.MF
@@ -16,7 +16,6 @@ Export-Package: org.eclipse.emf.cdo.server.db;version="4.2.0",
org.eclipse.emf.cdo.server.db.mapping;version="4.2.0",
org.eclipse.emf.cdo.server.internal.db;version="4.2.0";x-friends:="org.eclipse.emf.cdo.tests,org.eclipse.emf.cdo.tests.db",
org.eclipse.emf.cdo.server.internal.db.bundle;version="4.2.0";x-internal:=true,
- org.eclipse.emf.cdo.server.internal.db.jdbc;version="4.2.0";x-friends:="org.eclipse.emf.cdo.tests,org.eclipse.emf.cdo.tests.db",
org.eclipse.emf.cdo.server.internal.db.mapping;version="4.2.0";x-friends:="org.eclipse.emf.cdo.tests,org.eclipse.emf.cdo.tests.db",
org.eclipse.emf.cdo.server.internal.db.mapping.horizontal;version="4.2.0";x-friends:="org.eclipse.emf.cdo.tests,org.eclipse.emf.cdo.tests.db",
org.eclipse.emf.cdo.server.internal.db.messages;version="4.2.0";x-internal:=true
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/jdbc/WrappedPreparedStatement.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/jdbc/WrappedPreparedStatement.java
deleted file mode 100644
index 7340788edb..0000000000
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/jdbc/WrappedPreparedStatement.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.emf.cdo.server.internal.db.jdbc;
-
-import org.eclipse.emf.cdo.server.internal.db.bundle.OM;
-
-import org.eclipse.net4j.db.DBUtil;
-import org.eclipse.net4j.util.om.trace.ContextTracer;
-
-import java.sql.PreparedStatement;
-import java.text.MessageFormat;
-
-/**
- * Wrapper for a prepared statement that is cleaned up when it is cached in a WeakReferenceCache and gc'd. Note that
- * this is just a wrapper with access to its wrapped object. There's no interface delegation, because the interface
- * delegation would also put the necessity to wrap resultSets and maybe even more, which seems to much overkill for a
- * simple internal implementation.
- *
- * @author Stefan Winkler
- */
-public class WrappedPreparedStatement
-{
- private static final ContextTracer TRACER = new ContextTracer(OM.DEBUG, WrappedPreparedStatement.class);
-
- private PreparedStatement wrappedStatement;
-
- public WrappedPreparedStatement(PreparedStatement ps)
- {
- wrappedStatement = ps;
- if (TRACER.isEnabled())
- {
- TRACER.format("Wrapping Statement: {0}", wrappedStatement); //$NON-NLS-1$
- }
- }
-
- public PreparedStatement getWrappedStatement()
- {
- return wrappedStatement;
- }
-
- public PreparedStatement unwrapStatement()
- {
- if (TRACER.isEnabled())
- {
- TRACER.format("Unwrapping Statement: {0}", wrappedStatement); //$NON-NLS-1$
- }
-
- PreparedStatement result = wrappedStatement;
- wrappedStatement = null;
- return result;
- }
-
- @Override
- public String toString()
- {
- return MessageFormat.format("Wrapped[{0}]", wrappedStatement); //$NON-NLS-1$
- }
-
- @Override
- protected void finalize() throws Throwable
- {
- if (wrappedStatement != null)
- {
- if (TRACER.isEnabled())
- {
- TRACER.format("Closing statement: {0}", wrappedStatement); //$NON-NLS-1$
- }
-
- DBUtil.close(wrappedStatement);
- wrappedStatement = null;
- }
- }
-}

Back to the top