Package com.knowgate.dataobjs

Examples of com.knowgate.dataobjs.DBSubset.load()


                               DB.id_term + String.valueOf(iLevel) + " IS NOT NULL AND " +
                               DB.id_term + String.valueOf(iLevel+1) + " IS NULL AND " +
                               DB.id_term + String.valueOf(iLevel-1) + "=" + String.valueOf(getInt(DB.id_term + String.valueOf(iLevel-1))), 10);
      }

      iChilds = oChilds.load(oConn);

      Term oChld;

      for (int t=0; t<iChilds; t++) {
        oChld = new Term();
View Full Code Here


      JDCConnection oCon = null;

      try  {
        oCon = oDBB.getConnection("CallsTab");

        iCalls = oCalls.load (oCon, new Object[]{sWorkAreaId,sUserId});

        for (int c=0; c<iCalls; c++) {
          if (oCalls.isNull(2,c))
            oCalls.setElementAt("",2,c);
          else {
View Full Code Here

    Resource[] aResces = null;
    DBSubset oResces = new DBSubset(DB.k_x_duty_resource,
                                    DB.nm_resource+","+DB.pct_time,
                                    DB.gu_duty+"=?",10);
    int nResources = oResces.load(oConn, new Object[]{getString(DB.gu_duty)});
    if (nResources>0) {
      String sWorkArea = DBCommand.queryStr(oConn, "SELECT "+DB.gu_owner+" FROM "+DB.k_projects+" p,"+DB.k_duties+" d WHERE d."+DB.gu_project+"=p."+DB.gu_project+" AND d."+DB.gu_duty+"='"+getString(DB.gu_duty)+"'");
      aResces = new Resource[nResources];
      for (int r=0; r<nResources; r++) {
        aResces[r] = new Resource();
View Full Code Here

    int iEmptyDrafts = 0;
   
    JDCConnection oConn = null;
    try {
      oConn = getConnection();
      iEmptyDrafts = oEmptyDrafts.load(oConn, new Object[]{getCategoryGuid(),((DBStore)getStore()).getUser().getString(DB.gu_workarea)});
    } catch (SQLException sqle) {
    throw new MessagingException(sqle.getMessage(), sqle);
    }
   
    if (iEmptyDrafts>0) {
View Full Code Here

    DBSubset oDeleted = new DBSubset(DB.k_mime_msgs,
                                     DB.gu_mimemsg+","+DB.pg_message,
                                     DB.bo_deleted+"=1 AND "+DB.gu_category+"='"+oCatg.getString(DB.gu_category)+"'", 100);

    try {
      int iDeleted = oDeleted.load(getConnection());

      File oFile = getFile();

      // *************************************
      // Purge deleted messages from MBOX file
View Full Code Here

        // *********************************************************************************
        // Re-assign ordinal position and byte offset for all messages remaining after purge

        DBSubset oMsgSet = new DBSubset(DB.k_mime_msgs, DB.gu_mimemsg+","+DB.pg_message, DB.gu_category+"='"+getCategory().getString(DB.gu_category)+"' ORDER BY "+DB.pg_message, 1000);
        int iMsgCount = oMsgSet.load(oConn);

        oMBox = new MboxFile(oFile, MboxFile.READ_ONLY);
        long[] aPositions = oMBox.getMessagePositions();
        oMBox.close();

View Full Code Here

    DBSubset oDeleted = new DBSubset(DB.k_mime_msgs, DB.gu_mimemsg+","+DB.pg_message, DB.gu_category+"='"+oCatg.getString(DB.gu_category)+"'", 100);
    JDCConnection oConn = null;

    try {
    oConn = getConnection();
      int iDeleted = oDeleted.load(oConn);
      if (DebugFile.trace) DebugFile.writeln("there are "+String.valueOf(iDeleted)+" messages to be deleted");

      // ****************************************
      // Erase files referenced by draft messages   
      oStmt = oConn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
View Full Code Here

  StringBuffer oBuffXml = new StringBuffer(1024);
 
    DBSubset oMsgs = new DBSubset (DB.k_mime_msgs,
                     DB.gu_mimemsg+","+DB.id_message+","+DB.id_priority+","+DB.nm_from+","+DB.nm_to+","+DB.tx_subject+","+DB.dt_received+","+DB.dt_sent+","+DB.len_mimemsg+","+DB.pg_message+","+DB.bo_deleted+","+DB.tx_email_from+","+DB.nm_to+","+DB.bo_spam+","+DB.id_type,
                               DB.gu_category+"=? AND "+DB.gu_workarea+"=? AND " + DB.bo_deleted + "<>1 AND " + DB.gu_parent_msg + " IS NULL ORDER BY " + DB.dt_received + "," + DB.dt_sent + " DESC", 10);
    int iMsgs = oMsgs.load(((DBStore)getStore()).getConnection(), new Object[]{getCategoryGuid(), ((DBStore)getStore()).getUser().getString(DB.gu_workarea)});

  if (iMsgs>0) {
    aMsgsXml = new String[iMsgs];
    for (int m=0; m<iMsgs; m++) {
      oBuffXml.append("<msg>");
View Full Code Here

      String sGuWorkArea = ((DBStore)getStore()).getUser().getString(DB.gu_workarea);
      String sGuFolder = getCategoryGuid();
      oInputMbox = new MboxFile(sMboxFilePath, MboxFile.READ_ONLY);
      DBSubset oMsgs = new DBSubset (DB.k_mime_msgs, DB.gu_mimemsg+","+DB.gu_workarea, DB.gu_category+"=?", 1000);
      oConn = getConnection();
      iMsgCount = oMsgs.load(oConn, new Object[]{sGuFolder});

      if (DebugFile.trace) DebugFile.writeln(String.valueOf(iMsgCount)+" indexed messages");

      for (int m=0; m<iMsgCount; m++)
        DBMimeMessage.delete(oConn, sGuFolder, oMsgs.getString(0,m));
View Full Code Here

    throws SQLException, IOException {
    final int iSize = oCatgSet.getRowCount();
    // Delete recursively children categories first
    for (int c=0; c<iSize; c++) {
      DBSubset oChildCatgs = new DBSubset(DB.k_cat_tree, DB.gu_child_cat, DB.gu_parent_cat+"=?", 10);
      oChildCatgs.load(oConn, new Object[]{oCatgSet.getString(0,c)});
      deleteCategorySet(oConn, oChildCatgs);
    }
    // Deleting the category will delete the associated MimeMessages, but it is faster to do it first
    // for avoiding lots of calls to MimeMessage.delete() method
    for (int d=0; d<iSize; d++) {
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.