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

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

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

Order.getCustomerId介绍

[英]Returns the id of the Customer who placed the Order.
[中]返回下订单的客户的id。

代码示例

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

@Override
  public void afterCreate(EntryEvent<Long, Order> event) {
    Order order = event.getNewValue();
    System.err.printf("[%s] made an Order [%s] for [%s]%n",
      findCustomerById(order.getCustomerId()), order, order.getLineItems());
  }
};

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

/**
 * Create an order
 */
public Order createOrder(Order order) {
  Assert.notNull(order, "order cannot be null");
  Assert.notNull(order.getId(), "order ID cannot be null");
  Assert.notNull(order.getCustomerId(), "order customer ID cannot be null");
  Assert.notEmpty(order.getLineItems(), "order must contain at least one line item");
  Assert.notNull(order.getBillingAddress(), "order billing address cannot be null");
  log.debug("creating new order " + order.getId());
  return orderRepository.save(order);
}

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

/**
 * Create an order
 * @param order
 * @return
 */
public Order createOrder(Order order) {
  Assert.notNull(order, "order cannot be null");
  Assert.notNull(order.getId(),"order id cannot be null");
  Assert.notNull(order.getCustomerId(), "order customer ID cannot be null");
  Assert.notEmpty(order.getLineItems(),"order must contain at least one line item");
  
  log.debug("creating order ID:" + order.getId() );
  return orderDao.save(order);
  
}

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

private ContinuousQueryListener newQueryListener(Region<Long, Customer> customers, String qualifier) {
  return event -> {
    Order order = (Order) event.getNewValue();
    System.err.printf("[%s] made an %s Order [%s] for [%s]%n",
      findByCustomerId(customers, order.getCustomerId()), qualifier, order, order.getLineItems());
  };
}

相关文章