*/
package com.quantum.actions;
+import org.eclipse.ui.IViewPart;
+
import com.quantum.Messages;
import com.quantum.QuantumPlugin;
-import com.quantum.adapters.AdapterFactory;
import com.quantum.adapters.DatabaseAdapter;
import com.quantum.model.Bookmark;
import com.quantum.sql.SQLResults;
import com.quantum.view.bookmark.EntityNode;
import com.quantum.view.tableview.TableView;
-import org.eclipse.ui.IViewPart;
-
public class PrevSequenceAction extends BaseSequenceAction {
/**
* @param text
}
public void run() {
- EntityNode node = getEntityNode();
- if (((EntityNode) node).isSequence()) {
- EntityNode sequence = (EntityNode) node;
+ EntityNode sequence = getEntityNode();
+ if (sequence.isSequence()) {
Bookmark bookmark = sequence.getBookmark();
- DatabaseAdapter adapter = AdapterFactory.getInstance().getAdapter(
- bookmark.getType());
+ DatabaseAdapter adapter = bookmark.getAdapter();
if (adapter == null) return;
String name = sequence.getName();
String query = adapter.getPrevValue(name, sequence.getEntity().getSchema());