本文整理了Java中com.avaje.ebean.Query.setMapKey
方法的一些代码示例,展示了Query.setMapKey
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.setMapKey
方法的具体详情如下:
包路径:com.avaje.ebean.Query
类名称:Query
方法名:setMapKey
[英]Set the property to use as keys for a map.
If no property is set then the id property is used.
// Assuming sku is unique for products...
Query<Product> query = Ebean.createQuery(Product.class);
// use sku for keys...
query.setMapKey("sku");
Map<?,Product> productMap = query.findMap();
...
[中]将属性设置为用作地图的关键点。
如果未设置属性,则使用id属性。
// Assuming sku is unique for products...
Query<Product> query = Ebean.createQuery(Product.class);
// use sku for keys...
query.setMapKey("sku");
Map<?,Product> productMap = query.findMap();
...
代码示例来源:origin: org.avaje.ebean/ebean
@Override
public Query<T> setMapKey(String mapKey) {
return rootQuery.setMapKey(mapKey);
}
代码示例来源:origin: org.actframework/act-ebean-java7
@Override
public EbeanQuery<MODEL_TYPE> setMapKey(String mapKey) {
q.setMapKey(mapKey);
qReadOnly.setMapKey(mapKey);
return this;
}
代码示例来源:origin: org.avaje.ebean/ebean
@Override
public Query<T> setMapKey(String mapKey) {
return query.setMapKey(mapKey);
}
代码示例来源:origin: org.avaje/ebean
public Query<T> setMapKey(String mapKey) {
return rootQuery.setMapKey(mapKey);
}
代码示例来源:origin: org.avaje.ebeanorm/avaje-ebeanorm-server
public Query<T> setMapKey(String mapKey) {
return rootQuery.setMapKey(mapKey);
}
代码示例来源:origin: org.avaje/ebean
public Query<T> setMapKey(String mapKey) {
return query.setMapKey(mapKey);
}
代码示例来源:origin: org.avaje.ebeanorm/avaje-ebeanorm-server
public Query<T> setMapKey(String mapKey) {
return query.setMapKey(mapKey);
}
代码示例来源:origin: com.typesafe.play/play-java-ebean
/**
* Sets the property to use as keys for a map.
*/
public Query<T> setMapKey(String mapKey) {
return query().setMapKey(mapKey);
}
内容来源于网络,如有侵权,请联系作者删除!