turbine-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Colquhoun, Adrian" <Adrian.Colquh...@uk.experian.com>
Subject Getting row counts using Criteria
Date Mon, 22 Oct 2001 11:12:27 GMT


I would like to add some methods to my database peer classes to return row
counts. I have written code like 

e.g. in EventPeer for a table called Event 

	int getRowCount(Criteria c){
            		Vector v = BaseEventPeer.doSelect(c);
		            return v.size();
        		catch(Exception e){
            		return 0;

Presumably this will retrieve all the data from the database for my query ?
(potentially a large amount of data that I don't actually want) - is there a
better way ?




Information in this email and any attachments are confidential, and may
not be copied or used by anyone other than the addressee, nor disclosed
to any third party without our permission.  There is no intention to
create any legally binding contract or other commitment through the use
of this email.

Experian Limited (registration number 653331).  
Registered office: Talbot House, Talbot Street, Nottingham NG1 5HF

To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org

View raw message