Examples of DBResult


Examples of com.trulytech.mantis.result.DBResult

    logWriter.Debug("get Cache Table " + Key);

    if (isInited) {
      LinkedHashMap map = com.trulytech.mantis.system.Properties.cacheTable;
      if (map == null)
        return new DBResult();
      else {
        DBResult Result = (DBResult) map.get(Key.toLowerCase());
        if (Result == null)
          return new DBResult();
        else
          return Result;
      }
    } else
      return new DBResult();
  }
View Full Code Here

Examples of com.trulytech.mantis.result.DBResult

      stmt.setFetchSize(Properties.Fetch_Size);
      stmt.setMaxRows(Properties.MaxRows);
      stmt.setQueryTimeout(Properties.QueryTimeout);

      SQLParser Parser = new SQLParser(stmt, null);
      DBResult Result = Parser
          .QueryExecute(com.trulytech.mantis.system.Properties.Cachekeys
              .getProperty(Key));

      com.trulytech.mantis.system.Properties.cacheTable.put(Key
          .toLowerCase(), Result);

      logWriter.Info("refresh cache table successfully (" + Key + ", total "
          + Result.getResultBuffer().size() + " records) ");
    } catch (Exception e) {
      logWriter.Error("refresh cache table failure (" + Key + ") " + e.toString());

    } finally {
      try {
View Full Code Here

Examples of com.trulytech.mantis.result.DBResult

      for (Enumeration enumeration = com.trulytech.mantis.system.Properties.Cachekeys
          .keys(); enumeration.hasMoreElements();) {
        String key = (String) enumeration.nextElement();
        try
        {
        DBResult Result = Parser
            .QueryExecute(com.trulytech.mantis.system.Properties.Cachekeys
                .getProperty(key));

        com.trulytech.mantis.system.Properties.cacheTable.put(key
            .toLowerCase(), Result);
        logWriter.Debug("read " + key + " object successfully (total "
            + Result.getResultBuffer().size() + " records)");
        }
        catch (Exception ex)
        {
          logWriter.Error("refresh key failure " + ex.toString());
        }
View Full Code Here

Examples of com.trulytech.mantis.result.DBResult

    HttpSession session = request.getSession();
    session.setAttribute(
        com.trulytech.mantis.system.Properties.Session_Language,
        "EN_US");
    Parser.SQLExecute("insert into msgvalue(value) values ('[_msg]')");
    DBResult Result = Parser.PageExecute("select value from msgvalue");
    request.setAttribute("Result", Result);

    return "internationallist.jsp";

  }
View Full Code Here

Examples of de.mhus.lib.sql.DbResult

          con.commit();
      } catch (Exception e) {e.printStackTrace();}
     
      DbStatement sth = con.getStatement("select");
      try {
        DbResult res = sth.executeQuery(null);
        res.close();
      } catch (ClassNotFoundException e1) {
        System.out.println("testConnect: sql driver not found - skip test");
        return;
      } catch (SQLException e2) {
        if (e2.getMessage().startsWith("Communications link failure")) {
View Full Code Here

Examples of de.mhus.lib.sql.DbResult

      HashMap<String, Object> attr = new HashMap<String, Object>();
      attr.put("text", "abc'");
      con.getStatement("insert").execute(attr);

      DbStatement sth = con.getStatement("select");
      DbResult res1 = sth.executeQuery(null);
      assertEquals(true,res1.next());
      String res2 = res1.getString("a_text");
      assertEquals(attr.get("text"), res2);
      res1.close();
     
      int res3 = con.getStatement("cleanup").executeUpdate(null);
      assertEquals(1, res3);
     
      con.commit();
View Full Code Here

Examples of de.mhus.lib.sql.DbResult

      map = nameMappingRO;
    else
      map = new FallbackMap<String, Object>(attributes, nameMappingRO, true);
    try {
      DbStatement sth = con.createStatement(query);
      DbResult res = sth.executeQuery(map);
      return new DbCollection<T>(this,con,myCon != null,registryName,clazz,res);
    } catch (Throwable t) {
      throw new MException(con,query,attributes,t);
    } finally {
    // do not close, it's used by the collection
View Full Code Here

Examples of de.mhus.lib.sql.DbResult

    }
   
    String tbl = config.getExtracted("table");
    DbMetadata m = ((DbApplication)getApplication()).getMetadata(tbl);
   
    DbResult res = sta.executeQuery(attributes);
    while (res.next()) {
      list.add(new DbData(this,m,res,config));
    }
    res.close();
    con.close();
  }
View Full Code Here

Examples of de.mhus.lib.sql.DbResult

    int nr = 0;
    for (Object key : keys) {
      attributes.put(String.valueOf(nr), key);
      nr++;
    }
    DbResult ret = sqlPrimary.getStatement(con).executeQuery(attributes);
    if (!ret.next()) {
      ret.close();
      return null;
    }
   
    for (Feature f : features)
      f.getObject(con,ret);
View Full Code Here

Examples of de.mhus.lib.sql.DbResult

    int nr = 0;
    for (Object key : keys) {
      attributes.put(String.valueOf(nr), key);
      nr++;
    }
    DbResult ret = sqlPrimary.getStatement(con).executeQuery(attributes);
    if (!ret.next()) {
      ret.close();
      return null;
    }
   
    for (Feature f : features)
      f.fillObject(obj, con, ret);

    // fill object
    for (Field f : fList) {
      f.setToTarget(ret,obj);
    }
    ret.close();
    return obj;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.