Package com.googlecode.objectify

Examples of com.googlecode.objectify.Objectify.query()


      String groupName) {
    try {
      Objectify ofy = OS.begin();
      // OQuery<GroupAuthorityEntity> q = OS
      // .createQuery(GroupAuthorityEntity.class);
      Query<GroupAuthorityEntity> q = ofy.query(GroupAuthorityEntity.class);
      q.filter("groupName", groupName);
      return q;// ofy.prepare(q).asList();
    } catch (NullPointerException npe) {
    }
    return null;
View Full Code Here


  public static QueryResultIterable<GroupAuthorityEntity> getAll() {
    // List<GroupAuthorityEntity> resultList = null;
    Objectify ofy = OS.begin();
    // OQuery<GroupAuthorityEntity> q =
    // OS.createQuery(GroupAuthorityEntity.class);
    Query<GroupAuthorityEntity> q = ofy.query(GroupAuthorityEntity.class);
    // resultList = ofy.prepare(q).asList();
    return q;
  }

}
View Full Code Here

    ofy.delete(page);
  }

  public static void deleteTopicCategories(Topic topic) {
    Objectify ofy = OS.begin();
    Query<Category> q = ofy.query(Category.class);
    q.filter("childTopicName", topic.getName());
    ofy.delete(q);
  }

  // public static Category findByName(String name) {
View Full Code Here

  // return null;
  // }

  public static QueryResultIterable<Category> lookupCategoryTopics(String virtualWiki, String categoryName) {
    Objectify ofy = OS.begin();
    Query<Category> q = ofy.query(Category.class);
    q.filter("name", categoryName);
    q.filter("virtualWiki", virtualWiki);
    return q;
  }
View Full Code Here

  }

  public static QueryResultIterable<Category> getAll(String virtualWiki) {
    // List<Category> resultList = null;
    Objectify ofy = OS.begin();
    Query<Category> q = ofy.query(Category.class);
    q.filter("virtualWiki", virtualWiki);
    // resultList = ofy.prepare(q).asList();
    return q;
  }
View Full Code Here

  }

  public static QueryResultIterable<Category> getAll() {
    // List<Category> resultList = null;
    Objectify ofy = OS.begin();
    Query<Category> q = ofy.query(Category.class);
    // resultList = ofy.prepare(q).asList();
    return q;
  }

  // Category save(Category page);
View Full Code Here

  public static boolean isAuthenticated(String username,
      String encryptedPassword) {
    Objectify ofy = OS.begin();
    // OQuery<WikiUser> q = OS.createQuery(WikiUser.class);
    Query<WikiUser> q = ofy.query(WikiUser.class);

    q.filter("username", username);
    q.filter("password", encryptedPassword);
    return q.countAll() > 0;
    // return ofy.prepare(q).asSingle() != null;
View Full Code Here

  public static UserEntity findByName(String name) {
    UserEntity role = null;
    try {
      Objectify ofy = OS.begin();
      // OQuery<UserEntity> q = OS.createQuery(UserEntity.class);
      Query<WikiUser> q = ofy.query(WikiUser.class);
      return ofy.get(UserEntity.class, name);
      // q.filter("username", name);
      // role = ofy.prepare(q).asSingle();
      // return role;
    } catch (EntityNotFoundException enfe) {
View Full Code Here

    return null;
  }

  public static QueryResultIterable<UserEntity> getAll() {
    Objectify ofy = OS.begin();
    Query<UserEntity> q = ofy.query(UserEntity.class);
    return q;
  }
}
View Full Code Here

    return ofy.find(RecentChangeEntity.class, versionId);
  }

  public static QueryResultIterable<RecentChangeEntity> findByTopic(Topic topic) {
    Objectify ofy = OS.begin();
    Query<RecentChangeEntity> q = ofy.query(RecentChangeEntity.class);
    q.filter("topicId", new Key<Topic>(Topic.class, topic.getName()));
    return q;
  }

  public static QueryResultIterable<RecentChangeEntity> findRecentChanges(Pagination pagination, boolean descending) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.