Package de.iritgo.aktera.query

Examples of de.iritgo.aktera.query.Query


   * @throws QueryException in case of a query failure.
   */
  public static int executeCountQuery(ModelRequest req, String queryId, Object... params)
    throws ModelException, QueryException
  {
    Query query = (Query) req.getService(Query.ROLE, queryId);

    for (int i = 0; i + 1 < params.length;)
    {
      query.setCriteria(params[i].toString(), params[i + 1]);
      i += 2;
    }

    List res = query.getQueryResults();

    if (res.size() > 0)
    {
      return NumberTools.toInt(((Map) res.get(0)).get("count"), - 1);
    }
View Full Code Here

TOP

Related Classes of de.iritgo.aktera.query.Query

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.