[Texo] Lazy Loading with Texo [message #1281170] |
Mon, 31 March 2014 09:14  |
Eclipse User |
|
|
|
Hi,
I've got a question regarding lazy loading or better selective loading with Texo. Therefore I'll create a little example:
I want to a list of objects (ObjectA) consisting of primitive types and other object references.
ObjectA
-- name : String
-- description : String
-- ref : ObjectB (Reference)
-- list : List<ObjectC> (Containment list)
Is it possible to load everything in this object besides the containment list (name, description and ref)? That would be great.
Or is it otherwise possible to query those other attributes via the ObjectStore? The query-method won't work, since it only returns whole EObjects.
I would be very happy for any hint!
Bastian
|
|
|
Re: [Texo] Lazy Loading with Texo [message #1281810 is a reply to message #1281170] |
Tue, 01 April 2014 07:40   |
Eclipse User |
|
|
|
Hi Bastian,
Hmm not now, you can check the internals of the EObjectStore, it basically calls the json webservice, the json
webservice supports what you want:
https://wiki.eclipse.org/Texo/JSON_REST_Web_Services#Query_for_multiple_values
So you can force a load by querying for additional referenced data.
I propose the following, can you subclass/extend the EObjectStore with your code and then if you want (I hope!) attach
it to a bugzilla? Then I can add this to the EObjectStore implementation.
Or maybe what you mean is a list of efeature names which are to be loaded and returned as part of the json? Also for
non-containment references.
gr. Martin
On 03/31/2014 03:14 PM, Bastian Wagenfeld wrote:
> Hi,
>
> I've got a question regarding lazy loading or better selective loading with Texo. Therefore I'll create a little example:
>
> I want to a list of objects (ObjectA) consisting of primitive types and other object references.
>
> ObjectA
> -- name : String
> -- description : String
> -- ref : ObjectB (Reference)
> -- list : List<ObjectC> (Containment list)
>
> Is it possible to load everything in this object besides the containment list (name, description and ref)? That would be
> great.
> Or is it otherwise possible to query those other attributes via the ObjectStore? The query-method won't work, since it
> only returns whole EObjects.
>
> I would be very happy for any hint!
> Bastian
--
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
|
|
|
Re: [Texo] Lazy Loading with Texo [message #1282396 is a reply to message #1281810] |
Wed, 02 April 2014 04:31  |
Eclipse User |
|
|
|
Hi Martin,
thanks for that hint. I tried to query via the json service and it worked, but when I try to convert the json to a ResponseType I get a ClassNotFoundException. The problem seems to that the whole Request/Response-model isn't exported by its plugin.
That's not a big deal, since I can "skip" this part of the JSON and go for the data itself, but it would be nicer I think. But this is just for info.
Best regards and thank you for your answer!
Bastian
|
|
|
Powered by
FUDForum. Page generated in 0.24337 seconds