KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > tigris > scarab > om > RModuleIssueTypePeer


1 package org.tigris.scarab.om;
2
3 import org.apache.torque.TorqueException;
4 import org.apache.torque.util.Criteria;
5 import com.workingdogs.village.Record;
6 import com.workingdogs.village.DataSetException;
7
8 /**
9  * You should add additional methods to this class to meet the
10  * application requirements. This class will only be generated as
11  * long as it does not already exist in the output directory.
12  */

13 public class RModuleIssueTypePeer
14     extends org.tigris.scarab.om.BaseRModuleIssueTypePeer
15 {
16     private static final String JavaDoc COUNT =
17         "count(*)";
18
19     /**
20      * Adds count(*) to the select clause and returns the
21      * number of rows resulting from the given Criteria. If the criteria will
22      * lead to duplicate rows they will be counted.
23      *
24      * @param crit a <code>Criteria</code> value
25      * @return an <code>int</code> value
26      * @exception TorqueException if an error occurs
27      * @exception DataSetException if an error occurs
28      */

29     public static int count(Criteria crit)
30         throws TorqueException, DataSetException
31     {
32         crit.addSelectColumn(COUNT);
33         return ((Record)doSelectVillageRecords(crit).get(0))
34             .getValue(1).asInt();
35     }
36 }
37
Popular Tags