Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Teneo] Delete Model and unset all CrossReferences
[Teneo] Delete Model and unset all CrossReferences [message #1228944] Wed, 08 January 2014 11:48
Jürgen Weinberger is currently offline Jürgen WeinbergerFriend
Messages: 42
Registered: August 2012
Member
Hi! I am still new to Teneo Smile and couldn't find anything usefull on the net. But people must have this problem too.

I want to unset (nullify) crossreferences of a model on delete.

With a xmi-resources this is easy
	private void unsetCrossReferences(EObject model) {
		Collection<Setting> find = EcoreUtil.UsageCrossReferencer.find(model, getEditingDomain().getResourceSet());
		for(Setting setting : find) { setting.unset(); }			
	}


I found in the web that with teneo one should use the HbDataStore:
Object[] 
HbDataStore hbDataStore
..
Object[] objects = hbDataStore.getCrossReferencers(getHibernateSession(), eObject);


This also works fine and i get all the referenced EObjects, but now i am stuck.
How do i unset/nullify the correct references in these eObjects?
Is there a way to get the "EStructuralFeature.Setting" from this EObjects to unset them?

Sure i could also manualy remove the references in the concrete objects but i am looking for a more generic way like the xmi - approach.

Is this possible and a correct approach? Does anybody now of some samples? This should be a common problem i think.

Thanks in advanced
and best regards weinma
Previous Topic:[Edapt] Usage under Eclipse Kepler
Next Topic:[Teneo] Delete Model and unset all CrossReferences
Goto Forum:
  


Current Time: Tue Mar 09 08:45:35 GMT 2021

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

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

Back to the top