diff options
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/HorizontalAuditClassMapping.java')
-rw-r--r-- | plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/HorizontalAuditClassMapping.java | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/HorizontalAuditClassMapping.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/HorizontalAuditClassMapping.java index 91c2dbdb32..b60f8bbb0d 100644 --- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/HorizontalAuditClassMapping.java +++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/HorizontalAuditClassMapping.java @@ -8,6 +8,7 @@ * Contributors: * Eike Stepper - initial API and implementation * Stefan Winkler - major refactoring + * Stefan Winkler - 249610: [DB] Support external references (Implementation) */ package org.eclipse.emf.cdo.server.internal.db.mapping.horizontal; @@ -161,6 +162,7 @@ public class HorizontalAuditClassMapping extends AbstractHorizontalClassMapping int listChunk) { PreparedStatement pstmt = null; + try { pstmt = accessor.getStatementCache().getPreparedStatement(sqlSelectAttributesByTime, ReuseProbability.MEDIUM); @@ -169,7 +171,7 @@ public class HorizontalAuditClassMapping extends AbstractHorizontalClassMapping pstmt.setLong(3, timeStamp); // Read singleval-attribute table always (even without modeled attributes!) - boolean success = readValuesFromStatement(pstmt, revision); + boolean success = readValuesFromStatement(pstmt, revision, accessor); // Read multival tables only if revision exists if (success) @@ -200,7 +202,7 @@ public class HorizontalAuditClassMapping extends AbstractHorizontalClassMapping pstmt.setInt(2, version); // Read singleval-attribute table always (even without modeled attributes!) - boolean success = readValuesFromStatement(pstmt, revision); + boolean success = readValuesFromStatement(pstmt, revision, accessor); // Read multival tables only if revision exists if (success) @@ -319,7 +321,7 @@ public class HorizontalAuditClassMapping extends AbstractHorizontalClassMapping pstmt.setLong(1, CDOIDUtil.getLong(revision.getID())); // Read singleval-attribute table always (even without modeled attributes!) - boolean success = readValuesFromStatement(pstmt, revision); + boolean success = readValuesFromStatement(pstmt, revision, accessor); // Read multival tables only if revision exists if (success) @@ -355,8 +357,10 @@ public class HorizontalAuditClassMapping extends AbstractHorizontalClassMapping stmt.setLong(col++, accessor.getStore().getMetaDataManager().getMetaID(revision.getEClass())); stmt.setLong(col++, revision.getCreated()); stmt.setLong(col++, revision.getRevised()); - stmt.setLong(col++, CDOIDUtil.getLong(revision.getResourceID())); - stmt.setLong(col++, CDODBUtil.getLong((CDOID)revision.getContainerID())); + stmt.setLong(col++, CDODBUtil.convertCDOIDToLong(getExternalReferenceManager(), accessor, revision + .getResourceID())); + stmt.setLong(col++, CDODBUtil.convertCDOIDToLong(getExternalReferenceManager(), accessor, (CDOID)revision + .getContainerID())); stmt.setInt(col++, revision.getContainingFeatureID()); for (ITypeMapping mapping : getValueMappings()) |