Skip to main content



      Home
Home » Modeling » EMF » creating filter methods in emf code.
creating filter methods in emf code. [message #1063064] Wed, 12 June 2013 01:56 Go to next message
Eclipse UserFriend
hello guys,
i working on a project and using EMF and CDO framework,
in my project i m fetching records of students in a school.
i m getting all the records by the help of ereference but i needed to get a filtered and sorted list of students without using JFace datadinding.
is it possible to do so?

please help me here guys!

Rolling Eyes
Re: creating filter methods in emf code. [message #1063065 is a reply to message #1063064] Wed, 12 June 2013 02:03 Go to previous messageGo to next message
Eclipse UserFriend
You'll have to do that by iterating over the list of all students,
creating the filtered result, and then sorting to your criteria using
basic Java utilities, such as Collections.sort.

On 12/06/2013 7:56 AM, Lakhveer Singh wrote:
> hello guys, i working on a project and using EMF and CDO framework,
> in my project i m fetching records of students in a school. i m
> getting all the records by the help of ereference but i needed to get
> a filtered and sorted list of students without using JFace datadinding.
> is it possible to do so?
>
> please help me here guys!
>
> :roll:
Re: creating filter methods in emf code. [message #1063070 is a reply to message #1063065] Wed, 12 June 2013 02:36 Go to previous messageGo to next message
Eclipse UserFriend
thanks,


but isn't there any way by which we should get the sorted and filtered objects from database model like by creating or modifying the methods in entity class or something else?
Re: creating filter methods in emf code. [message #1063072 is a reply to message #1063070] Wed, 12 June 2013 02:48 Go to previous messageGo to next message
Eclipse UserFriend
Hi

If your run-time queries are known at design time you can use derived
features.

Regards

Ed Willink

On 12/06/2013 07:36, Lakhveer Singh wrote:
> thanks,
>
> but isn't there any way by which we should get the sorted and filtered
> objects from database model like by creating or modifying the methods
> in entity class or something else?
Re: creating filter methods in emf code. [message #1063184 is a reply to message #1063072] Wed, 12 June 2013 10:40 Go to previous message
Eclipse UserFriend
On 12-06-13 08:48, Ed Willink wrote:
> Hi
>
> If your run-time queries are known at design time you can use derived
> features.
>
Hi Ed,

Just to understand this better in the context of CDO.

Would a derived feature be able to invoke an OCL Query, which would be
handled by the OCL Query Handler, resulting in a CDOStore dip, which
would not fetch the whole collection, but filter first? In other words
can the OCL Query Handler be aware of the underlying Store and optimize
(i.e. SELECT) the queries to it?

I never managed to get a grip, if the OCL Query Handler for CDO,
supports this optimization?

What I do now is to execute a CDO SQL Query, which indeed only returns
the intended objects. Iteration is nice, but it really doesn't make
sense to fetch 10.000 objects and throw most of them away on the client
side again after 'java' filtering.

Rgds Christophe


> Regards
>
> Ed Willink
>
> On 12/06/2013 07:36, Lakhveer Singh wrote:
>> thanks,
>>
>> but isn't there any way by which we should get the sorted and filtered
>> objects from database model like by creating or modifying the methods
>> in entity class or something else?
>
Previous Topic:[CDO] How to list a folder content taking into account permissions
Next Topic:Using EMF/GWT with Juno SR1
Goto Forum:
  


Current Time: Wed Jul 30 17:50:15 EDT 2025

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

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

Back to the top