|Utility to obtain model root [message #508624]
||Tue, 19 January 2010 16:27
| Pierre Francis Roy
Registered: July 2009
My application have two models that are persisted using Teneo. Each model have its own root which are contained in a resourceSet loaded from my database.
Here's my model root aggregates (using containment).
I'm searching an effective way to get a reference to Application and Database object from the resource object instead of doing something like this:
Resource resource = editingDomain.getResourceSet().getResource(resourceURI, true);
Application app = (Application) resource.get(0);
Database data = (Database) resource.get(1);
And having to guess that Application will be at index 0 and Database at index 1 (or vice-versa). I saw an article where the examples was using a utility function to easily get the root object, but can't find it back. Can you please give me hints about this subject?
Powered by FUDForum
. Page generated in 0.01725 seconds