|
|
|
Re: [CDO] Is there a way to get the 'diff' of two CDO Audit views? [message #500039 is a reply to message #500031] |
Tue, 24 November 2009 18:44 |
|
Lothar Werzinger schrieb:
> Eike Stepper wrote:
>
>
>> Lothar Werzinger schrieb:
>>
>>> Is there a way to get the 'diff' of two CDO Audit views?
>>>
>> No, a CDOView, audit or not, is just a partial cache on the overall
>> object graph.
>>
>>
>>> Theoretically one
>>> could use EMF compare, but that would require to transfer the whole model
>>> to the client twice and with large models that is clearly undesirable.
>>>
>>>
>> Yes, but that's currently the only way I could imagine to do this.
>>
>
> But on the server it should be relatively easy to query the changes that
> have a timestamp greater than X1 and less or equal X2, right? So the only
> missing piece would be CDO API to access that query.
>
You could use the Query API with a custom query handler for that purpose.
>>> There there a way to ask CDO for the changes in the model based on two
>>> timestaps without using EMF compare?
>>>
>>>
>> For a given object you can access its CDORevision, ask its version or
>> compare it to other revisions of the same EClass (returns a
>> CDORevisionDelta). There's a static method in CDOUtil that makes this
>> easy: CDOUtil.getRevision(CDOObject object, int version) or so.
>>
>
> So if I know that an object that I am interested in has changed then this
> method allows me to get it's previous state with that helper method.
> Does that work in any CDO view type (e.g. Transaction)?
>
Yes ;-)
Cheers
/Eike
----
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
Powered by
FUDForum. Page generated in 0.03065 seconds