Examples of Stock


Examples of org.nlogo.sdm.Stock

public strictfp class WrappedStock
    implements org.jhotdraw.util.Storable {
  final Stock stock;

  public WrappedStock() {
    stock = new Stock();
  }
View Full Code Here

Examples of org.radargun.stages.tpcc.domain.Stock

            }
         }
         log.info(" STOCK for Warehouse " + id_wharehouse + " - ITEMS=" + init_id_item + ",...," + (init_id_item - 1 + num_of_items));
         for (long i = init_id_item; i <= (init_id_item - 1 + num_of_items); i++) {

            Stock newStock = new Stock(i,
                                       id_wharehouse,
                                       TpccTools.aleaNumber(10, 100),
                                       TpccTools.aleaChainel(24, 24),
                                       TpccTools.aleaChainel(24, 24),
                                       TpccTools.aleaChainel(24, 24),
                                       TpccTools.aleaChainel(24, 24),
                                       TpccTools.aleaChainel(24, 24),
                                       TpccTools.aleaChainel(24, 24),
                                       TpccTools.aleaChainel(24, 24),
                                       TpccTools.aleaChainel(24, 24),
                                       TpccTools.aleaChainel(24, 24),
                                       TpccTools.aleaChainel(24, 24),
                                       0,
                                       0,
                                       0,
                                       TpccTools.sData());

            boolean successful = false;
            while (!successful) {
               try {
                  newStock.store(basicCache);
                  successful = true;
               } catch (Throwable e) {
                  log.warn("Storing new stock failed", e);
               }
            }
View Full Code Here

Examples of org.radargun.stages.tpcc.domain.Stock

         itemPrices[ol_number - 1] = i.getI_price();
         itemNames[ol_number - 1] = i.getI_name();
         // clause 2.4.2.2 (dot 8.2)

         Stock s = new Stock();
         s.setS_i_id(ol_i_id);
         s.setS_w_id(ol_supply_w_id);
         found = s.load(basicCache);
         if (!found) throw new ElementNotFoundException("I_ID=" + ol_i_id + " not found!");


         s_quantity = s.getS_quantity();
         stockQuantities[ol_number - 1] = s_quantity;
         // clause 2.4.2.2 (dot 8.2)
         if (s_quantity - ol_quantity >= 10) {
            s_quantity -= ol_quantity;
         } else {
            s_quantity += -ol_quantity + 91;
         }

         if (ol_supply_w_id == w_id) {
            s_remote_cnt_increment = 0;
         } else {
            s_remote_cnt_increment = 1;
         }
         // clause 2.4.2.2 (dot 8.2)
         s.setS_quantity(s_quantity);
         s.setS_ytd(s.getS_ytd() + ol_quantity);
         s.setS_remote_cnt(s.getS_remote_cnt() + s_remote_cnt_increment);
         s.setS_order_cnt(s.getS_order_cnt() + 1);
         s.store(basicCache);


         // clause 2.4.2.2 (dot 8.3)
         ol_amount = ol_quantity * i.getI_price();
         orderLineAmounts[ol_number - 1] = ol_amount;
         total_amount += ol_amount;
         // clause 2.4.2.2 (dot 8.4)
         i_data = i.getI_data();
         s_data = s.getS_data();
         if (i_data.contains(TpccTools.ORIGINAL) && s_data.contains(TpccTools.ORIGINAL)) {
            brandGeneric[ol_number - 1] = 'B';
         } else {
            brandGeneric[ol_number - 1] = 'G';
         }

         switch ((int) d_id) {
            case 1:
               ol_dist_info = s.getS_dist_01();
               break;
            case 2:
               ol_dist_info = s.getS_dist_02();
               break;
            case 3:
               ol_dist_info = s.getS_dist_03();
               break;
            case 4:
               ol_dist_info = s.getS_dist_04();
               break;
            case 5:
               ol_dist_info = s.getS_dist_05();
               break;
            case 6:
               ol_dist_info = s.getS_dist_06();
               break;
            case 7:
               ol_dist_info = s.getS_dist_07();
               break;
            case 8:
               ol_dist_info = s.getS_dist_08();
               break;
            case 9:
               ol_dist_info = s.getS_dist_09();
               break;
            case 10:
               ol_dist_info = s.getS_dist_10();
               break;
         }
         // clause 2.4.2.2 (dot 8.5)

         OrderLine ol = new OrderLine(o_id, d_id, w_id, ol_number, ol_i_id, ol_supply_w_id, null, ol_quantity, ol_amount, ol_dist_info);
View Full Code Here

Examples of org.springframework.amqp.rabbit.stocks.domain.Stock

  public void setStockController(StockController stockController) {
    this.stockController = stockController;
  }

  public void handleMessage(Quote quote) {
    Stock stock = quote.getStock();
    log.info("Received market data.  Ticker = " + stock.getTicker() + ", Price = " + quote.getPrice());
    stockController.displayQuote(quote);
  }
View Full Code Here

Examples of org.springframework.amqp.rabbit.stocks.domain.Stock

  }

  public void displayQuote(final Quote quote) {
    SwingUtilities.invokeLater(new Runnable() {
      public void run() {
        Stock stock = quote.getStock();
        marketDataTextArea.append(stock.getTicker() + " " + quote.getPrice() + "\n");
      }
    });
  }
