You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Ifnu bima <if...@gmail.com> on 2008/12/19 07:52:45 UTC

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

RE: Ofbiz Entity agregat function

Posted by Nikita Shinde <ni...@amicontech.com>.
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:ifnubima@gmail.com] 
Sent: Friday, December 19, 2008 12:23 PM
To: user@ofbiz.apache.org
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