Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2022-01-16 07:47:06 +0000
committerEike Stepper2022-01-16 07:47:06 +0000
commit3a7c820b5467f88959a10d90ce668904741ac2a9 (patch)
tree9e25669b77ab2b3faa26f2783b3c3674eb041e1b /plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common
parent46fd38398dc3aa7f7cd63bfcb2798540f05f74f6 (diff)
downloadcdo-3a7c820b5467f88959a10d90ce668904741ac2a9.tar.gz
cdo-3a7c820b5467f88959a10d90ce668904741ac2a9.tar.xz
cdo-3a7c820b5467f88959a10d90ce668904741ac2a9.zip
[544670] Improve resolution of LOB features
https://bugs.eclipse.org/bugs/show_bug.cgi?id=544670
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common')
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/model/CDOClassInfoImpl.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/model/CDOClassInfoImpl.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/model/CDOClassInfoImpl.java
index 8af925d42a..affa0975ab 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/model/CDOClassInfoImpl.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/model/CDOClassInfoImpl.java
@@ -28,6 +28,7 @@ import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.Notifier;
import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.EStructuralFeature;
@@ -73,6 +74,8 @@ public final class CDOClassInfoImpl implements InternalCDOClassInfo, Adapter.Int
private EStructuralFeature[] allPersistentMapFeatures;
+ private EAttribute[] allPersistentLobAttributes;
+
private int[] persistentFeatureIndices;
private int settingsFeatureCount;
@@ -213,6 +216,12 @@ public final class CDOClassInfoImpl implements InternalCDOClassInfo, Adapter.Int
}
@Override
+ public EAttribute[] getAllPersistentLobAttributes()
+ {
+ return allPersistentLobAttributes;
+ }
+
+ @Override
public int getPersistentFeatureIndex(EStructuralFeature feature) throws IllegalArgumentException
{
int featureID = eClass.getFeatureID(feature);
@@ -305,6 +314,7 @@ public final class CDOClassInfoImpl implements InternalCDOClassInfo, Adapter.Int
List<EReference> persistentReferences = new ArrayList<>();
List<EStructuralFeature> persistentContainments = new ArrayList<>();
List<EStructuralFeature> persistentMapFeatures = new ArrayList<>();
+ List<EAttribute> persistentLobAttributes = new ArrayList<>();
// Used for tests for containment
EStructuralFeature[] containments = ((EClassImpl.FeatureSubsetSupplier)eClass.getEAllStructuralFeatures()).containments();
@@ -338,6 +348,10 @@ public final class CDOClassInfoImpl implements InternalCDOClassInfo, Adapter.Int
persistentOppositeBits.set(featureID);
}
}
+ else if (CDOModelUtil.isLob(feature.getEType()))
+ {
+ persistentLobAttributes.add((EAttribute)feature);
+ }
if (isMap(feature))
{
@@ -382,6 +396,7 @@ public final class CDOClassInfoImpl implements InternalCDOClassInfo, Adapter.Int
allPersistentReferences = persistentReferences.toArray(new EReference[persistentReferences.size()]);
allPersistentContainments = persistentContainments.toArray(new EStructuralFeature[persistentContainments.size()]);
allPersistentMapFeatures = persistentMapFeatures.toArray(new EStructuralFeature[persistentMapFeatures.size()]);
+ allPersistentLobAttributes = persistentLobAttributes.toArray(new EAttribute[persistentLobAttributes.size()]);
persistentFeatureIndices = new int[allFeatures.size()];
Arrays.fill(persistentFeatureIndices, NO_SLOT);

Back to the top