[prev in list] [next in list] [prev in thread] [next in thread] 

List:       turbine-user
Subject:    Antwort: Torque and Item Count
From:       USchmidt () gea-wiegand ! de
Date:       2003-05-21 15:37:51
[Download RAW message or body]


I do like that

      Criteria crit = new Criteria();

      // adding a column to get the count of the records.
      crit.addAsColumn("max","max(something)");
      crit.add(....); // add your where clause here ...

      String query = createQueryString(crit);
      List l = executeQuery(query);
      Record row = (Record)l.get(0);

      return row.getValue("max").asInt(); // this gets the information
about the counter value

hope that helps ...

/uwe



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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic