本文整理汇总了Java中org.example.domain.Customer.getName方法的典型用法代码示例。如果您正苦于以下问题:Java Customer.getName方法的具体用法?Java Customer.getName怎么用?Java Customer.getName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.example.domain.Customer
的用法示例。
在下文中一共展示了Customer.getName方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: query_useDocStore_then_lazyLoadAssocOne
import org.example.domain.Customer; //导入方法依赖的package包/类
@Test
public void query_useDocStore_then_lazyLoadAssocOne() throws InterruptedException {
List<Contact> contacts = Ebean.find(Contact.class)
.where().icontains("lastName", "bunny")
.orderBy().asc("lastName")
.setUseDocStore(true)
.findList();
for (Contact contact : contacts) {
Customer customer = contact.getCustomer();
customer.getId();
customer.getName();
customer.getSmallNote();
customer.getId();
}
assertThat(contacts).hasSize(1);
}
示例2: testOther
import org.example.domain.Customer; //导入方法依赖的package包/类
@Test
public void testOther() {
List<Order> orders = Order.find.byStatus(Order.Status.NEW, Order.Status.APPROVED);
for (Order order : orders) {
order.getOrderDate();
order.getShipDate();
Customer customer = order.getCustomer();
customer.getName();
//customer.getComments();
List<Contact> contacts = customer.getContacts();
for (Contact contact : contacts) {
contact.getFirstName();
contact.getLastName();
//contact.getEmail();
}
}
}
示例3: findIterate
import org.example.domain.Customer; //导入方法依赖的package包/类
@Test
public void findIterate() {
Customer cust = new Customer();
cust.setName("foo");
cust.setStatus(Customer.Status.GOOD);
cust.save();
List<Long> ids = new QCustomer()
.status.equalTo(Customer.Status.GOOD)
.findIds();
assertThat(ids).isNotEmpty();
Map<List, Customer> map = new QCustomer()
.status.equalTo(Customer.Status.GOOD)
.findMap();
assertThat(map.size()).isEqualTo(ids.size());
QueryIterator<Customer> iterate = new QCustomer()
.status.equalTo(Customer.Status.GOOD)
.findIterate();
try {
while (iterate.hasNext()) {
Customer customer = iterate.next();
customer.getName();
}
} finally {
iterate.close();
}
}
示例4: test
import org.example.domain.Customer; //导入方法依赖的package包/类
@Test
public void test() {
List<Order> orders = Order.find.byStatus(Order.Status.NEW, Order.Status.APPROVED, Order.Status.COMPLETE);
for (Order order : orders) {
order.getOrderDate();
order.getShipDate();
order.getStatus();
Customer customer = order.getCustomer();
customer.getName();
// Address billingAddress = customer.getBillingAddress();
// if (billingAddress != null) {
// billingAddress.getLine1();
// billingAddress.getLine2();
// billingAddress.getCity();
// billingAddress.getCountry().getCode();
// }
List<OrderDetail> details = order.getDetails();
for (OrderDetail detail : details) {
detail.getUnitPrice();
detail.getShipQty();
Product product = detail.getProduct();
product.getId();
product.getName();
}
}
}