Examples of openDB()


Examples of org.sf.mustru.utils.DbTools.openDB()

   Hits hits = getHits(question);
   if (hits == null) throw new IOException("Could not find any hits for question " + question);
  
   //*-- build the list of answers
   DbTools dbt = Constants.getDbt();
   dbt.openDB(Constants.EXT_FILES_DB, true, false); //*-- read only access
  
   Explanation explanation;
   LOOP: for (int i = 0; i < hits.length(); i++)
   {
     //*-- limit explanations for the top 100 hits
View Full Code Here

Examples of org.sf.mustru.utils.DbTools.openDB()

    String key = doc.get("key");
    String ftype = doc.get("type");
    DatabaseEntry data = new DatabaseEntry();

    String dbname = (ftype.equalsIgnoreCase("email")) ? Constants.EXT_MESSAGES_DB: Constants.EXT_FILES_DB;
    dbt.openDB(dbname, true, false); //*-- no create and no dups            
    dbt.fetch(key, data);
    dbt.closeDB();

    //*-- use the type of the document to create a doc instance of the specified type
    String docClass = dprops.getProperty(ftype);
View Full Code Here

Examples of util.SQLHelper.openDB()

      credentials[PROJECT].getValue(),
    };

    try {
      sql = new SQLHelper();
      sql.openDB();
      return sql.retrieve(CHECK_CRED_QUERY, params).next();

    } finally {
      sql.closeDB();
    }
View Full Code Here

Examples of util.SQLHelper.openDB()

    SQLHelper sql = null;
    Object[] params = { session_id };

    try {
      sql = new SQLHelper();
      sql.openDB();
      return sql.update(AUTH_QUERY, params) == 1;

    } finally {
      sql.closeDB();
    }
View Full Code Here

Examples of util.SQLHelper.openDB()

    SimpleTable result = null;
    Object[] param = { session_id };

    try {
      sql = new SQLHelper();
      sql.openDB();
      query = "select m.id mote_id, m.site_id site_id,s.sitename site, " +
        "case when m.curr_session_id=? then 'controlled' " +
              "when isnull(m.curr_session_id) then 'available' else 'occupied' end mote_usage ";

      select = "select id, name from moteattrtype order by sortseq";
View Full Code Here

Examples of util.SQLHelper.openDB()

     * the loop. This would require that SQLHelper exposes
     * more of its internal state such as allowing
     * PreparedStatement to be returned. */
    try {
      sql = new SQLHelper();
      sql.openDB();

      /* Check for current privileged session. */
      ResultSet sqlres = sql.retrieve(PRIV_QUERY, priv_params);
      if (sqlres.next()) {
        String privsess = sqlres.getString("priv_session_id");
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.