delegator.findAll() missing?

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

delegator.findAll() missing?

Jad El Omeiri
Hi,

I'm trying to use delegator.findAll("entityName") in beanshell.
Was the method moved, removed, changed, or replaced?
Because for example I can use delegator.getNextSeqId("entityName") successfully.
I actually couldn't find any method called findAll() in the Ofbiz packages!

Cheers,
Jad El Omeiri
Reply | Threaded
Open this post in threaded view
|

Re: delegator.findAll() missing?

Rong Nguyen
You can use custom SQL:
String helperName = delegator.getGroupHelperName("org.ofbiz");
SQLProcessor sqlProc = new SQLProcessor(helperName);
sqlProc.prepareStatement("SELECT * FROM TABLE");
ResultSet resultSet = sqlproc.executeQuery();
Rong Nguyen

Olbius JSC
Deliver highest business value
http://www.olbius.com/
Reply | Threaded
Open this post in threaded view
|

Re: delegator.findAll() missing?

Deepak Dixit-2
In reply to this post by Jad El Omeiri
Hi Jad,

Which release are you using?
findAll exists in trunk (refer GenericDelegtor.java)

Thanks & Regards
--
Deepak Dixit


On Jan 17, 2014, at 2:35 PM, Jad El Omeiri wrote:

> Hi,
>
> I'm trying to use delegator.findAll("entityName") in beanshell.
> Was the method moved, removed, changed, or replaced?
> Because for example I can use delegator.getNextSeqId("entityName")
> successfully.
> I actually couldn't find any method called findAll() in the Ofbiz packages!
>
> Cheers,
>
>
>
> -----
> Jad El Omeiri
> --
> View this message in context: http://ofbiz.135035.n4.nabble.com/delegator-findAll-missing-tp4647322.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.


