本文整理了Java中de.greenrobot.dao.query.Query.list
方法的一些代码示例,展示了Query.list
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.list
方法的具体详情如下:
包路径:de.greenrobot.dao.query.Query
类名称:Query
方法名:list
[英]Executes the query and returns the result as a list containing all entities loaded into memory.
[中]执行查询并将结果作为包含加载到内存中的所有实体的列表返回。
代码示例来源:origin: kaku2015/ColorfulNews
public static List<NewsChannelTable> loadNewsChannelsIndexGt(int channelIndex) {
Query<NewsChannelTable> newsChannelTableQuery = App.getNewsChannelTableDao().queryBuilder()
.where(NewsChannelTableDao.Properties.NewsChannelIndex
.gt(channelIndex)).build();
return newsChannelTableQuery.list();
}
代码示例来源:origin: kaku2015/ColorfulNews
public static List<NewsChannelTable> loadNewsChannelsWithin(int from, int to) {
Query<NewsChannelTable> newsChannelTableQuery = App.getNewsChannelTableDao().queryBuilder()
.where(NewsChannelTableDao.Properties.NewsChannelIndex
.between(from, to)).build();
return newsChannelTableQuery.list();
}
代码示例来源:origin: kaku2015/ColorfulNews
public static List<NewsChannelTable> loadNewsChannelsMore() {
Query<NewsChannelTable> newsChannelTableQuery = App.getNewsChannelTableDao().queryBuilder()
.where(NewsChannelTableDao.Properties.NewsChannelSelect.eq(false))
.orderAsc(NewsChannelTableDao.Properties.NewsChannelIndex).build();
return newsChannelTableQuery.list();
}
代码示例来源:origin: kaku2015/ColorfulNews
public static List<NewsChannelTable> loadNewsChannelsIndexLtAndIsUnselect(int channelIndex) {
Query<NewsChannelTable> newsChannelTableQuery = App.getNewsChannelTableDao().queryBuilder()
.where(NewsChannelTableDao.Properties.NewsChannelIndex.lt(channelIndex),
NewsChannelTableDao.Properties.NewsChannelSelect.eq(false)).build();
return newsChannelTableQuery.list();
}
代码示例来源:origin: kaku2015/ColorfulNews
public static List<NewsChannelTable> loadNewsChannelsMine() {
Query<NewsChannelTable> newsChannelTableQuery = App.getNewsChannelTableDao().queryBuilder()
.where(NewsChannelTableDao.Properties.NewsChannelSelect.eq(true))
.orderAsc(NewsChannelTableDao.Properties.NewsChannelIndex).build();
return newsChannelTableQuery.list();
}
代码示例来源:origin: org.greenrobot/greendao-encryption
/**
* Shorthand for {@link QueryBuilder#build() build()}.{@link Query#list() list()}; see {@link Query#list()} for
* details. To execute a query more than once, you should build the query and keep the {@link Query} object for
* efficiency reasons.
*/
public List<T> list() {
return build().list();
}
代码示例来源:origin: de.greenrobot/greendao
/**
* Shorthand for {@link QueryBuilder#build() build()}.{@link Query#list() list()}; see {@link Query#list()} for
* details. To execute a query more than once, you should build the query and keep the {@link Query} object for
* efficiency reasons.
*/
public List<T> list() {
return build().list();
}
代码示例来源:origin: shixinzhang/DistanceMeasure
private ArrayList<PictureInfo> getPicturesData() {
ArrayList<PictureInfo> queryList;
DaoSession daoSession = BaseApplication.getDaoSession();
PictureInfoDao pictureInfoDao = daoSession.getPictureInfoDao();
Query<PictureInfo> query = pictureInfoDao.queryBuilder().orderAsc(PictureInfoDao.Properties.Time).build();
queryList = (ArrayList<PictureInfo>) query.list();
return queryList;
}
代码示例来源:origin: GuoFeilong/LifeHelper
/** Internal query to resolve the "planNodes" to-many relationship of RouteLineNodeTable. */
public List<PlanNodeTable> _queryRouteLineNodeTable_PlanNodes(Long typeID) {
synchronized (this) {
if (routeLineNodeTable_PlanNodesQuery == null) {
QueryBuilder<PlanNodeTable> queryBuilder = queryBuilder();
queryBuilder.where(Properties.TypeID.eq(null));
routeLineNodeTable_PlanNodesQuery = queryBuilder.build();
}
}
Query<PlanNodeTable> query = routeLineNodeTable_PlanNodesQuery.forCurrentThread();
query.setParameter(0, typeID);
return query.list();
}
代码示例来源:origin: bodismile/bmob-newim-demo
/**
* 获取所有未读未验证的好友请求
* @return
*/
private List<NewFriend> getNoVerifyNewFriend(){
NewFriendDao dao = openReadableDb().getNewFriendDao();
return dao.queryBuilder().where(NewFriendDao.Properties.Status.eq(Config.STATUS_VERIFY_NONE))
.build().list();
}
代码示例来源:origin: sealtalk/sealtalk-android
private void filterList(String filterStr) {
Map<String, List<GroupMember>> filterGroupNameListMap = new HashMap<>();
Map<String, List<GroupMember>> filterGroupMemberNameListMap = new HashMap<>();
for (String groupId : mFilterGroupId) {
QueryBuilder groupNameQueryBuilder = DBManager.getInstance().getDaoSession().getGroupMemberDao().queryBuilder();
List<GroupMember> filterGroupNameList = groupNameQueryBuilder.where(GroupMemberDao.Properties.GroupId.eq(groupId),
groupNameQueryBuilder.or(GroupMemberDao.Properties.GroupName.like("%" + mFilterString + "%"),
GroupMemberDao.Properties.GroupNameSpelling.like(mFilterString + "%"))).orderAsc(GroupMemberDao.Properties.GroupNameSpelling).build().list();
QueryBuilder groupMemberNameQueryBuilder = DBManager.getInstance().getDaoSession().getGroupMemberDao().queryBuilder();
List<GroupMember> filterGroupMemberNameList = groupMemberNameQueryBuilder.where(GroupMemberDao.Properties.GroupId.eq(groupId),
groupMemberNameQueryBuilder.or(GroupMemberDao.Properties.Name.like("%" + mFilterString + "%"),
GroupMemberDao.Properties.NameSpelling.like(mFilterString + "%"),
GroupMemberDao.Properties.DisplayName.like("%" + mFilterString + "%"),
GroupMemberDao.Properties.DisplayNameSpelling.like(mFilterString + "%"))
).orderAsc(GroupMemberDao.Properties.NameSpelling, GroupMemberDao.Properties.DisplayNameSpelling).build().list();
if (filterGroupNameList.size() != 0) {
filterGroupNameListMap.put(groupId, filterGroupNameList);
} else {
filterGroupNameListMap.put(groupId, null);
}
if (filterGroupMemberNameList.size() != 0) {
filterGroupMemberNameListMap.put(groupId, filterGroupMemberNameList);
} else {
filterGroupMemberNameListMap.put(groupId, null);
}
}
GroupListAdapter groupListAdapter = new GroupListAdapter(this, mFilterGroupId, filterGroupNameListMap, filterGroupMemberNameListMap, filterStr);
mGroupsListView.setAdapter(groupListAdapter);
}
private synchronized SearchResult filterInfo(String filterStr) {
代码示例来源:origin: leftcoding/GankLy
/** Internal query to resolve the "orders" to-many relationship of Customer. */
public List<Order> _queryCustomer_Orders(long customerId) {
synchronized (this) {
if (customer_OrdersQuery == null) {
QueryBuilder<Order> queryBuilder = queryBuilder();
queryBuilder.where(Properties.CustomerId.eq(null));
queryBuilder.orderRaw("T.'DATE' ASC");
customer_OrdersQuery = queryBuilder.build();
}
}
Query<Order> query = customer_OrdersQuery.forCurrentThread();
query.setParameter(0, customerId);
return query.list();
}
代码示例来源:origin: sealtalk/sealtalk-android
List<GroupMember> filterGroupNameList = groupNameQueryBuilder.where(GroupMemberDao.Properties.GroupId.eq(groupId),
groupNameQueryBuilder.or(GroupMemberDao.Properties.GroupName.like("%" + filterStr + "%"),
GroupMemberDao.Properties.GroupNameSpelling.like(filterStr + "%"))).orderAsc(GroupMemberDao.Properties.GroupNameSpelling).build().list();
QueryBuilder groupMemberNameQueryBuilder = DBManager.getInstance().getDaoSession().getGroupMemberDao().queryBuilder();
List<GroupMember> filterGroupMemberNameList = groupMemberNameQueryBuilder.where(GroupMemberDao.Properties.GroupId.eq(groupId),
GroupMemberDao.Properties.DisplayName.like("%" + filterStr + "%"),
GroupMemberDao.Properties.DisplayNameSpelling.like(filterStr + "%"))
).orderAsc(GroupMemberDao.Properties.NameSpelling, GroupMemberDao.Properties.DisplayNameSpelling).build().list();
if (filterGroupNameList.size() != 0) {
filterGroupNameListMap.put(groupId, filterGroupNameList);
代码示例来源:origin: sealtalk/sealtalk-android
FriendDao.Properties.DisplayName.like("%" + filterStr + "%"),
FriendDao.Properties.NameSpelling.like(filterStr + "%"),
FriendDao.Properties.DisplayNameSpelling.like(filterStr + "%"))).orderAsc(FriendDao.Properties.DisplayNameSpelling, FriendDao.Properties.NameSpelling).build().list();
List<GroupMember> filterGroupNameList = groupNameQueryBuilder.where(GroupMemberDao.Properties.GroupId.eq(groupId),
groupNameQueryBuilder.or(GroupMemberDao.Properties.GroupName.like("%" + filterStr + "%"),
GroupMemberDao.Properties.GroupNameSpelling.like(filterStr + "%"))).orderAsc(GroupMemberDao.Properties.GroupNameSpelling).build().list();
QueryBuilder groupMemberNameQueryBuilder = DBManager.getInstance().getDaoSession().getGroupMemberDao().queryBuilder();
List<GroupMember> filterGroupMemberNameList = groupMemberNameQueryBuilder.where(GroupMemberDao.Properties.GroupId.eq(groupId),
GroupMemberDao.Properties.DisplayName.like("%" + filterStr + "%"),
GroupMemberDao.Properties.DisplayNameSpelling.like(filterStr + "%"))
).orderAsc(GroupMemberDao.Properties.NameSpelling, GroupMemberDao.Properties.DisplayNameSpelling).build().list();
if (filterGroupNameList.size() != 0) {
filterGroupNameListMap.put(groupId, filterGroupNameList);
代码示例来源:origin: sealtalk/sealtalk-android
private synchronized SearchResult filterInfo(String filterStr) {
List<Friend> filterFriendList = new ArrayList<>();
SearchResult searchResult = new SearchResult();
if (filterStr.equals("")) {
SearchResult result = new SearchResult();
result.setFilterStr("");
result.setFilterFriendList(filterFriendList);
return result;
}
if (filterStr.contains("'")) {
SearchResult result = new SearchResult();
result.setFilterStr(filterStr);
result.setFilterFriendList(filterFriendList);
return result;
}
QueryBuilder queryBuilder = DBManager.getInstance().getDaoSession().getFriendDao().queryBuilder();
filterFriendList = queryBuilder.where(queryBuilder.or(FriendDao.Properties.Name.like("%" + filterStr + "%"),
FriendDao.Properties.DisplayName.like("%" + filterStr + "%"),
FriendDao.Properties.NameSpelling.like(filterStr + "%"),
FriendDao.Properties.DisplayNameSpelling.like(filterStr + "%"))).orderAsc(FriendDao.Properties.DisplayNameSpelling, FriendDao.Properties.NameSpelling).build().list();
searchResult.setFilterStr(filterStr);
searchResult.setFilterFriendList(filterFriendList);
return searchResult;
}
@Override
代码示例来源:origin: org.greenrobot/greendao-encryption
break;
case QueryList:
operation.result = ((Query) operation.parameter).forCurrentThread().list();
break;
case QueryUnique:
代码示例来源:origin: de.greenrobot/greendao
break;
case QueryList:
operation.result = ((Query) operation.parameter).forCurrentThread().list();
break;
case QueryUnique:
内容来源于网络,如有侵权,请联系作者删除!