Community
Participate
Working Groups
> > 2) What do you think, should we refactor the whole type conversion (not only for > > references) into CDOType? Maybe CDOType could extend CDOValueConverter or so. > > Then we don't need so many if blocks all over the code. We'd generally call a > > converter method of the feature type when EObject <--> CDORevision assignment is > > done. If we do this flexible enough we could even be able to support extensible > > conversions in the future (for custom EDataTypes). > Good idea! > Should it be called CDOReferenceAdjustable instead of CDOValueConverter ? > since it is to adjust references only. (even if it could be Attributes) I like CDOValueConverter ;-) Eike
I know why you wanted to have CDOValueConverter. I misunderstood you. I thought you wanted use CDOValueConverter from CDOType instead of CDOAdjustReference. Now, I understand that you would like to get rid of if condition in CDOStore. Right ? Meanwhile I added adjustReferences in CDOType!! :-) My code is cleaner as well!
> Now, I understand that you would like to get rid of if condition in CDOStore. > Right ? Right ;-)
Created attachment 130190 [details] Patch v1 IMPORTANT READ BEFORE REVIEW: I attached that patch to this bugs instead of the rework CDOType since I didn't do that much. We will leave the others stuff for later depends of the requirements. - Kept CDOType - Introduction of convertToEMF convertTOCDO <- They are aware of the EClassifier writevalue and readvalue are not. it is why EEnum are kept as integer inside the CDORevision.. because they do not have context of the EClassifier. - writeValue and readvalue are there to Serialize data - convertToEMF / convertToCDO context aware. If we make writeValue and readValue context aware... I think we will not need convertToEMF and convertToCDO anymore. But it will not be possible to serialize data anymore like the query does it. if you still prefer to have the Enum value inside the revision... do not review that patch... I will make the changes.
Created attachment 130196 [details] Patch v2 Ready to be committed.
COmmitted to HEAD
Fix available in EMF CDO 2.0.0M6b
Generally available.