org.springframework.data.gemfire.examples.domain.Order.add()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(2.4k)|赞(0)|评价(0)|浏览(94)

本文整理了Java中org.springframework.data.gemfire.examples.domain.Order.add()方法的一些代码示例,展示了Order.add()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Order.add()方法的具体详情如下:
包路径:org.springframework.data.gemfire.examples.domain.Order
类名称:Order
方法名:add

Order.add介绍

[英]Adds the given LineItem to the Order.
[中]将给定的行项目添加到订单中。

代码示例

代码示例来源:origin: spring-projects/spring-gemfire-examples

@Scheduled(initialDelay = 2000L, fixedRate = 5000L)
public void fulfillOrder() {
  int customerIndex = random.nextInt(customerList.size());
  Customer customer = save(findCustomer(customerIndex));
  Order order = newOrder(customer);
  for (int count = Math.max(1, random.nextInt(6)); count > 0; count--) {
    int productIndex = random.nextInt(productList.size());
    Product product = save(findProduct(productIndex));
    order.add(newLineItem(product, Math.max(1, random.nextInt(3))));
  }
  orders.put(order.getId(), order);
}

代码示例来源:origin: spring-projects/spring-gemfire-examples

long productId = random.nextInt(3) + 1;
log.debug("creating line item for product id " + productId + " quantity " + quantity);
order.add(new LineItem(productRegion.get(productId),quantity));

代码示例来源:origin: spring-projects/spring-gemfire-examples

long productId = random.nextInt(3) + 1;
log.debug("creating line item for product id " + productId + " quantity " + quantity);
order.add(new LineItem(productRegion.get(productId),quantity));

代码示例来源:origin: spring-projects/spring-gemfire-examples

davesOrder.add(new LineItem(ipad,2));
davesOrder.add(new LineItem(macbook));
aliciasFirstOrder.add(new LineItem(ipod,3));
aliciasNextOrder.add(new LineItem(macbook,4));
aliciasNextOrder.add(new LineItem(ipad));

代码示例来源:origin: spring-projects/spring-gemfire-examples

Product iPod = productService.findProductsByDescription("notebook").get(0);
davesOrder.add(new LineItem(iPad,2));
davesOrder.add(new LineItem(macBook));
aliciasFirstOrder.add(new LineItem(iPod,3));
aliciasNextOrder.add(new LineItem(macBook,4));
aliciasNextOrder.add(new LineItem(iPad));

代码示例来源:origin: spring-projects/spring-gemfire-examples

"Dave Street", "Matthews", "USA"));
davesOrder.add(new LineItem(ipad, 2));
davesOrder.add(new LineItem(macbook));
aliciasFirstOrder.add(new LineItem(ipod, 3));
aliciasNextOrder.add(new LineItem(macbook, 4));
aliciasNextOrder.add(new LineItem(ipad));

代码示例来源:origin: spring-projects/spring-gemfire-examples

int quantity = random.nextInt(3) + 1;
long productId = random.nextInt(3) + 1;
order.add(new LineItem(productRegion.get(productId),
  quantity));

相关文章

微信公众号

最新文章

更多