Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'jpa/plugins/org.eclipse.jpt.db/src/org/eclipse/jpt/db/internal/Connection.java')
-rw-r--r--jpa/plugins/org.eclipse.jpt.db/src/org/eclipse/jpt/db/internal/Connection.java15
1 files changed, 8 insertions, 7 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.db/src/org/eclipse/jpt/db/internal/Connection.java b/jpa/plugins/org.eclipse.jpt.db/src/org/eclipse/jpt/db/internal/Connection.java
index e3ce55897c..3e1e7365db 100644
--- a/jpa/plugins/org.eclipse.jpt.db/src/org/eclipse/jpt/db/internal/Connection.java
+++ b/jpa/plugins/org.eclipse.jpt.db/src/org/eclipse/jpt/db/internal/Connection.java
@@ -1,9 +1,9 @@
/*******************************************************************************
* Copyright (c) 2006, 2007 Oracle. 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.
- *
+ * 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:
* Oracle - initial API and implementation
******************************************************************************/
@@ -15,7 +15,7 @@ import java.text.Collator;
/**
* Connection wrapper base class.
*/
-public abstract class Connection extends DTPWrapper {
+public abstract class Connection extends DTPWrapper implements Comparable<Connection> {
// ********** constructors **********
@@ -52,14 +52,15 @@ public abstract class Connection extends DTPWrapper {
public abstract String getFactoryId();
+ @Override
protected boolean connectionIsOnline() {
return this.isConnected();
}
// ********** Comparable implementation **********
- public int compareTo(Object o) {
- return Collator.getInstance().compare( this.getName(), ((Connection)o).getName());
+ public int compareTo(Connection connection) {
+ return Collator.getInstance().compare( this.getName(), connection.getName());
}
}

Back to the top