X-Git-Url: http://git.phpeclipse.com diff --git a/archive/net.sourceforge.phpeclipse.quantum.sql/src/com/quantum/wizards/UpdateRowPage.java b/archive/net.sourceforge.phpeclipse.quantum.sql/src/com/quantum/wizards/UpdateRowPage.java index b057d59..e1dd3c5 100644 --- a/archive/net.sourceforge.phpeclipse.quantum.sql/src/com/quantum/wizards/UpdateRowPage.java +++ b/archive/net.sourceforge.phpeclipse.quantum.sql/src/com/quantum/wizards/UpdateRowPage.java @@ -1,11 +1,5 @@ package com.quantum.wizards; -import com.quantum.Messages; -import com.quantum.adapters.AdapterFactory; -import com.quantum.adapters.DatabaseAdapter; -import com.quantum.model.Bookmark; -import com.quantum.model.Entity; - import org.eclipse.swt.SWT; import org.eclipse.swt.events.ModifyEvent; import org.eclipse.swt.events.ModifyListener; @@ -18,6 +12,11 @@ import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Text; +import com.quantum.Messages; +import com.quantum.adapters.DatabaseAdapter; +import com.quantum.model.Bookmark; +import com.quantum.model.Entity; + public class UpdateRowPage extends BaseSQLPage implements SQLPage { String[] columnNames; Text[] oldValues; @@ -80,7 +79,7 @@ public class UpdateRowPage extends BaseSQLPage implements SQLPage { }); primaryKeys[i] = new Button(container, SWT.CHECK); primaryKeys[i].setText("Where"); //$NON-NLS-1$ - if (entity != null && entity.getColumn(columnNames[i]).isPrimaryKey()) + if (entity != null && getColumn(entity, columnNames[i]).isPrimaryKey()) primaryKeys[i].setSelection(true); primaryKeys[i].addSelectionListener(new SelectionListener() { public void widgetDefaultSelected(SelectionEvent e) { @@ -126,7 +125,7 @@ public class UpdateRowPage extends BaseSQLPage implements SQLPage { StringBuffer whereClause = new StringBuffer(); Bookmark bookmark = row.getBookmark(); Entity entity = row.getEntity(); - DatabaseAdapter adapter = AdapterFactory.getInstance().getAdapter(bookmark.getType()); + DatabaseAdapter adapter = bookmark.getAdapter(); int numValuesSet = 0; int numValuesWhere = 0;