本文整理匯總了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);
// }
// });
}