|[CDO] - CDOFeatureDeltaVisitor and CDORemoveFeatureDelta [message #1756459]
||Fri, 17 March 2017 08:56
| Philippe EUGENE
Registered: January 2011
I'm implementing a CDOTransactionHandler with a CDOFeatureDeltaVisitor.
On a remove my visitor process a CDORemoveFeatureDelta.
CDOFeatureDelta[variants, REMOVE, value=UNKNOWN, index=0]
The value associate with the FeatureDelta is an UNKNOWN object and not a CDOID object.
Then i have no way to know what object was removed.
I search some code sample into the CDO project and i found the CDONotificationBuilder.
public void visit(CDORemoveFeatureDelta delta)
EStructuralFeature feature = delta.getFeature();
int index = delta.getIndex();
Object oldValue = delta.getValue();
if (oldValue instanceof CDOID)
CDOID oldID = (CDOID)oldValue;
CDOObject object = findObjectByID(oldID);
if (object != null)
oldValue = object;
add(new CDODeltaNotificationImpl(object, Notification.REMOVE, feature, oldValue, null, index));
In this sample a CDOObject could be retrieve from the CDODeltaFeature.
In my case the delta.getValue(), always return an UNKNOWN object and not a CDOID.
What is the right way to retrieve a CDOObject from a CDORemoveFeatureDelta ?
Powered by FUDForum
. Page generated in 0.01955 seconds