summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-08-21 01:08:05 (EDT)
committerEike Stepper2007-08-21 01:08:05 (EDT)
commitbdc1d09ad76802f1fd904e46f11be69723d63c51 (patch)
treecbe0cb107b7dd3cfbfbe4ee04734b369d72bb6d8
parent680d09deb0f3bced6ffc174a795552dbf3230d30 (diff)
downloadcdo-bdc1d09ad76802f1fd904e46f11be69723d63c51.zip
cdo-bdc1d09ad76802f1fd904e46f11be69723d63c51.tar.gz
cdo-bdc1d09ad76802f1fd904e46f11be69723d63c51.tar.bz2
*** empty log message ***
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/HorizontalMappingStrategy.java29
1 files changed, 18 insertions, 11 deletions
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 b164d7f..45fd2f2 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
@@ -178,21 +178,28 @@ public class HorizontalMappingStrategy extends MappingStrategy
Entry<IDBTable, FeatureMapping[]> entry = tables.entrySet().iterator().next();
IDBTable table = entry.getKey();
+ int i = 0;
Object[] values = new Object[table.getFieldCount()];
- values[0] = revision.getID().getValue();
- values[1] = DBInfo.getDBID(revision.getCDOClass());
- values[2] = revision.getVersion();
- values[3] = new Date(revision.getCreated());
- values[4] = new Date(revision.getRevised());
- values[5] = revision.getResourceID().getValue();
- values[6] = revision.getContainerID().getValue();
- values[7] = revision.getContainingFeatureID();
-
- int i = 8;
+ values[i++] = revision.getID().getValue();
+ values[i++] = DBInfo.getDBID(revision.getCDOClass());
+ values[i++] = revision.getVersion();
+ values[i++] = new Date(revision.getCreated());
+ values[i++] = new Date(revision.getRevised());
+ values[i++] = revision.getResourceID().getValue();
+ values[i++] = revision.getContainerID().getValue();
+ values[i++] = revision.getContainingFeatureID();
+
for (CDOFeatureImpl feature : cdoClass.getAllFeatures())
{
Object value = revision.getValue(feature);
- values[i++] = value instanceof CDOID ? ((CDOID)value).getValue() : value;
+ if (value instanceof CDOID)
+ {
+ values[i++] = ((CDOID)value).getValue();
+ }
+ else
+ {
+ values[i++] = value;
+ }
}
DBUtil.insertRow(connection, table, values);