Skip to main content



      Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Hibernate Paging
Hibernate Paging [message #119092] Fri, 18 April 2008 20:03 Go to next message
Eclipse UserFriend
The Hibernate product supports paging feature.
In my database I've 11,000 parts, when the user is looking for a part
that start with 'A', he might end with 1,000 part numbers in one query!

How can I enable paging with TENEO and retrieve a page at a time?

Thanks
Yigal
Re: Hibernate Paging [message #119103 is a reply to message #119092] Sat, 19 April 2008 02:14 Go to previous messageGo to next message
Eclipse UserFriend
Hi Yigal,
Do you mean the setMaxResults on the query? See comments below.

gr. Martin

Yigal wrote:
> The Hibernate product supports paging feature.
> In my database I've 11,000 parts, when the user is looking for a part
> that start with 'A', he might end with 1,000 part numbers in one query!
>
> How can I enable paging with TENEO and retrieve a page at a time?
MT>> It depends on what you do. Are you using resources or direct hibernate queries? With direct
hibernate queries you can use the maxResults. Using the HibernateResource it is more difficult (but
not impossible) as the resource api in itself does not support paging. Let me know what you plan to
do and then I can comment in more detail.

>
> Thanks
> Yigal


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
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: Hibernate Paging [message #119235 is a reply to message #119103] Sat, 19 April 2008 13:45 Go to previous messageGo to next message
Eclipse UserFriend
I built the architecture around HibernateResource, so I would prefer to
continue using that.
I know about the hibernate queries, I just wanted to know if TENEO and
resource supports the maxResults?

Thanks
Yigal

Martin Taal wrote:
> Hi Yigal,
> Do you mean the setMaxResults on the query? See comments below.
>
> gr. Martin
>
> Yigal wrote:
>> The Hibernate product supports paging feature.
>> In my database I've 11,000 parts, when the user is looking for a part
>> that start with 'A', he might end with 1,000 part numbers in one query!
>>
>> How can I enable paging with TENEO and retrieve a page at a time?
> MT>> It depends on what you do. Are you using resources or direct
> hibernate queries? With direct
> hibernate queries you can use the maxResults. Using the
> HibernateResource it is more difficult (but not impossible) as the
> resource api in itself does not support paging. Let me know what you
> plan to do and then I can comment in more detail.
>
>>
>> Thanks
>> Yigal
>
>
Re: Hibernate Paging [message #119298 is a reply to message #119235] Sun, 20 April 2008 01:41 Go to previous message
Eclipse UserFriend
Hi Yigal,
No the hibernateresource does not support maxresults at least afaik it is not possible to pass the
maxresults in the hql-string itself, but it needs to be set on the query object. So in this case I
would override HibernateResource with your own implementation, you only need to override the
loadUsingDefinedQueries method which is fairly simple to do.

Then you also need to implement and register your own ResourceFactory.

gr. Martin

Yigal wrote:
> I built the architecture around HibernateResource, so I would prefer to
> continue using that.
> I know about the hibernate queries, I just wanted to know if TENEO and
> resource supports the maxResults?
>
> Thanks
> Yigal
>
> Martin Taal wrote:
>> Hi Yigal,
>> Do you mean the setMaxResults on the query? See comments below.
>>
>> gr. Martin
>>
>> Yigal wrote:
>>> The Hibernate product supports paging feature.
>>> In my database I've 11,000 parts, when the user is looking for a part
>>> that start with 'A', he might end with 1,000 part numbers in one query!
>>>
>>> How can I enable paging with TENEO and retrieve a page at a time?
>> MT>> It depends on what you do. Are you using resources or direct
>> hibernate queries? With direct
>> hibernate queries you can use the maxResults. Using the
>> HibernateResource it is more difficult (but not impossible) as the
>> resource api in itself does not support paging. Let me know what you
>> plan to do and then I can comment in more detail.
>>
>>>
>>> Thanks
>>> Yigal
>>
>>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
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: Hibernate Paging [message #617842 is a reply to message #119092] Sat, 19 April 2008 02:14 Go to previous message
Eclipse UserFriend
Hi Yigal,
Do you mean the setMaxResults on the query? See comments below.

gr. Martin

Yigal wrote:
> The Hibernate product supports paging feature.
> In my database I've 11,000 parts, when the user is looking for a part
> that start with 'A', he might end with 1,000 part numbers in one query!
>
> How can I enable paging with TENEO and retrieve a page at a time?
MT>> It depends on what you do. Are you using resources or direct hibernate queries? With direct
hibernate queries you can use the maxResults. Using the HibernateResource it is more difficult (but
not impossible) as the resource api in itself does not support paging. Let me know what you plan to
do and then I can comment in more detail.

>
> Thanks
> Yigal


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
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: Hibernate Paging [message #617852 is a reply to message #119103] Sat, 19 April 2008 13:45 Go to previous message
Eclipse UserFriend
I built the architecture around HibernateResource, so I would prefer to
continue using that.
I know about the hibernate queries, I just wanted to know if TENEO and
resource supports the maxResults?

Thanks
Yigal

Martin Taal wrote:
> Hi Yigal,
> Do you mean the setMaxResults on the query? See comments below.
>
> gr. Martin
>
> Yigal wrote:
>> The Hibernate product supports paging feature.
>> In my database I've 11,000 parts, when the user is looking for a part
>> that start with 'A', he might end with 1,000 part numbers in one query!
>>
>> How can I enable paging with TENEO and retrieve a page at a time?
> MT>> It depends on what you do. Are you using resources or direct
> hibernate queries? With direct
> hibernate queries you can use the maxResults. Using the
> HibernateResource it is more difficult (but not impossible) as the
> resource api in itself does not support paging. Let me know what you
> plan to do and then I can comment in more detail.
>
>>
>> Thanks
>> Yigal
>
>
Re: Hibernate Paging [message #617857 is a reply to message #119235] Sun, 20 April 2008 01:41 Go to previous message
Eclipse UserFriend
Hi Yigal,
No the hibernateresource does not support maxresults at least afaik it is not possible to pass the
maxresults in the hql-string itself, but it needs to be set on the query object. So in this case I
would override HibernateResource with your own implementation, you only need to override the
loadUsingDefinedQueries method which is fairly simple to do.

Then you also need to implement and register your own ResourceFactory.

gr. Martin

Yigal wrote:
> I built the architecture around HibernateResource, so I would prefer to
> continue using that.
> I know about the hibernate queries, I just wanted to know if TENEO and
> resource supports the maxResults?
>
> Thanks
> Yigal
>
> Martin Taal wrote:
>> Hi Yigal,
>> Do you mean the setMaxResults on the query? See comments below.
>>
>> gr. Martin
>>
>> Yigal wrote:
>>> The Hibernate product supports paging feature.
>>> In my database I've 11,000 parts, when the user is looking for a part
>>> that start with 'A', he might end with 1,000 part numbers in one query!
>>>
>>> How can I enable paging with TENEO and retrieve a page at a time?
>> MT>> It depends on what you do. Are you using resources or direct
>> hibernate queries? With direct
>> hibernate queries you can use the maxResults. Using the
>> HibernateResource it is more difficult (but not impossible) as the
>> resource api in itself does not support paging. Let me know what you
>> plan to do and then I can comment in more detail.
>>
>>>
>>> Thanks
>>> Yigal
>>
>>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
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
Previous Topic:[Teneo] id and version
Next Topic:[CDO] Client registration timeout exception
Goto Forum:
  


Current Time: Sat May 10 03:31:35 EDT 2025

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

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

Back to the top