Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'jpa/plugins/org.eclipse.jpt.db/src/org/eclipse/jpt/db/internal/Sequence.java')
-rw-r--r--jpa/plugins/org.eclipse.jpt.db/src/org/eclipse/jpt/db/internal/Sequence.java74
1 files changed, 0 insertions, 74 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.db/src/org/eclipse/jpt/db/internal/Sequence.java b/jpa/plugins/org.eclipse.jpt.db/src/org/eclipse/jpt/db/internal/Sequence.java
deleted file mode 100644
index 7cb68a47e5..0000000000
--- a/jpa/plugins/org.eclipse.jpt.db/src/org/eclipse/jpt/db/internal/Sequence.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * 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.
- *
- * Contributors:
- * Oracle - initial API and implementation
- ******************************************************************************/
-package org.eclipse.jpt.db.internal;
-
-import java.text.Collator;
-
-import org.eclipse.datatools.connectivity.sqm.core.rte.ICatalogObject;
-import org.eclipse.datatools.connectivity.sqm.core.rte.ICatalogObjectListener;
-
-/**
- * Wrap a DTP Sequence
- */
-public final class Sequence extends DTPWrapper implements Comparable<Sequence> {
- private final Schema schema;
- private final org.eclipse.datatools.modelbase.sql.schema.Sequence dtpSequence;
- private ICatalogObjectListener sequenceListener;
-
- Sequence( Schema schema, org.eclipse.datatools.modelbase.sql.schema.Sequence dtpSequence) {
- super();
- this.schema = schema;
- this.dtpSequence = dtpSequence;
- this.initialize();
- }
-
- // ********** behavior **********
-
- private void initialize() {
- if( this.connectionIsOnline()) {
- this.sequenceListener = this.buildSequenceListener();
- this.addCatalogObjectListener(( ICatalogObject) this.dtpSequence, this.sequenceListener);
- }
- }
-
- @Override
- protected boolean connectionIsOnline() {
- return this.schema.connectionIsOnline();
- }
-
- private ICatalogObjectListener buildSequenceListener() {
- return new ICatalogObjectListener() {
- public void notifyChanged( final ICatalogObject sequence, final int eventType) {
-// TODO
-// if( sequence == Sequence.this.dtpSequence) {
-// Sequence.this.schema.sequenceChanged( Sequence.this, eventType);
-// }
- }
- };
- }
-
-
- // ********** queries **********
-
- @Override
- protected void dispose() {
-
- this.removeCatalogObjectListener(( ICatalogObject) this.dtpSequence, this.sequenceListener);
- }
-
- @Override
- public String getName() {
- return this.dtpSequence.getName();
- }
-
- public int compareTo( Sequence sequence) {
- return Collator.getInstance().compare( this.getName(), sequence.getName());
- }
-}

Back to the top