本文整理汇总了Java中org.example.domain.query.QContact类的典型用法代码示例。如果您正苦于以下问题:Java QContact类的具体用法?Java QContact怎么用?Java QContact使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
QContact类属于org.example.domain.query包,在下文中一共展示了QContact类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: test
import org.example.domain.query.QContact; //导入依赖的package包/类
@Test
public void test() {
QContact con = QContact.alias();
QCustomer cus = QCustomer.alias();
QProduct pro = QProduct.alias();
Customer customer =
Customer.find.where()
// tuning
.select(cus.name, cus.registered)
.orders.fetchAll()
.orders.details.product.fetch(pro.name)
.contacts.fetch(con.firstName)
// predicates
.id.eq(12)
.findUnique();
}
开发者ID:ebean-orm-examples,项目名称:avaje-ebeanorm-examples,代码行数:19,代码来源:ExamplePartialObjectQueryTest.java
示例2: fetch
import org.example.domain.query.QContact; //导入依赖的package包/类
/**
* Eagerly fetch this association loading the specified properties.
*/
@SafeVarargs
public final R fetch(TQProperty<QContact>... properties) {
return fetchProperties(properties);
}
示例3: where
import org.example.domain.query.QContact; //导入依赖的package包/类
/**
* Start a new typed query.
*/
protected QContact where() {
return new QContact(db());
}
示例4: text
import org.example.domain.query.QContact; //导入依赖的package包/类
/**
* Start a new document store query.
*/
protected QContact text() {
return new QContact(db()).text();
}
示例5: where
import org.example.domain.query.QContact; //导入依赖的package包/类
/**
* Start a new typed query.
*/
public QContact where() {
return new QContact(db());
}
示例6: text
import org.example.domain.query.QContact; //导入依赖的package包/类
/**
* Start a new document store query.
*/
public QContact text() {
return new QContact(db()).text();
}
示例7: simple
import org.example.domain.query.QContact; //导入依赖的package包/类
@Test
public void simple() {
LoadExampleData.load();
Date oneWeekAgo = new Date(System.currentTimeMillis());
ExpressionList<Order> recentNewOrders = new QOrder()
.orderDate.after(oneWeekAgo)
.status.eq(Order.Status.NEW)
.getExpressionList();
QCustomer cus = QCustomer.alias();
QContact con = QContact.alias();
List<Customer> customers = new QCustomer()
// query tuning
.select(cus.name, cus.inactive)
.contacts.fetch(con.email, con.firstName)
.contacts.notes.fetchAll()
// predicates
.name.ilike("Rob")
.orders.filterMany(recentNewOrders)
.findList();
// ExpressionList<OrderDetail> detailsFilter = new QOrderDetail()
// .unitPrice.isNotNull()
// .getExpressionList();
//
// Customer cust = Customer.find.ref(1L);
//
// new QOrder()
// .status.in(Order.Status.APPROVED, Order.Status.COMPLETE)
// .customer.equalTo(cust)
// .details.filterMany(detailsFilter)
// .findList();
// new QOrder()
// .id.greaterThan(1)
// .findEach(new QueryEachConsumer<Order>() {
// @Override
// public void accept(Order order) {
// Customer customer = order.getCustomer();
// List<Contact> contacts = customer.getContacts();
// System.out.println(contacts);
// }
// });
}