Package com.knowgate.dataobjs

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


    throws SQLException {
    String sRetVal;
    DBSubset oDbs = new DBSubset(DB.k_addresses,new Address().getTable(oConn).getColumnsStr(),
                   DB.nm_company+"=? AND "+DB.gu_workarea+"=?",
                                 10);
  oDbs.load(oConn, new Object[]{sCompanyNm,sWorkArea});
 
  return oDbs;
  } // getAddressesByCompanyName

  // **********************************************************
 
View Full Code Here


                              "c." + DB.nm_icon + ",c." + DB.nm_icon2 + " FROM " + DB.k_categories + " c, " +
                              DB.k_cat_tree + " t WHERE c." + DB.gu_category + "=t." + DB.gu_child_cat + " AND " +
                              "t." + DB.gu_parent_cat + "=? AND c." +  DB.gu_category + " NOT IN " +
                              "(SELECT " + DB.gu_category + " FROM " + sChildNamedTables + " WHERE " + sChildNamedFilter + ")", 32);

    int iChilds = oChilds.load(oConn, aParams);

    if (DebugFile.trace) {
      DebugFile.writeln(String.valueOf(iChilds) + " childs readed in " + String.valueOf(System.currentTimeMillis()-lElapsed) + " ms");
      DebugFile.decIdent();
      DebugFile.writeln("End Categories.getChildsNamed()");
View Full Code Here

    DBSubset oSubs = new DBSubset (DB.k_newsgroup_subscriptions,
                                   DB.gu_user + "," + DB.tx_email + "," + DB.id_msg_type + "," + DB.tp_subscrip,
                                   DB.gu_newsgrp + "=? AND " + DB.id_status + "=" + String.valueOf(Subscription.ACTIVE), 100);

    oSubs.load(oConn, new Object[] {getString(DB.gu_newsgrp)});

    if (DebugFile.trace) {
      DebugFile.decIdent();
      DebugFile.writeln("End NewsGroup.subscribers() : " + String.valueOf(oSubs.getRowCount()));
    }
View Full Code Here

      "g."+DB.gu_category+"=? AND g."+DB.id_class+"="+String.valueOf(NewsMessage.ClassId)+" AND g."+DB.gu_object+"=m."+DB.gu_msg+" AND "+
      "m."+DB.gu_parent_msg + " IS NULL ORDER BY "+sOrderBy+" DESC",nMaxMsgs);

  oDbss.setMaxRows(nMaxMsgs);

  oDbss.load(oConn, new Object[]{getString(DB.gu_category)});
 
  return oDbss;
  } // getTopLevelMessages

  public String toXML(JDCConnection oConn, String sIdent, String sDelim) throws SQLException {
View Full Code Here

  public DBSubset getFares(JDCConnection oConn) throws SQLException {
    DBSubset oFares = new DBSubset(DB.k_prod_fares,DB.id_fare+","+DB.pr_sale+","+
                                   DB.id_currency+","+DB.pct_tax_rate+","+
                                   DB.is_tax_included+","+DB.dt_start+","+DB.dt_end+","+
                                   DB.tp_fare,DB.gu_product+"=?", 10);
    oFares.load(oConn, new Object[]{getStringNull(DB.gu_product,null)});

    return oFares;
  }

  // ----------------------------------------------------------
View Full Code Here

  public DBSubset getFaresOfType(JDCConnection oConn, String sType) throws SQLException {
    DBSubset oFares = new DBSubset(DB.k_prod_fares,DB.id_fare+","+DB.pr_sale+","+
                                   DB.id_currency+","+DB.pct_tax_rate+","+
                                   DB.is_tax_included+","+DB.dt_start+","+DB.dt_end+","+
                                   DB.tp_fare,DB.gu_product+"=? AND "+DB.tp_fare+"=?", 10);
    oFares.load(oConn, new Object[]{getStringNull(DB.gu_product,null),sType});
    return oFares;
  }

  // ----------------------------------------------------------
View Full Code Here

                                   DB.id_currency+","+DB.pct_tax_rate+","+
                                   DB.is_tax_included+","+DB.dt_start+","+DB.dt_end+","+
                                   DB.tp_fare,DB.gu_product+"=? AND "+DB.tp_fare+"=? AND "+
                                   "("+DB.dt_start+" IS NULL OR "+DB.dt_start+"<=?) AND "+
                                   "("+DB.dt_end+" IS NULL OR "+DB.dt_end+">=?)", 10);
    oFares.load(oConn, new Object[]{getStringNull(DB.gu_product,null),sType,dtWhen,dtWhen});
    return oFares;
  }

  // ----------------------------------------------------------
View Full Code Here

      DebugFile.decIdent();
    throw new NullPointerException("Product.eraseImages() gu_product property not set");
  }
 
    DBSubset oImages = new DBSubset(DB.k_images, DB.gu_image + "," + DB.path_image, DB.gu_product + "=?", 10);
    int iImgCount = oImages.load(oConn, new Object[]{get(DB.gu_product)});
    Image oImg = new Image();

    for (int i=0; i<iImgCount; i++) {
      oImg.replace(DB.gu_image, oImages.get(0,i));
      oImg.replace(DB.path_image, oImages.get(1,i));
View Full Code Here

   * @since 4.0
   */
  public DBSubset getCategories(JDCConnection oConn) throws SQLException {
    DBSubset oCats = new DBSubset(DB.k_x_cat_objs,DB.gu_category,
               DB.gu_object+"=?",4);
  oCats.load(oConn, new Object[]{get(DB.gu_product)});
    return oCats;
  }

  /**
   * Get GUID of the first Category to which this Products belongs
View Full Code Here

   * @since 4.0
   */
  public String getCategoryId(JDCConnection oConn) throws SQLException {
    DBSubset oCats = new DBSubset(DB.k_x_cat_objs,DB.gu_category,
                    DB.gu_object+"=?",4);
  oCats.load(oConn, new Object[]{get(DB.gu_product)});
    if (oCats.getRowCount()>0)
      return oCats.getString(0,0);
    else
      return null;
  } // getCategoryId
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.