Package com.knowgate.dataobjs

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


                                           "m."+DB.gu_workarea+"=? AND r."+DB.nm_room+"=? AND "+
                                             "r." + DB.gu_meeting + "=m." + DB.gu_meeting + " AND f."+DB.gu_fellow+"=o."+DB.gu_fellow+" AND "+
                                             "f." + DB.gu_meeting + "=m." + DB.gu_meeting + " AND " +
                                             "f." + DB.gu_fellow + "=? AND m." + DB.dt_start + " BETWEEN ? AND ? ORDER BY 3", 60);
              oCon = oDbb.getConnection("HttpCalendarServlet.getmeetingsforroom",true);
              int nMeets = oMeets.load(oCon, new Object[]{sWrkA, sRoom, sUid, new Timestamp(oDtStart.getTime()), new Timestamp(oDtEnd.getTime())});
                    oBuf.append("<calendarresponse command=\"getMeetings\" code=\"0\"><error></error><value>"+String.valueOf(nMeets)+"</value><meetings count=\""+String.valueOf(nMeets)+"\">");
                    for (int m=0; m<nMeets; m++) {
                      oBuf.append("<meeting type=\""+oMeets.getStringNull(13,m,"")+"\">");
                      oBuf.append("<id>"+oMeets.getStringNull(DB.id_icalendar,m,"")+"</id>");
                      oBuf.append("<gu>"+oMeets.getString(DB.gu_meeting,m)+"</gu>");
View Full Code Here


                       "p."+DB.gu_product+",p."+DB.id_ref,
                       "p."+DB.gu_product+"=l."+DB.gu_product+" AND "+
                       "p."+DB.gu_owner+"=? AND "+
                       "l."+DB.gu_despatch + "=?", 50);
    
     int nProdCount = oProdDetail.load(oConn, new Object[]{getString(DB.gu_workarea),getString(DB.gu_despatch)});
    
     for (int p=0; p<nProdCount; p++) {
       int l = oLines.find(9, oProdDetail.get(0,p));
       if (!oProdDetail.isNull(1,p)) {
         oLines.setElementAt(oProdDetail.get(1,p),13,l);
View Full Code Here

  public PageDB getFirstPage(JDCConnection oConn) throws SQLException {
    PageDB oPage = new PageDB();
    DBSubset oPages = new DBSubset (DB.k_pageset_pages,oPage.getTable(oConn).getColumnsStr(),
                    DB.gu_pageset+"=? ORDER BY "+DB.pg_page, 1);
    oPages.setMaxRows(1);     
    int nPages = oPages.load(oConn, new Object[]{getString(DB.gu_pageset)});
    if (0==nPages) {
      oPage = null;
    } else {
      oPage.putAll(oPages.getRowAsMap(0));
    }
View Full Code Here

  public PageDB[] getPages(JDCConnection oConn) throws SQLException {
    PageDB[] aPages;
    PageDB oPage = new PageDB();
    DBSubset oPages = new DBSubset (DB.k_pageset_pages,oPage.getTable(oConn).getColumnsStr(),
                    DB.gu_pageset+"=? ORDER BY "+DB.pg_page, 10);
    int nPages = oPages.load(oConn, new Object[]{getString(DB.gu_pageset)});
    if (0==nPages) {
      aPages = null;
    } else {
      aPages = new PageDB[nPages];
      for (int p=0; p<nPages; p++) {
View Full Code Here

   * @since 4.0
   */
    public static List forWorkArea(JDCConnection oConn, String sGuWorkArea) throws SQLException {
    DBSubset oDbs = new DBSubset(DB.k_prod_fares_lookup, DB.vl_lookup,
                     DB.id_section+"='"+DB.id_fare+"' AND "+DB.gu_owner+"=? ORDER BY 1", 10);
      oDbs.load(oConn, new Object[]{sGuWorkArea});
      return oDbs.getColumnAsList(0);
    }

    public static final short ClassId = 19;
   
View Full Code Here

                            DB.id_status + "=" + String.valueOf(Job.STATUS_PENDING) + " ORDER BY " +
                            DB.id_status + " DESC," + DB.dt_execution + " DESC", iWorkerThreads);

    oJobsSet.setMaxRows(iWorkerThreads);

    iJobCount = oJobsSet.load(oConn); // Devuelve la cuenta de jobs pendientes

    // Prepara la sentencia para actualizar el estado de los jobs a Running
    sSQL = "UPDATE " + DB.k_jobs + " SET " + DB.id_status + "=" + String.valueOf(Job.STATUS_RUNNING) + "," + DB.dt_execution + "=" + DBBind.Functions.GETDATE + " WHERE " + DB.gu_job + "=?";

    if (DebugFile.trace) DebugFile.writeln("Connection.prepareStatement(" + sSQL + ")");
View Full Code Here

    oJobsSet = new DBSubset(DB.k_jobs,
                            "gu_job,gu_job_group,gu_workarea,id_command,tx_parameters,id_status,dt_execution,dt_finished,dt_created,dt_modified",
                            DB.gu_job + "='" + sJobId + "'", 1);


    iJobCount = oJobsSet.load(oConn); // Devuelve la cuenta de jobs pendientes

    // Prepara la sentencia para actualizar el estado de los jobs a Running
    sSQL = "UPDATE " + DB.k_jobs + " SET " + DB.id_status + "=" + String.valueOf(Job.STATUS_RUNNING) + "," + DB.dt_execution + "=" + DBBind.Functions.GETDATE + " WHERE " + DB.gu_job + "=?";

    if (DebugFile.trace) DebugFile.writeln("Connection.prepareStatement(" + sSQL + ") on connection with process id. "+oConn.pid());
View Full Code Here

    oStmt.close();

    DBSubset oAddrs = new DBSubset(DB.k_addresses + " a," + DB.k_x_company_addr + " x",
                                   oColumnList.toString(), "a." + DB.gu_address + "=x." + DB.gu_address + " AND x." + DB.gu_company + "=? ORDER BY a." + DB.ix_address, 10);

    oAddrs.load(oConn, new Object[]{sCompanyGUID});

    String sAddresses = "\n  <company>" + sCompanyGUID + "</company>\n  <catalog>" + sCategoryGUID + "</catalog>\n  <addresses>\n" + oAddrs.toXML("    ", "address") + "\n  </addresses>";

    try { oXMLDoc.removeNode("pageset/company"); }
    catch (DOMException dome) {
View Full Code Here

           iAuth = 0;
         } // fi (exists k_users)
         if (iAuth<0) {
           response.sendError(HttpServletResponse.SC_FORBIDDEN, ACL.getErrorMessage(iAuth));
         } else {
           oDbs.load(oCon, iSkp);
           response.setContentType("text/plain");
           response.setCharacterEncoding("UTF-8");
           response.getOutputStream().write(oDbs.toString().getBytes("UTF-8"));             
         }
         oCon.close("HttpDataObjsServlet");
View Full Code Here

    throws SQLException {
   
    DBSubset oCats = new DBSubset (DB.k_categories+" c, "+DB.k_cat_tree+" t",
                       DB.gu_category,
                       "c."+DB.gu_category+"=t."+DB.gu_child_cat+" AND t."+DB.gu_parent_cat+"=?", 10);
  int iCats = oCats.load(oConn, new Object[]{getMailRoot(oConn)});
  String[] aRetVal = new String[iCats];
  for (int c=0; c<iCats; c++) aRetVal[c] = oCats.getString(0,c);
  return aRetVal;
  } // getMailFolders
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.