smime.p7s (6K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: delegator.findAll() missing?

Jad El Omeiri
In reply to this post by Rong Nguyen
Thanks rongnguyen!

rongnguyen wrote
You can use custom SQL:
String helperName = delegator.getGroupHelperName("org.ofbiz");
SQLProcessor sqlProc = new SQLProcessor(helperName);
sqlProc.prepareStatement("SELECT * FROM TABLE");
ResultSet resultSet = sqlproc.executeQuery();
And Deepak, I'm using 12.04.02! And weird enough I can't find findAll() in GenericDelegator!

Deepak Dixit-2 wrote
Hi Jad,

Which release are you using?
findAll exists in trunk (refer GenericDelegtor.java)

Thanks & Regards
--
Deepak Dixit


On Jan 17, 2014, at 2:35 PM, Jad El Omeiri wrote:

> Hi,
>
> I'm trying to use delegator.findAll("entityName") in beanshell.
> Was the method moved, removed, changed, or replaced?
> Because for example I can use delegator.getNextSeqId("entityName")
> successfully.
> I actually couldn't find any method called findAll() in the Ofbiz packages!
>
> Cheers,
>
>
>
> -----
> Jad El Omeiri
> --
> View this message in context: http://ofbiz.135035.n4.nabble.com/delegator-findAll-missing-tp4647322.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.



smime.p7s (6K) <http://ofbiz.135035.n4.nabble.com/attachment/4647324/0/smime.p7s>
Jad El Omeiri
Reply | Threaded
Open this post in threaded view
|

Re: delegator.findAll() missing?

Jacques Le Roux
Administrator
In reply to this post by Deepak Dixit-2
Yes, I re-added it http://markmail.org/message/ksjyrv5mfp3l2ehk

Jacques

On Friday, January 17, 2014 10:28 AM, [hidden email] wrote

> Hi Jad,
>
> Which release are you using?
> findAll exists in trunk (refer GenericDelegtor.java)
>
> Thanks & Regards
>
>> Hi,
>>
>> I'm trying to use delegator.findAll("entityName") in beanshell.
>> Was the method moved, removed, changed, or replaced?
>> Because for example I can use delegator.getNextSeqId("entityName")
>> successfully.
>> I actually couldn't find any method called findAll() in the Ofbiz packages!
>>
>> Cheers,
>>
>>
>>
>> -----
>> Jad El Omeiri
>> --
>> View this message in context: http://ofbiz.135035.n4.nabble.com/delegator-findAll-missing-tp4647322.html
>> Sent from the OFBiz - User mailing list archive at Nabble.com.
Reply | Threaded
Open this post in threaded view
|

Re: delegator.findAll() missing?

Malin Nicolas
In reply to this post by Jad El Omeiri
Hi,

You can try delegator.findList("entityName", null, null, null, null, false);

Nicolas

Le 17/01/2014 10:05, Jad El Omeiri a écrit :

> Hi,
>
> I'm trying to use delegator.findAll("entityName") in beanshell.
> Was the method moved, removed, changed, or replaced?
> Because for example I can use delegator.getNextSeqId("entityName")
> successfully.
> I actually couldn't find any method called findAll() in the Ofbiz packages!
>
> Cheers,
>
>
>
> -----
> Jad El Omeiri
> --
> View this message in context: http://ofbiz.135035.n4.nabble.com/delegator-findAll-missing-tp4647322.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.


--
Nicolas MALIN
Consultant
Tél : 06.17.66.40.06
Site projet : http://www.neogia.org/
-------
Société LibrenBerry
Tél : 02.48.02.56.12
Site : http://www.librenberry.net/

Reply | Threaded
Open this post in threaded view
|

Re: delegator.findAll() missing?

Jad El Omeiri
In reply to this post by Jacques Le Roux
Ok, great! Thank you Jacques!

Jacques Le Roux wrote
Yes, I re-added it http://markmail.org/message/ksjyrv5mfp3l2ehk

Jacques

On Friday, January 17, 2014 10:28 AM, [hidden email] wrote
> Hi Jad,
>
> Which release are you using?
> findAll exists in trunk (refer GenericDelegtor.java)
>
> Thanks & Regards
>
>> Hi,
>>
>> I'm trying to use delegator.findAll("entityName") in beanshell.
>> Was the method moved, removed, changed, or replaced?
>> Because for example I can use delegator.getNextSeqId("entityName")
>> successfully.
>> I actually couldn't find any method called findAll() in the Ofbiz packages!
>>
>> Cheers,
>>
>>
>>
>> -----
>> Jad El Omeiri
>> --
>> View this message in context: http://ofbiz.135035.n4.nabble.com/delegator-findAll-missing-tp4647322.html
>> Sent from the OFBiz - User mailing list archive at Nabble.com.

Thanks Nicolas!

Malin Nicolas wrote
Hi,

You can try delegator.findList("entityName", null, null, null, null, false);

Nicolas

Le 17/01/2014 10:05, Jad El Omeiri a écrit :
> Hi,
>
> I'm trying to use delegator.findAll("entityName") in beanshell.
> Was the method moved, removed, changed, or replaced?
> Because for example I can use delegator.getNextSeqId("entityName")
> successfully.
> I actually couldn't find any method called findAll() in the Ofbiz packages!
>
> Cheers,
>
>
>
> -----
> Jad El Omeiri
> --
> View this message in context: http://ofbiz.135035.n4.nabble.com/delegator-findAll-missing-tp4647322.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.


--
Nicolas MALIN
Consultant
Tél : 06.17.66.40.06
Site projet : http://www.neogia.org/
-------
Société LibrenBerry
Tél : 02.48.02.56.12
Site : http://www.librenberry.net/
Jad El Omeiri
Reply | Threaded
Open this post in threaded view
|

Re: delegator.findAll() missing?

Jacques Le Roux
Administrator
In reply to this post by Jacques Le Roux
BTW I completed at
http://svn.apache.org/viewvc?view=revision&revision=r1523507
http://svn.apache.org/viewvc?view=revision&revision=r1523645
(I had a doubt, so I checked, APIs maintenance is a sensitive matter)

Jacques

On Friday, January 17, 2014 10:47 AM, [hidden email] wrote

> Yes, I re-added it http://markmail.org/message/ksjyrv5mfp3l2ehk
>
> Jacques
>
> On Friday, January 17, 2014 10:28 AM, [hidden email] wrote
>> Hi Jad,
>>
>> Which release are you using?
>> findAll exists in trunk (refer GenericDelegtor.java)
>>
>> Thanks & Regards
>>
>>> Hi,
>>>
>>> I'm trying to use delegator.findAll("entityName") in beanshell.
>>> Was the method moved, removed, changed, or replaced?
>>> Because for example I can use delegator.getNextSeqId("entityName")
>>> successfully.
>>> I actually couldn't find any method called findAll() in the Ofbiz packages!
>>>
>>> Cheers,
>>>
>>>
>>>
>>> -----
>>> Jad El Omeiri
>>> --
>>> View this message in context: http://ofbiz.135035.n4.nabble.com/delegator-findAll-missing-tp4647322.html
>>> Sent from the OFBiz - User mailing list archive at Nabble.com.
Reply | Threaded
Open this post in threaded view
|

Re: delegator.findAll() missing?

Adrian Crum-3
In reply to this post by Rong Nguyen
I would recommend that no one do this. It breaks the encapsulation of
the entity engine.

The entity engine has been around for 12 years. Anything you need to do
with a data source has been accommodated, you just need to spend some
time looking for it.

Adrian Crum
Sandglass Software
www.sandglass-software.com

On 1/17/2014 4:21 AM, rongnguyen wrote:

> You can use custom SQL:
> String helperName = delegator.getGroupHelperName("org.ofbiz");
> SQLProcessor sqlProc = new SQLProcessor(helperName);
> sqlProc.prepareStatement("SELECT * FROM TABLE");
> ResultSet resultSet = sqlproc.executeQuery();
>
>
>
> --
> View this message in context: http://ofbiz.135035.n4.nabble.com/delegator-findAll-missing-tp4647322p4647323.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|

Re: delegator.findAll() missing?

Jacques Le Roux
Administrator
+1, Think twice about it !!!

Jacques

On Friday, January 17, 2014 12:17 PM, [hidden email] wrote

> I would recommend that no one do this. It breaks the encapsulation of
> the entity engine.
>
> The entity engine has been around for 12 years. Anything you need to do
> with a data source has been accommodated, you just need to spend some
> time looking for it.
>
> Adrian Crum
> Sandglass Software
> www.sandglass-software.com
>
> On 1/17/2014 4:21 AM, rongnguyen wrote:
>> You can use custom SQL:
>> String helperName = delegator.getGroupHelperName("org.ofbiz");
>> SQLProcessor sqlProc = new SQLProcessor(helperName);
>> sqlProc.prepareStatement("SELECT * FROM TABLE");
>> ResultSet resultSet = sqlproc.executeQuery();
>>
>>
>>
>> --
>> View this message in context: http://ofbiz.135035.n4.nabble.com/delegator-findAll-missing-tp4647322p4647323.html
>> Sent from the OFBiz - User mailing list archive at Nabble.com.
Reply | Threaded
Open this post in threaded view
|

Re: delegator.findAll() missing?

Lei Wu
Jad,

In case your result set is really large ,you could use entity list
iterator, as shown below,

resultEli = delegator.find(entityName, condition, null, fieldsToSelect,
null, efo);

Entity list iterator will fetch partial results into memory, yet
delegator.findList() will retrieve all the records into memory. In case
your machine is memory-constrained, entity list iterator is preferred.


On Fri, Jan 17, 2014 at 8:01 PM, Jacques Le Roux <
[hidden email]> wrote:

> +1, Think twice about it !!!
>
> Jacques
>
> On Friday, January 17, 2014 12:17 PM, [hidden email]
> > I would recommend that no one do this. It breaks the encapsulation of
> > the entity engine.
> >
> > The entity engine has been around for 12 years. Anything you need to do
> > with a data source has been accommodated, you just need to spend some
> > time looking for it.
> >
> > Adrian Crum
> > Sandglass Software
> > www.sandglass-software.com
> >
> > On 1/17/2014 4:21 AM, rongnguyen wrote:
> >> You can use custom SQL:
> >> String helperName = delegator.getGroupHelperName("org.ofbiz");
> >> SQLProcessor sqlProc = new SQLProcessor(helperName);
> >> sqlProc.prepareStatement("SELECT * FROM TABLE");
> >> ResultSet resultSet = sqlproc.executeQuery();
> >>
> >>
> >>
> >> --
> >> View this message in context:
> http://ofbiz.135035.n4.nabble.com/delegator-findAll-missing-tp4647322p4647323.html
> >> Sent from the OFBiz - User mailing list archive at Nabble.com.
>