public static List<Task> findTodoInvolving(String user) {
   return find.fetch("project")
       .where()
       .eq("done", false)
       .eq("project.members.email", user)
       .findList();
 }
Example #2
0
 /**
  * Return a page of jobs
  *
  * @param page Page to display
  * @param pageSize Number of computers per page
  * @param sortBy Computer property used for sorting
  * @param order Sort order (either or asc or desc)
  * @param filter Filter applied on the name column
  */
 public static Page<JobOffer> getSortedJobPage(
     String userEmail, int page, int pageSize, String sortBy, String order, String filter) {
   return find.where()
       .eq("applicant.email", userEmail)
       .ilike("name", "%" + filter + "%")
       .orderBy(sortBy + " " + order)
       .fetch("company")
       .findPagingList(pageSize)
       .getPage(page);
 }
Example #3
0
 // Busca por Usuário
 public List<Messages> findByUser(User user) {
   return find.where().eq("user", user).findList();
 }
Example #4
0
 // Listando todas as mensagens
 public List<Messages> findAll() {
   return find.all();
 }
Example #5
0
 public static List<ActivityToDo> findInvolving(String user) {
   return find.where().eq("members.email", user).findList();
 }
Example #6
0
 public static boolean isOwner(Long jobId, String username) {
   return find.where().eq("applicant.email", username).eq("id", jobId).findRowCount() > 0;
 }
Example #7
0
  /** Get Job offers recorded by A User */
  public static List<JobOffer> getjobOffersFromUser(String userEmail) {

    return find.where().eq("applicant.email", userEmail).findList();
  }
Example #8
0
 public static List<Boulder> getBouldersByCrag(String crag) {
   return find.where().eq("crag.cragName", crag).findList();
 }
Example #9
0
 public static List<Boulder> findBouldersNeverSent() {
   return find.where().eq("sent", false).findList();
 }
Example #10
0
 public static List<Boulder> findAll() {
   return find.all();
 }
Example #11
0
 public static List<Boulder> findAllSent() {
   return find.where().eq("sent", true).findList();
 }
Example #12
0
 public static List<Boulder> findBoulderSentBy(String climber) {
   return find.where().eq("haveSent.username", climber).findList();
 }
Example #13
0
 /**
  * Query helper for entity Geonames with country String and zip String
  *
  * @param country 2 letter iso country code
  * @param zip Zip code (or partial)
  */
 public static List<Geonames> findByCountryZip(String country, String zip) {
   return find.where().eq("country", country).like("zip", zip + "%").findList();
 }
Example #14
0
 public static List<Project> findInvolving(String user) {
   return find.where().eq("members.email", user).findList();
 }
 public static List<CacheClassifier> findByGroup(Long id) {
   return find.where().eq("group", Group.findById(id)).orderBy("position").findList();
 }
 public static void deleteForGroup(Long id) {
   for (CacheClassifier gpm : findByGroup(id))
     // gpm.delete();
     find.ref(gpm.id).delete();
 }