summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-08-17 04:27:25 (EDT)
committerEike Stepper2007-08-17 04:27:25 (EDT)
commitc3b4dca8a03fe23a6614006a176fa55b45a99507 (patch)
tree78e0cd4e731d98267ba615ae486d0d161cffc138
parent319062703869c263e209e8afc6f488c20a3c8424 (diff)
downloadcdo-c3b4dca8a03fe23a6614006a176fa55b45a99507.zip
cdo-c3b4dca8a03fe23a6614006a176fa55b45a99507.tar.gz
cdo-c3b4dca8a03fe23a6614006a176fa55b45a99507.tar.bz2
*** empty log message ***
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/META-INF/MANIFEST.MF2
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/plugin.xml4
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/HorizontalMappingStrategy.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/MappingStrategy.java26
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/VerticalMappingStrategy.java2
5 files changed, 31 insertions, 5 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server.db/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.server.db/META-INF/MANIFEST.MF
index 836d486..e14b998 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.server.db/META-INF/MANIFEST.MF
@@ -8,6 +8,6 @@ Bundle-Vendor: %providerName
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.net4j.db;visibility:=reexport,
org.eclipse.emf.cdo.server;visibility:=reexport
-Eclipse-LazyStart: true
Export-Package: org.eclipse.emf.cdo.server.db;version="0.8.0",
org.eclipse.emf.cdo.server.internal.db;version="0.8.0"
+Eclipse-LazyStart: true
diff --git a/plugins/org.eclipse.emf.cdo.server.db/plugin.xml b/plugins/org.eclipse.emf.cdo.server.db/plugin.xml
index 5f579c7..11f901f 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/plugin.xml
+++ b/plugins/org.eclipse.emf.cdo.server.db/plugin.xml
@@ -16,11 +16,11 @@
point="org.eclipse.emf.cdo.server.db.mappingStrategies">
<mappingStrategy
class="org.eclipse.emf.cdo.server.internal.db.HorizontalMappingStrategy"
- type="Horizontal">
+ type="horizontal">
</mappingStrategy>
<mappingStrategy
class="org.eclipse.emf.cdo.server.internal.db.VerticalMappingStrategy"
- type="Vertical">
+ type="vertical">
</mappingStrategy>
</extension>
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/HorizontalMappingStrategy.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/HorizontalMappingStrategy.java
index d396440..4bf69d6 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/HorizontalMappingStrategy.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/HorizontalMappingStrategy.java
@@ -30,7 +30,7 @@ public class HorizontalMappingStrategy extends MappingStrategy
public String getType()
{
- return "Horizontal";
+ return "horizontal";
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/MappingStrategy.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/MappingStrategy.java
index c8adebc..4d9597f 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/MappingStrategy.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/MappingStrategy.java
@@ -16,12 +16,14 @@ import org.eclipse.emf.cdo.protocol.model.CDOFeature;
import org.eclipse.emf.cdo.protocol.model.CDOType;
import org.eclipse.emf.cdo.server.IStore;
import org.eclipse.emf.cdo.server.db.IMappingStrategy;
+import org.eclipse.emf.cdo.server.internal.db.bundle.OM;
import org.eclipse.net4j.db.DBType;
import org.eclipse.net4j.db.IDBField;
import org.eclipse.net4j.db.IDBSchema;
import org.eclipse.net4j.db.IDBTable;
import org.eclipse.net4j.internal.db.DBSchema;
+import org.eclipse.net4j.internal.util.om.trace.ContextTracer;
import org.eclipse.net4j.util.ImplementationError;
import java.util.ArrayList;
@@ -35,6 +37,8 @@ import java.util.Set;
*/
public abstract class MappingStrategy implements IMappingStrategy
{
+ private static final ContextTracer TRACER = new ContextTracer(OM.DEBUG, MappingStrategy.class);
+
private IStore store;
private Properties properties;
@@ -92,11 +96,20 @@ public abstract class MappingStrategy implements IMappingStrategy
for (CDOPackageImpl cdoPackage : cdoPackages)
{
((DBPackageInfo)cdoPackage.getServerInfo()).setSchema(schema);
+ if (TRACER.isEnabled())
+ {
+ TRACER.format("Mapped package: {0} --> {1}", cdoPackage, schema);
+ }
}
// Map all classes before features are mapped
for (CDOPackageImpl cdoPackage : cdoPackages)
{
+ if (TRACER.isEnabled())
+ {
+ TRACER.format("Mapping classes of package {0}", cdoPackage);
+ }
+
for (CDOClass cdoClass : cdoPackage.getClasses())
{
cdoClasses.add(cdoClass);
@@ -105,6 +118,10 @@ public abstract class MappingStrategy implements IMappingStrategy
{
((DBClassInfo)cdoClass.getServerInfo()).setTable(table);
affectedTables.add(table);
+ if (TRACER.isEnabled())
+ {
+ TRACER.format("Mapped class: {0} --> {1}", cdoClass, table);
+ }
}
}
}
@@ -112,6 +129,11 @@ public abstract class MappingStrategy implements IMappingStrategy
// Map all features
for (CDOClass cdoClass : cdoClasses)
{
+ if (TRACER.isEnabled())
+ {
+ TRACER.format("Mapping features of class {0}", cdoClass);
+ }
+
for (CDOFeature cdoFeature : cdoClass.getAllFeatures())
{
IDBField field = map(schema, cdoClass, cdoFeature, affectedTables);
@@ -119,6 +141,10 @@ public abstract class MappingStrategy implements IMappingStrategy
{
((DBFeatureInfo)cdoFeature.getServerInfo()).setField(field);
affectedTables.add(field.getTable());
+ if (TRACER.isEnabled())
+ {
+ TRACER.format("Mapped feature: {0} --> {1}", cdoFeature, field);
+ }
}
}
}
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/VerticalMappingStrategy.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/VerticalMappingStrategy.java
index 829c618..167319e 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/VerticalMappingStrategy.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/VerticalMappingStrategy.java
@@ -30,7 +30,7 @@ public class VerticalMappingStrategy extends MappingStrategy
public String getType()
{
- return "Vertical";
+ return "vertical";
}
@Override