Ofbiz Entity agregat function

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

Ofbiz Entity agregat function

Ifnu bima
Hi all,

I use Oracle as my database, i have view say View_A, then i want to
get row count of this view, if i create query it will be like this :

Select count(*) from View_A

How i do it in ofbiz entity using one of
CoreFactory.getGenericDelegation() method?

thanks for any response

--
Senior Engineer @ ArtiVisi Intermedia
Java Training Center
See our course @ artivisi.com

http://ifnu.artivisi.com
+62 856 9211 8687
regards
Reply | Threaded
Open this post in threaded view
|

RE: Ofbiz Entity agregat function

Nikita Shinde
Hi,

 

   You can use the one of the following options:

 

1> long count = delegator.findCountByAnd("viewName"); - This one's
deprecated though

 

2> long count = delegator.findCountByCondition("viewName", null, null,
null);

 

3> List records = delegator.findList("viewName", null, null, null, null,
false);

   long count = records.size();

 

Hope this helps,

 

 

Kind Regards,

Nikita Shinde

Amicon Technologies Pvt. Ltd., Mumbai, India.

India's No.1 OFBiz service provider

   

 

-----Original Message-----
From: Ifnu bima [mailto:[hidden email]]
Sent: Friday, December 19, 2008 12:23 PM
To: [hidden email]
Subject: Ofbiz Entity agregat function

 

Hi all,

 

I use Oracle as my database, i have view say View_A, then i want to

get row count of this view, if i create query it will be like this :

 

Select count(*) from View_A

 

How i do it in ofbiz entity using one of

CoreFactory.getGenericDelegation() method?

 

thanks for any response

 

--

Senior Engineer @ ArtiVisi Intermedia

Java Training Center

See our course @ artivisi.com

 

http://ifnu.artivisi.com

+62 856 9211 8687

regards