Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Teneo] How to get the audit history of a deleted entity?
[Teneo] How to get the audit history of a deleted entity? [message #1249691] Tue, 18 February 2014 14:22 Go to next message
Erdal Karaca is currently offline Erdal KaracaFriend
Messages: 854
Registered: July 2009
Senior Member
Hi Martin,
When traversing the history of an entity I may encounter deleted entities for which I want to recursively obtain the history itself. At that point I have only the URI of it which has this format:
http://www.eclipse.org/teneo/auditing#1392732431978;EntityName;java.lang.String;a4fa1673-cdb5-4b8f-8282-f7eefa475c8c

How do I get the history of a deleted entity (using its URI)?
Re: [Teneo] How to get the audit history of a deleted entity? [message #1250415 is a reply to message #1249691] Wed, 19 February 2014 08:15 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Erdal,
Can you try the following:
- from the datastore get the AuditHandler
- then using the URI string as a parameter call: auditHandler.fromString(uriAsString)
- the auditreference has the entity name, id and timestamp, to get from the entityname to the eclass:
dataStore.getEntityNameStrategy().toEClass(entityName)
- then get the auditversionprovider from the datastore and call auditVersionProvider.getAuditEntry(eclass, id, timestamp)

This can clearly be made easier in the auditVersionProvider by having a method there getAuditEntry(String)... Can you
add a bugzilla and attach your working code on it?

gr. Martin

On 02/18/2014 03:22 PM, Erdal Karaca wrote:
> Hi Martin,
> When traversing the history of an entity I may encounter deleted entities for which I want to recursively obtain the
> history itself. At that point I have only the URI of it which has this format:
> http://www.eclipse.org/teneo/auditing#1392732431978;EntityName;java.lang.String;a4fa1673-cdb5-4b8f-8282-f7eefa475c8c
>
> How do I get the history of a deleted entity (using its URI)?
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Previous Topic:[EMFStore/ECP] Can't add more than approx. 58.000 model elements to project
Next Topic:[Emfatic] Assign attribute in inheritance
Goto Forum:
  


Current Time: Tue Mar 19 06:10:35 GMT 2024

Powered by FUDForum. Page generated in 0.02132 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top