On Jan 31, Kimpton,C (Chris) quoth:
> I want to find out how many entities I have of a particular bean, eg I have
> a CompanyBean, is
> there a standard countAll CompanyHome method - or can I define a custom
> finder with jbossCMP, or
> do I need to go under the covers and talk directly to the DB?
>
> The info is for a summary page and thus I want to avoid loading up all the
> companies just to find the total.
The Home.findAll() method returns a Collection. Collection.size() returns
an int with the number of items in the collection. This implies a limit
of Integer.MAX_VALUE to the number of objects you can iterate over in a
collection but I don't know what the boundary behavior of the beans and
the Collection implementations are.
C=)
--------------------------------------------------------------------------
If you want to build a ship, don't drum up people together to collect wood
and don't assign them tasks and work, but rather teach them to long for
the endless immensity of the sea. -- Antoine de Saint Exupery
--------------------------------------------------------------------------
Caskey <caskey*technocage.com> /// TechnoCage Inc.
--------------------------------------------------------------------------
It's not an optical illusion, it just looks like one. -- Phil White
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
List Help?: [EMAIL PROTECTED]