本文整理了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
[英]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());
};
}
内容来源于网络,如有侵权,请联系作者删除!