com.googlecode.objectify.cmd.Query.list()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(3.8k)|赞(0)|评价(0)|浏览(101)

本文整理了Java中com.googlecode.objectify.cmd.Query.list方法的一些代码示例,展示了Query.list的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.list方法的具体详情如下:
包路径:com.googlecode.objectify.cmd.Query
类名称:Query
方法名:list

Query.list介绍

暂无

代码示例

代码示例来源:origin: TEAMMATES/teammates

.filter("googleId =", oldGoogleId).list();
.filter("googleId =", oldGoogleId).list();

代码示例来源:origin: TEAMMATES/teammates

@Override
  public String load(String courseId) {
    List<Instructor> instructors =
        ofy().load().type(Instructor.class).filter("courseId =", courseId).list();
    for (Instructor instructor : instructors) {
      if (StringHelper.isEmpty(instructor.getGoogleId())) {
        continue;
      }
      Account account = ofy().load().key(Key.create(Account.class, instructor.getGoogleId())).now();
      if (account != null && !StringHelper.isEmpty(account.getInstitute())) {
        return account.getInstitute();
      }
    }
    return UNKNOWN_INSTITUTE;
  }
});

代码示例来源:origin: com.googlecode.luceneappengine/luceneappengine

/**
 * Method that return every lock created by this {@link GaeLockFactory}.
 * 
 * @return The list of {@link GaeLock} created by this
 *         {@link GaeLockFactory}
 */
List<GaeLock> getLocks(GaeDirectory gaeDirectory) {
  return ofy().load().type(GaeLock.class).ancestor(gaeDirectory.indexKey).list();
}

代码示例来源:origin: com.threewks.thundr/thundr-gae

@Override
public List<E> list(int count) {
  return ofy().load().type(entityType).limit(count).list();
}

代码示例来源:origin: com.threewks.thundr/thundr-gae

@Override
public List<E> getByField(String field, Object value) {
  return ofy().load().type(entityType).filter(field, value).list();
}

代码示例来源:origin: com.threewks.thundr/thundr-gae

@Override
public List<E> getByField(String field, List<? extends Object> values) {
  return ofy().load().type(entityType).filter(field + " in", values).list();
}

代码示例来源:origin: omerio/appstart

public static List<Todo> findAllByArchived(boolean archived)	{
  return ofy().load().type(Todo.class).filter("archived", archived).list();
}

代码示例来源:origin: omerio/appstart

public static List<Todo> findAllByCompleted(boolean completed)	{
  return ofy().load().type(Todo.class).filter("completed", completed).list();
}

代码示例来源:origin: omerio/appstart

/**
 * Find all todos which are completed, not archived and are older than the provided
 * date.
 * @param date
 * @return
 */
public static List<Todo> findAllToArchive(Date date)	{
  return ofy().load().type(Todo.class)
      .filter("archived", false)
      .filter("completed", true)
      .filter("dateAdded <=", date).list();
}

代码示例来源:origin: instacount/appengine-counter

.list();
assertThat(countersList.size(), is(3));
assertThat(countersList.get(0), is(counterData1));
countersList = ObjectifyService.ofy().load().type(CounterData.class).order("-numShards").list();
assertThat(countersList.size(), is(3));
assertThat(countersList.get(0), is(counterData3));
countersList = ObjectifyService.ofy().load().type(CounterData.class).order("description").list();
assertThat(countersList.size(), is(3));
assertThat(countersList.get(0), is(counterData1));
countersList = ObjectifyService.ofy().load().type(CounterData.class).order("-description").list();
assertThat(countersList.size(), is(3));
assertThat(countersList.get(0), is(counterData3));
countersList = ObjectifyService.ofy().load().type(CounterData.class).order("counterStatus").list();
assertThat(countersList.size(), is(3));
assertThat(countersList.get(0), is(counterData1));
countersList = ObjectifyService.ofy().load().type(CounterData.class).order("-counterStatus").list();
assertThat(countersList.size(), is(3));
assertThat(countersList.get(0), is(counterData3));
  .order("counterGroupData.eventuallyConsistentCount").list();
assertThat(countersList.size(), is(3));
assertThat(countersList.get(0), is(counterData1));
  .order("-counterGroupData.eventuallyConsistentCount").list();

相关文章