summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-08-14 13:35:00 (EDT)
committerEike Stepper2007-08-14 13:35:00 (EDT)
commitc64189b12feeda107921c16d4aa50133292529d7 (patch)
tree5531a622fb172ccfa83ecddc969e923f2f2e4d56
parent1e5eea1a5454d9c3ce1c6156f0a42b440f413de4 (diff)
downloadcdo-c64189b12feeda107921c16d4aa50133292529d7.zip
cdo-c64189b12feeda107921c16d4aa50133292529d7.tar.gz
cdo-c64189b12feeda107921c16d4aa50133292529d7.tar.bz2
*** empty log message ***
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/CDODBSchema.java109
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStoreWriter.java4
2 files changed, 81 insertions, 32 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/CDODBSchema.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/CDODBSchema.java
index 8955607..0908d55 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/CDODBSchema.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/CDODBSchema.java
@@ -23,50 +23,103 @@ public class CDODBSchema extends DBSchema
public static final CDODBSchema INSTANCE = new CDODBSchema();
/**
- * DBTable Destinations
+ * DBTable cdo_packages
*/
- public static final IDBTable DESTINATIONS = INSTANCE.addTable("destinations");
+ public static final IDBTable PACKAGES = INSTANCE.addTable("cdo_packages");
- public static final IDBField DESTINATIONS_NAME = //
- DESTINATIONS.addField("name", IDBField.Type.VARCHAR, 255);
+ public static final IDBField PACKAGES_ID = //
+ PACKAGES.addField("id", IDBField.Type.INTEGER);
- public static final IDBField DESTINATIONS_TYPE = //
- DESTINATIONS.addField("type", IDBField.Type.INTEGER);
+ public static final IDBField PACKAGES_URI = //
+ PACKAGES.addField("uri", IDBField.Type.VARCHAR, 255);
- public static final IDBIndex INDEX_DESTINATIONS_PK = //
- DESTINATIONS.addIndex(IDBIndex.Type.PRIMARY_KEY, DESTINATIONS_NAME);
+ public static final IDBField PACKAGES_NAME = //
+ PACKAGES.addField("name", IDBField.Type.VARCHAR, 255);
+
+ public static final IDBField PACKAGES_ECORE = //
+ PACKAGES.addField("ecore", IDBField.Type.LONGVARCHAR);
+
+ public static final IDBField PACKAGES_DYNAMIC = //
+ PACKAGES.addField("dynamic", IDBField.Type.BOOLEAN);
+
+ public static final IDBField PACKAGES_RANGE_LB = //
+ PACKAGES.addField("rangelb", IDBField.Type.BIGINT);
+
+ public static final IDBField PACKAGES_RANGE_UB = //
+ PACKAGES.addField("rangeub", IDBField.Type.BIGINT);
+
+ public static final IDBIndex INDEX_PACKAGES_PK = //
+ PACKAGES.addIndex(IDBIndex.Type.PRIMARY_KEY, PACKAGES_ID);
+
+ public static final IDBIndex INDEX_PACKAGES_URI = //
+ PACKAGES.addIndex(IDBIndex.Type.UNIQUE, PACKAGES_URI);
/**
- * DBTable Messages
+ * DBTable cdo_classes
*/
- public static final IDBTable MESSAGES = INSTANCE.addTable("messages");
+ public static final IDBTable CLASSES = INSTANCE.addTable("cdo_classes");
- public static final IDBField MESSAGES_ID = //
- MESSAGES.addField("id", IDBField.Type.VARCHAR);
+ public static final IDBField CLASSES_ID = //
+ CLASSES.addField("id", IDBField.Type.INTEGER);
- public static final IDBField MESSAGES_DESTINATION = //
- MESSAGES.addField("destination", IDBField.Type.VARCHAR);
+ public static final IDBField CLASSES_PACKAGE = //
+ CLASSES.addField("package", IDBField.Type.INTEGER);
- public static final IDBField MESSAGES_PRIORITY = //
- MESSAGES.addField("priority", IDBField.Type.INTEGER);
+ public static final IDBField CLASSES_CLASSIFIER = //
+ CLASSES.addField("classifier", IDBField.Type.INTEGER);
- public static final IDBIndex INDEX_MESSAGES_PK = //
- MESSAGES.addIndex(IDBIndex.Type.PRIMARY_KEY, MESSAGES_ID);
+ public static final IDBField CLASSES_NAME = //
+ CLASSES.addField("name", IDBField.Type.VARCHAR, 255);
+
+ public static final IDBField CLASSES_ABSTRACT = //
+ CLASSES.addField("abstract", IDBField.Type.BOOLEAN);
+
+ public static final IDBIndex INDEX_CLASSES_PK = //
+ CLASSES.addIndex(IDBIndex.Type.PRIMARY_KEY, CLASSES_ID);
/**
- * Queries
+ * DBTable cdo_supertypes
*/
- public static final String QUERY = "SELECT " + DESTINATIONS_TYPE + ", " + MESSAGES_ID + ", " + MESSAGES_PRIORITY
- + " FROM " + DESTINATIONS + ", " + MESSAGES + " WHERE " + DESTINATIONS_NAME + "=" + MESSAGES_DESTINATION
- + " AND " + DESTINATIONS_NAME + "=?";
+ public static final IDBTable SUPERTYPES = INSTANCE.addTable("cdo_supertypes");
- private CDODBSchema()
- {
- super("JMS");
- }
+ public static final IDBField SUPERTYPES_TYPE = //
+ SUPERTYPES.addField("type", IDBField.Type.INTEGER);
+
+ public static final IDBField SUPERTYPES_SUPERTYPE = //
+ SUPERTYPES.addField("supertype", IDBField.Type.INTEGER);
- static
+ public static final IDBIndex INDEX_SUPERTYPES_PK = //
+ SUPERTYPES.addIndex(IDBIndex.Type.PRIMARY_KEY, SUPERTYPES_TYPE);
+
+ /**
+ * DBTable cdo_features
+ */
+ public static final IDBTable FEATURES = INSTANCE.addTable("cdo_features");
+
+ public static final IDBField FEATURES_ID = //
+ FEATURES.addField("id", IDBField.Type.INTEGER);
+
+ public static final IDBField FEATURES_TYPE = //
+ FEATURES.addField("type", IDBField.Type.INTEGER);
+
+ public static final IDBField FEATURES_REFERENCE = //
+ FEATURES.addField("reference", IDBField.Type.INTEGER);
+
+ public static final IDBField FEATURES_MANY = //
+ FEATURES.addField("many", IDBField.Type.BOOLEAN);
+
+ public static final IDBField FEATURES_CONTAINMENT = //
+ FEATURES.addField("containment", IDBField.Type.BOOLEAN);
+
+ public static final IDBField FEATURES_INDEX = //
+ FEATURES.addField("idx", IDBField.Type.INTEGER);
+
+ public static final IDBIndex INDEX_FEATURES_PK = //
+ FEATURES.addIndex(IDBIndex.Type.PRIMARY_KEY, FEATURES_ID);
+
+ private CDODBSchema()
{
- INSTANCE.lock();
+ super("CDO");
+ lock();
}
}
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStoreWriter.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStoreWriter.java
index 33fe3e1..5b259de 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStoreWriter.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStoreWriter.java
@@ -63,13 +63,9 @@ public class DBStoreWriter extends DBStoreReader implements IStoreWriter
public void writePackage(CDOPackageImpl cdoPackage)
{
- // TODO Implement method DBStoreWriter.writePackage()
- // throw new UnsupportedOperationException("Not yet implemented");
}
public void writeRevision(CDORevisionImpl revision)
{
- // TODO Implement method DBStoreWriter.writeRevision()
- // throw new UnsupportedOperationException("Not yet implemented");
}
}