Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » DynamicEObjectImpl.basicSet?
DynamicEObjectImpl.basicSet? [message #427998] Mon, 09 March 2009 15:32 Go to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Ed,
Does DynamicEObjectImpl have something like a basicSet method which does not update the inverse of an association?
(for example in the Library example, the BookImpl.basicSetAuthor method)


--

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@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: DynamicEObjectImpl.basicSet? [message #428000 is a reply to message #427998] Mon, 09 March 2009 15:47 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33218
Registered: July 2009
Senior Member
Martin,

InternalEObject.eInverseAdd/eInverseRemove do the 1/2 updates on the one
side. See how the generated eInverseAdd/eInverseRemove call basicSetAuthor?


Martin Taal wrote:
> Hi Ed,
> Does DynamicEObjectImpl have something like a basicSet method which
> does not update the inverse of an association?
> (for example in the Library example, the BookImpl.basicSetAuthor method)
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: DynamicEObjectImpl.basicSet? [message #428002 is a reply to message #428000] Mon, 09 March 2009 16:11 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Ed,
Yes I see the basicSetAuthor, but which method on DynamicEObjectImpl would correspond to it?
Some background: I am only using DynamicEObjectImpl's and I am converting a structure of non-eobjects to
DynamicEObjectImpl. This conversion is easier if there are no bidirectional things happening, i.e. the conversion takes
care of setting both sides of a bidirectional association.

Would DynamicEObjectImpl.dynamicSet be a good choice in this case?
As all the feature's are dynamic I guess that eClass.getFeatureId(feature) will give the dynamicfeatureid?

gr. Martin

Ed Merks wrote:
> Martin,
>
> InternalEObject.eInverseAdd/eInverseRemove do the 1/2 updates on the one
> side. See how the generated eInverseAdd/eInverseRemove call
> basicSetAuthor?
>
>
> Martin Taal wrote:
>> Hi Ed,
>> Does DynamicEObjectImpl have something like a basicSet method which
>> does not update the inverse of an association?
>> (for example in the Library example, the BookImpl.basicSetAuthor method)
>>
>>


--

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@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: DynamicEObjectImpl.basicSet? [message #428006 is a reply to message #428002] Mon, 09 March 2009 16:39 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33218
Registered: July 2009
Senior Member
Martin,

Comments below.


Martin Taal wrote:
> Hi Ed,
> Yes I see the basicSetAuthor, but which method on DynamicEObjectImpl
> would correspond to it?
You should never assume any specific Impl will be used, though we do
expect any impl to extend BasicEObjectImpl.
> Some background: I am only using DynamicEObjectImpl's and I am
> converting a structure of non-eobjects to DynamicEObjectImpl. This
> conversion is easier if there are no bidirectional things happening,
> i.e. the conversion takes care of setting both sides of a
> bidirectional association.
>
> Would DynamicEObjectImpl.dynamicSet be a good choice in this case?
No.
> As all the feature's are dynamic I guess that
> eClass.getFeatureId(feature) will give the dynamicfeatureid?
How come you didn't like my eInverseAdd/eInverseRemove answer? I'm
going to stick with that for now. :-P Whatever the answer, it needs to
be in an interface implemented by all modeled objects...
>
> gr. Martin
>
> Ed Merks wrote:
>> Martin,
>>
>> InternalEObject.eInverseAdd/eInverseRemove do the 1/2 updates on the
>> one side. See how the generated eInverseAdd/eInverseRemove call
>> basicSetAuthor?
>>
>>
>> Martin Taal wrote:
>>> Hi Ed,
>>> Does DynamicEObjectImpl have something like a basicSet method which
>>> does not update the inverse of an association?
>>> (for example in the Library example, the BookImpl.basicSetAuthor
>>> method)
>>>
>>>
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: DynamicEObjectImpl.basicSet? [message #428010 is a reply to message #428006] Mon, 09 March 2009 16:53 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Ed,
Ha okay (finally listening to you I think :-), inverseAdd is basically the same as basicSet for a single ereference,
one final question the featureid for this call should be obtained like this:
eClass.getFeatureId(feature)

correct?

or is it feature.getFeatureId() in this case?

gr. Martin

Ed Merks wrote:
> Martin,
>
> Comments below.
>
>
> Martin Taal wrote:
>> Hi Ed,
>> Yes I see the basicSetAuthor, but which method on DynamicEObjectImpl
>> would correspond to it?
> You should never assume any specific Impl will be used, though we do
> expect any impl to extend BasicEObjectImpl.
>> Some background: I am only using DynamicEObjectImpl's and I am
>> converting a structure of non-eobjects to DynamicEObjectImpl. This
>> conversion is easier if there are no bidirectional things happening,
>> i.e. the conversion takes care of setting both sides of a
>> bidirectional association.
>>
>> Would DynamicEObjectImpl.dynamicSet be a good choice in this case?
> No.
>> As all the feature's are dynamic I guess that
>> eClass.getFeatureId(feature) will give the dynamicfeatureid?
> How come you didn't like my eInverseAdd/eInverseRemove answer? I'm
> going to stick with that for now. :-P Whatever the answer, it needs to
> be in an interface implemented by all modeled objects...
>>
>> gr. Martin
>>
>> Ed Merks wrote:
>>> Martin,
>>>
>>> InternalEObject.eInverseAdd/eInverseRemove do the 1/2 updates on the
>>> one side. See how the generated eInverseAdd/eInverseRemove call
>>> basicSetAuthor?
>>>
>>>
>>> Martin Taal wrote:
>>>> Hi Ed,
>>>> Does DynamicEObjectImpl have something like a basicSet method which
>>>> does not update the inverse of an association?
>>>> (for example in the Library example, the BookImpl.basicSetAuthor
>>>> method)
>>>>
>>>>
>>
>>


--

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@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: DynamicEObjectImpl.basicSet? [message #428017 is a reply to message #428010] Mon, 09 March 2009 18:08 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33218
Registered: July 2009
Senior Member
Martin,

If you use the one specific to the actual class, then you can pass in
null for the other parameter.


Martin Taal wrote:
> Hi Ed,
> Ha okay (finally listening to you I think :-), inverseAdd is basically
> the same as basicSet for a single ereference,
> one final question the featureid for this call should be obtained like
> this:
> eClass.getFeatureId(feature)
>
> correct?
>
> or is it feature.getFeatureId() in this case?
>
> gr. Martin
>
> Ed Merks wrote:
>> Martin,
>>
>> Comments below.
>>
>>
>> Martin Taal wrote:
>>> Hi Ed,
>>> Yes I see the basicSetAuthor, but which method on DynamicEObjectImpl
>>> would correspond to it?
>> You should never assume any specific Impl will be used, though we do
>> expect any impl to extend BasicEObjectImpl.
>>> Some background: I am only using DynamicEObjectImpl's and I am
>>> converting a structure of non-eobjects to DynamicEObjectImpl. This
>>> conversion is easier if there are no bidirectional things happening,
>>> i.e. the conversion takes care of setting both sides of a
>>> bidirectional association.
>>>
>>> Would DynamicEObjectImpl.dynamicSet be a good choice in this case?
>> No.
>>> As all the feature's are dynamic I guess that
>>> eClass.getFeatureId(feature) will give the dynamicfeatureid?
>> How come you didn't like my eInverseAdd/eInverseRemove answer? I'm
>> going to stick with that for now. :-P Whatever the answer, it needs
>> to be in an interface implemented by all modeled objects...
>>>
>>> gr. Martin
>>>
>>> Ed Merks wrote:
>>>> Martin,
>>>>
>>>> InternalEObject.eInverseAdd/eInverseRemove do the 1/2 updates on
>>>> the one side. See how the generated eInverseAdd/eInverseRemove
>>>> call basicSetAuthor?
>>>>
>>>>
>>>> Martin Taal wrote:
>>>>> Hi Ed,
>>>>> Does DynamicEObjectImpl have something like a basicSet method
>>>>> which does not update the inverse of an association?
>>>>> (for example in the Library example, the BookImpl.basicSetAuthor
>>>>> method)
>>>>>
>>>>>
>>>
>>>
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: DynamicEObjectImpl.basicSet? [message #428080 is a reply to message #428017] Mon, 09 March 2009 18:12 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hmm, I try to match your answer with my question but I do not see a relation... :-)

Which other parameter do you mean?

gr. Martin

Ed Merks wrote:
> Martin,
>
> If you use the one specific to the actual class, then you can pass in
> null for the other parameter.
>
>
> Martin Taal wrote:
>> Hi Ed,
>> Ha okay (finally listening to you I think :-), inverseAdd is basically
>> the same as basicSet for a single ereference,
>> one final question the featureid for this call should be obtained like
>> this:
>> eClass.getFeatureId(feature)
>>
>> correct?
>>
>> or is it feature.getFeatureId() in this case?
>>
>> gr. Martin
>>
>> Ed Merks wrote:
>>> Martin,
>>>
>>> Comments below.
>>>
>>>
>>> Martin Taal wrote:
>>>> Hi Ed,
>>>> Yes I see the basicSetAuthor, but which method on DynamicEObjectImpl
>>>> would correspond to it?
>>> You should never assume any specific Impl will be used, though we do
>>> expect any impl to extend BasicEObjectImpl.
>>>> Some background: I am only using DynamicEObjectImpl's and I am
>>>> converting a structure of non-eobjects to DynamicEObjectImpl. This
>>>> conversion is easier if there are no bidirectional things happening,
>>>> i.e. the conversion takes care of setting both sides of a
>>>> bidirectional association.
>>>>
>>>> Would DynamicEObjectImpl.dynamicSet be a good choice in this case?
>>> No.
>>>> As all the feature's are dynamic I guess that
>>>> eClass.getFeatureId(feature) will give the dynamicfeatureid?
>>> How come you didn't like my eInverseAdd/eInverseRemove answer? I'm
>>> going to stick with that for now. :-P Whatever the answer, it needs
>>> to be in an interface implemented by all modeled objects...
>>>>
>>>> gr. Martin
>>>>
>>>> Ed Merks wrote:
>>>>> Martin,
>>>>>
>>>>> InternalEObject.eInverseAdd/eInverseRemove do the 1/2 updates on
>>>>> the one side. See how the generated eInverseAdd/eInverseRemove
>>>>> call basicSetAuthor?
>>>>>
>>>>>
>>>>> Martin Taal wrote:
>>>>>> Hi Ed,
>>>>>> Does DynamicEObjectImpl have something like a basicSet method
>>>>>> which does not update the inverse of an association?
>>>>>> (for example in the Library example, the BookImpl.basicSetAuthor
>>>>>> method)
>>>>>>
>>>>>>
>>>>
>>>>
>>
>>


--

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@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: DynamicEObjectImpl.basicSet? [message #428082 is a reply to message #428080] Mon, 09 March 2009 18:14 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33218
Registered: July 2009
Senior Member
Martin,

Sorry.

The baseClass can just be null if the featureID (so yes, use the feature
ID computed by the actual EClass) doesn't need offset correction.


Martin Taal wrote:
> Hmm, I try to match your answer with my question but I do not see a
> relation... :-)
>
> Which other parameter do you mean?
>
> gr. Martin
>
> Ed Merks wrote:
>> Martin,
>>
>> If you use the one specific to the actual class, then you can pass in
>> null for the other parameter.
>>
>>
>> Martin Taal wrote:
>>> Hi Ed,
>>> Ha okay (finally listening to you I think :-), inverseAdd is
>>> basically the same as basicSet for a single ereference,
>>> one final question the featureid for this call should be obtained
>>> like this:
>>> eClass.getFeatureId(feature)
>>>
>>> correct?
>>>
>>> or is it feature.getFeatureId() in this case?
>>>
>>> gr. Martin
>>>
>>> Ed Merks wrote:
>>>> Martin,
>>>>
>>>> Comments below.
>>>>
>>>>
>>>> Martin Taal wrote:
>>>>> Hi Ed,
>>>>> Yes I see the basicSetAuthor, but which method on
>>>>> DynamicEObjectImpl would correspond to it?
>>>> You should never assume any specific Impl will be used, though we
>>>> do expect any impl to extend BasicEObjectImpl.
>>>>> Some background: I am only using DynamicEObjectImpl's and I am
>>>>> converting a structure of non-eobjects to DynamicEObjectImpl. This
>>>>> conversion is easier if there are no bidirectional things
>>>>> happening, i.e. the conversion takes care of setting both sides of
>>>>> a bidirectional association.
>>>>>
>>>>> Would DynamicEObjectImpl.dynamicSet be a good choice in this case?
>>>> No.
>>>>> As all the feature's are dynamic I guess that
>>>>> eClass.getFeatureId(feature) will give the dynamicfeatureid?
>>>> How come you didn't like my eInverseAdd/eInverseRemove answer? I'm
>>>> going to stick with that for now. :-P Whatever the answer, it
>>>> needs to be in an interface implemented by all modeled objects...
>>>>>
>>>>> gr. Martin
>>>>>
>>>>> Ed Merks wrote:
>>>>>> Martin,
>>>>>>
>>>>>> InternalEObject.eInverseAdd/eInverseRemove do the 1/2 updates on
>>>>>> the one side. See how the generated eInverseAdd/eInverseRemove
>>>>>> call basicSetAuthor?
>>>>>>
>>>>>>
>>>>>> Martin Taal wrote:
>>>>>>> Hi Ed,
>>>>>>> Does DynamicEObjectImpl have something like a basicSet method
>>>>>>> which does not update the inverse of an association?
>>>>>>> (for example in the Library example, the BookImpl.basicSetAuthor
>>>>>>> method)
>>>>>>>
>>>>>>>
>>>>>
>>>>>
>>>
>>>
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:[Teneo CDO] Problem generating mapping file
Next Topic:Editor that generates code
Goto Forum:
  


Current Time: Thu Sep 26 07:59:36 GMT 2024

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

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

Back to the top