View Full Code Here

Examples of patterns.observable.Stock

  }
 
  private Stock facebook;
 
  private Stock _init_facebook() {
    Stock _stock = new Stock("FB", this.facebookPrice);
    return _stock;
  }
View Full Code Here

Examples of sn.unitech.stock.entity.Stock

      }
     
      public static void main(String args[]){
        List<DetailEvent> listDetailEvent=new ArrayList<DetailEvent>();
        DetailEvent detailEvent=new DetailEvent();
        Stock stock=new Stock();
        SysProduit sysProduit=new SysProduit();
        sysProduit.setCompte(new Compte());
        sysProduit.getCompte().setIdCompte("1");
        stock.setSysProduit(sysProduit);
        detailEvent.setStock(stock);
        detailEvent.setEvents(new Events());
        detailEvent.getEvents().setMntTot(new Double(100000));
        detailEvent.setPrixTot(new Double(40000));
        SysUsers sysUsers=new SysUsers();
View Full Code Here

Examples of sn.unitech.stock.entity.Stock

        else return 'C';
        }
    public static void main(String args[]){
      List<DetailEvent> listDetailEvent=new ArrayList<DetailEvent>();
      DetailEvent detailEvent=new DetailEvent();
      Stock stock=new Stock();
      SysProduit sysProduit=new SysProduit();
      sysProduit.setCompte(new Compte());
      sysProduit.getCompte().setIdCompte("1");
      stock.setSysProduit(sysProduit);
      detailEvent.setStock(stock);
      detailEvent.setEvents(new Events());
      detailEvent.getEvents().setMntNet(new Double(100000));
      detailEvent.setPrixTot(new Double(40000));
      SysUsers sysUsers=new SysUsers();
View Full Code Here

Examples of sn.unitech.stock.entity.Stock

      }
          stock.setSysProduit(sysProduit);
      Map<Integer,Object> param1=new HashMap<Integer, Object>();
          param1.put(0,stock.getSysRangmnt().getIdRangmnt());
          param1.put(1,stock.getSysProduit().getIdProduit());
          Stock oldstock=null;
          try{
          oldstock=(Stock)this.getSingleResult(readProperties.read("Produit.jpqlUniciteRangmnt"), em, param1);
          }catch(Exception e){oldstock=null;}
          if(oldstock==null){
          this.persist(stock,em);
View Full Code Here

Examples of sn.unitech.stock.entity.Stock

   
    for(int i=0;i<list.size();i++){
      if(sysEvents.getUseControleQuantite().equals("True"))
      if(!eventsM.isOkQuantite(list.get(i)))
        break
      DetailEvent detailEvent=new DetailEvent(new Stock(list.get(i).getIdStock()));
      detailEvent.setPrixTot(list.get(i).getPrixTot());
      detailEvent.setPrixUnitc(list.get(i).getPrixUnitc());
      detailEvent.getStock().setSysProduit(list.get(i).getSysProduit());
      detailEvent.setSysUnite(list.get(i).getSysProduit().getSysUniteByCodUnitc());
      if(this.sysAdherEvent.getSysAdherent().getUseDetail().equals("True")){
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.