GenericDelegator

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

GenericDelegator

Amine AZZI
Hi all,

I am working on a project where reports are generated through BIRT. I am
using the scripting feature to make the data set.
In the script I am instanciating a org.ofbiz.entity.GenericDelegator object.
and I am using the findAll method to retireive a complete list of a entity.

The report works fine but it gives me only the half of the true count of the
entities in the database. I tries a new BIRT report using a direct JDBC
connection and the report gives the total number.

Does the GenericDelegator use a pagination feature, and how I can disable
it? or at least make the number the records taken at once greater.

Regards.
Amine.
Reply | Threaded
Open this post in threaded view
|

Re: GenericDelegator

Rodrigo Lima-2
2 ways,

1 - Use selectCountByCondition; ( High cost, two querys executes)

2 - Use selectListIteratorByCondition; ( Low cost - do not create
instance of GenericValues). See PartyServices.findParty method to
example.




2007/7/4, Amine AZZI <[hidden email]>:

> Hi all,
>
> I am working on a project where reports are generated through BIRT. I am
> using the scripting feature to make the data set.
> In the script I am instanciating a org.ofbiz.entity.GenericDelegator object.
> and I am using the findAll method to retireive a complete list of a entity.
>
> The report works fine but it gives me only the half of the true count of the
> entities in the database. I tries a new BIRT report using a direct JDBC
> connection and the report gives the total number.
>
> Does the GenericDelegator use a pagination feature, and how I can disable
> it? or at least make the number the records taken at once greater.
>
> Regards.
> Amine.
>
Reply | Threaded
Open this post in threaded view
|

Re: GenericDelegator

Amine AZZI
I found the problem, I forgot to check for null values on a field. and BIRT
stopped retrieving rows from that row and on, stangely the problem record
was exactly at the middle of the table, which made me think that the
GenericDelegator don't retrieve all records at once.

Sorry for the noise.
Amine.

2007/7/4, Rodrigo Souza <[hidden email]>:

>
> 2 ways,
>
> 1 - Use selectCountByCondition; ( High cost, two querys executes)
>
> 2 - Use selectListIteratorByCondition; ( Low cost - do not create
> instance of GenericValues). See PartyServices.findParty method to
> example.
>
>
>
>
> 2007/7/4, Amine AZZI <[hidden email]>:
> > Hi all,
> >
> > I am working on a project where reports are generated through BIRT. I am
> > using the scripting feature to make the data set.
> > In the script I am instanciating a org.ofbiz.entity.GenericDelegatorobject.
> > and I am using the findAll method to retireive a complete list of a
> entity.
> >
> > The report works fine but it gives me only the half of the true count of
> the
> > entities in the database. I tries a new BIRT report using a direct JDBC
> > connection and the report gives the total number.
> >
> > Does the GenericDelegator use a pagination feature, and how I can
> disable
> > it? or at least make the number the records taken at once greater.
> >
> > Regards.
> > Amine.
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: GenericDelegator

Rodrigo Lima-2
Ok,

Welcome to OfBiz! ;)

2007/7/4, Amine AZZI <[hidden email]>:

> I found the problem, I forgot to check for null values on a field. and BIRT
> stopped retrieving rows from that row and on, stangely the problem record
> was exactly at the middle of the table, which made me think that the
> GenericDelegator don't retrieve all records at once.
>
> Sorry for the noise.
> Amine.
>
> 2007/7/4, Rodrigo Souza <[hidden email]>:
> >
> > 2 ways,
> >
> > 1 - Use selectCountByCondition; ( High cost, two querys executes)
> >
> > 2 - Use selectListIteratorByCondition; ( Low cost - do not create
> > instance of GenericValues). See PartyServices.findParty method to
> > example.
> >
> >
> >
> >
> > 2007/7/4, Amine AZZI <[hidden email]>:
> > > Hi all,
> > >
> > > I am working on a project where reports are generated through BIRT. I am
> > > using the scripting feature to make the data set.
> > > In the script I am instanciating a org.ofbiz.entity.GenericDelegatorobject.
> > > and I am using the findAll method to retireive a complete list of a
> > entity.
> > >
> > > The report works fine but it gives me only the half of the true count of
> > the
> > > entities in the database. I tries a new BIRT report using a direct JDBC
> > > connection and the report gives the total number.
> > >
> > > Does the GenericDelegator use a pagination feature, and how I can
> > disable
> > > it? or at least make the number the records taken at once greater.
> > >
> > > Regards.
> > > Amine.
> > >
> >
>