Package com.centraview.common

Examples of com.centraview.common.CVDal.executeUpdate()


      String deleteQuery = "DELETE FROM emailmessagefolder WHERE MessageID = ? AND FolderID = ?";
      cvdal.setSqlQuery(deleteQuery);
      cvdal.setInt(1, messageID);
      cvdal.setInt(2, oldFolderID);
      cvdal.executeUpdate();
      cvdal.setSqlQueryToNull();

    }catch(Exception e){
      System.out.println("[Exception][MailEJB] Exception thrown in moveMessageToFolder(): " + e);
      e.printStackTrace();
View Full Code Here


    try {
      String insertQuery = "INSERT INTO emailmessagefolder (MessageID, FolderID) VALUES (?, ?)";
      cvdal.setSqlQuery(insertQuery);
      cvdal.setInt(1, messageID);
      cvdal.setInt(2, newFolderID);
      numberCopied = cvdal.executeUpdate();
      cvdal.setSqlQueryToNull();

      String updateQuery = "UPDATE emailmessage SET LocallyModified='YES', CopiedToFolder=? WHERE MessageID=?";
      cvdal.setSqlQuery(updateQuery);
      cvdal.setInt(1, newFolderID);
View Full Code Here

      String updateQuery = "UPDATE emailmessage SET LocallyModified='YES', CopiedToFolder=? WHERE MessageID=?";
      cvdal.setSqlQuery(updateQuery);
      cvdal.setInt(1, newFolderID);
      cvdal.setInt(2, messageID);
      cvdal.executeUpdate();
      cvdal.setSqlQueryToNull();
    }catch (Exception e){
      logger.error("[copyMessageToFolder]: Exception", e);
    }finally{
      cvdal.destroy();
View Full Code Here

    CVDal cvdl = new CVDal(this.dataSource);
    try {
      if (filter != null && filter.length() > 0) {
        String str = "CREATE TABLE emaillistfilter " + filter;
        cvdl.setSqlQuery(str);
        cvdl.executeUpdate();
        cvdl.setSqlQueryToNull();
        applyFilter = true;
      }
      // We can't use the numberOfRecords in calculation we will get total message count
      // independent of the folder..
View Full Code Here

      }

      // Create a temporary table with out applying the Limit on the search.
      String query = this.buildEmailListQuery(applyFilter, permissionSwitch, parameters);
      cvdl.setSqlQuery("CREATE TEMPORARY TABLE emaillist "+query);
      cvdl.executeUpdate();
      cvdl.setSqlQueryToNull();

      //get the limit criteria, concat the string with final query.
      String limit = parameters.getLimitParam();
View Full Code Here

      // Assign the numberOfRecords to the paramters
      parameters.setTotalRecords(numberOfRecords);

      // drop emaillist table
      cvdl.setSqlQuery("DROP TABLE emaillist");
      cvdl.executeUpdate();
      // throw away the temp filter table, if necessary.
      if (applyFilter) {
        cvdl.setSqlQueryToNull();
        cvdl.setSqlQuery("DROP TABLE emaillistfilter");
        cvdl.executeUpdate();
View Full Code Here

      cvdl.executeUpdate();
      // throw away the temp filter table, if necessary.
      if (applyFilter) {
        cvdl.setSqlQueryToNull();
        cvdl.setSqlQuery("DROP TABLE emaillistfilter");
        cvdl.executeUpdate();
      }
      if (applyFilter || permissionSwitch) {
        cvdl.setSqlQueryToNull();
        cvdl.setSqlQuery("DROP TABLE listfilter");
        cvdl.executeUpdate();
View Full Code Here

        cvdl.executeUpdate();
      }
      if (applyFilter || permissionSwitch) {
        cvdl.setSqlQueryToNull();
        cvdl.setSqlQuery("DROP TABLE listfilter");
        cvdl.executeUpdate();
      }
    }
    finally{
      cvdl.destroy();
      cvdl = null;
View Full Code Here

           String queryFilter = "CREATE TEMPORARY TABLE rulelistfilter SELECT ruleID from emailrule " +
             " WHERE ruleID LIKE '%"+filter+"%' OR "+
         " accountID LIKE '%"+filter+"%' OR name LIKE '%"+filter+"%' OR "+
         " description LIKE '%"+filter+"%' OR enabled LIKE '%"+filter+"%'";
           cvdl.setSqlQuery(queryFilter);
           cvdl.executeUpdate();
           cvdl.setSqlQueryToNull();

           applyFilter = true;
           whereClause.append(" AND emailrule.ruleID = rlf.ruleID ");
           fromClause.append(" , rulelistfilter rlf ");
View Full Code Here

      query.append(" FROM emailrule " + fromClause.toString() + " WHERE emailrule.accountID="+accountID+" ");
      query.append(whereClause.toString());
      query.append(orderBy);

      cvdl.setSqlQuery("CREATE TEMPORARY TABLE rulelist "+query.toString());
      cvdl.executeUpdate();
      cvdl.setSqlQueryToNull();

      // Now, Finally, we can just select the rule list and populate value List
      cvdl.setSqlQuery("SELECT * FROM rulelist "+limit);
      list = cvdl.executeQueryList(1);
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.