本文整理了Java中com.avaje.ebean.Query.setId
方法的一些代码示例,展示了Query.setId
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.setId
方法的具体详情如下:
包路径:com.avaje.ebean.Query
类名称:Query
方法名:setId
[英]Set the Id value to query. This is used with findUnique().
You can use this to have further control over the query. For example adding fetch joins.
Query<Order> query = Ebean.createQuery(Order.class);
Order order = query.setId(1).join("details").findUnique();
List<OrderDetail> details = order.getDetails();
...
[中]设置要查询的Id值。这与findUnique()一起使用。
您可以使用它来进一步控制查询。例如,添加fetch连接。
Query<Order> query = Ebean.createQuery(Order.class);
Order order = query.setId(1).join("details").findUnique();
List<OrderDetail> details = order.getDetails();
...
代码示例来源:origin: org.actframework/act-ebean-java7
@Override
public EbeanQuery<MODEL_TYPE> setId(Object id) {
q.setId(id);
qReadOnly.setId(id);
return this;
}
代码示例来源:origin: com.typesafe.play/play-java-ebean
/**
* Sets the ID value to query.
*/
public Query<T> setId(Object id) {
return query().setId(id);
}
代码示例来源:origin: org.avaje.ebean/ebean
@Override
public <T> T publish(Class<T> beanType, Object id, Transaction transaction) {
Query<T> query = find(beanType).setId(id);
List<T> liveBeans = publish(query, transaction);
return (liveBeans.size() == 1) ? liveBeans.get(0) : null;
}
代码示例来源:origin: org.avaje.ebean/ebean
@Override
public <T> T draftRestore(Class<T> beanType, Object id, Transaction transaction) {
Query<T> query = find(beanType).setId(id);
List<T> beans = draftRestore(query, transaction);
return (beans.size() == 1) ? beans.get(0) : null;
}
代码示例来源:origin: org.avaje/ebean
/**
* Find a bean using its unique id.
*/
public <T> T find(Class<T> beanType, Object id, Transaction t) {
if (id == null) {
throw new NullPointerException("The id is null");
}
Query<T> query = createQuery(beanType).setId(id);
return findId(query, t);
}
代码示例来源:origin: org.avaje.ebeanorm/avaje-ebeanorm-server
/**
* Find a bean using its unique id.
*/
public <T> T find(Class<T> beanType, Object id, Transaction t) {
if (id == null) {
throw new NullPointerException("The id is null");
}
Query<T> query = createQuery(beanType).setId(id);
return findId(query, t);
}
代码示例来源:origin: org.avaje.ebean/ebean
@Override
public ExpressionList<T> idEq(Object value) {
if (query != null && parentExprList == null) {
query.setId(value);
} else {
add(expr.idEq(value));
}
return this;
}
代码示例来源:origin: org.avaje.ebeanorm/avaje-ebeanorm-server
public ExpressionList<T> idEq(Object value) {
if (query != null && parentExprList == null) {
query.setId(value);
} else {
add(expr.idEq(value));
}
return this;
}
代码示例来源:origin: org.avaje/ebean
public ExpressionList<T> idEq(Object value) {
if (query != null && parentExprList == null) {
query.setId(value);
} else {
add(expr.idEq(value));
}
return this;
}
代码示例来源:origin: org.avaje/ebean
query.select(idNames).setId(id);
代码示例来源:origin: org.avaje.ebeanorm/avaje-ebeanorm-server
query.select(idNames).setId(id);
代码示例来源:origin: org.avaje.ebean/ebean
return find(type).select(idProp.getName()).setId(id).findUnique();
内容来源于网络,如有侵权,请联系作者删除!