Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2013-03-09 02:39:34 -0500
committerEike Stepper2013-03-09 02:39:34 -0500
commit4de7bf042c339316be23c442aeffb79deb80d2a9 (patch)
treeac78eedcda3d4c4089bb9374893f967a81738f67
parent1d478ffc4f555c0159d17443913728c2e328d354 (diff)
downloadcdo-4de7bf042c339316be23c442aeffb79deb80d2a9.tar.gz
cdo-4de7bf042c339316be23c442aeffb79deb80d2a9.tar.xz
cdo-4de7bf042c339316be23c442aeffb79deb80d2a9.zip
[401763] Make CDO Server more robust against data dictionary changes
https://bugs.eclipse.org/bugs/show_bug.cgi?id=401763
-rw-r--r--plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/ddl/IDBIndex.java5
-rw-r--r--plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/ddl/DBIndex.java8
2 files changed, 13 insertions, 0 deletions
diff --git a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/ddl/IDBIndex.java b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/ddl/IDBIndex.java
index d0f4198630..0bf2f2490d 100644
--- a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/ddl/IDBIndex.java
+++ b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/ddl/IDBIndex.java
@@ -44,6 +44,11 @@ public interface IDBIndex extends IDBSchemaElement
/**
* @since 4.2
*/
+ public IDBIndexField addIndexField(String name);
+
+ /**
+ * @since 4.2
+ */
public IDBIndexField getIndexField(String name);
/**
diff --git a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/ddl/DBIndex.java b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/ddl/DBIndex.java
index 1db215abe2..4195881458 100644
--- a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/ddl/DBIndex.java
+++ b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/ddl/DBIndex.java
@@ -18,6 +18,7 @@ import org.eclipse.net4j.db.ddl.IDBSchemaElement;
import org.eclipse.net4j.db.ddl.IDBSchemaVisitor;
import org.eclipse.net4j.spi.db.DBSchema;
import org.eclipse.net4j.spi.db.DBSchemaElement;
+import org.eclipse.net4j.util.CheckUtil;
import java.io.IOException;
import java.io.Writer;
@@ -134,6 +135,13 @@ public class DBIndex extends DBSchemaElement implements IDBIndex
return indexField;
}
+ public IDBIndexField addIndexField(String name)
+ {
+ DBField field = table.getField(name);
+ CheckUtil.checkArg(field, "Field not found: " + name);
+ return addIndexField(field);
+ }
+
public void removeIndexField(IDBIndexField indexFieldToRemove)
{
assertUnlocked();

Back to the top