示例#1
0
  private List<Distribution> prepareFilmList() {
    List<Distribution> filmList = null;
    filmList = new ArrayList<Distribution>();
    Collections.sort(
        allFilmList,
        new Comparator<Distribution>() {
          @Override
          public int compare(Distribution o1, Distribution o2) {
            return o1.getId().compareTo(o2.getId());
          }
        });
    if (!sortByDate) Collections.reverse(allFilmList);

    for (Distribution film : allFilmList) {
      if ((selectGroupData == null || film.getGroup().equals(selectGroupData))
          && (film.getStatus() == actualStatus || actualStatus == null)
          && film.getTitle().toLowerCase().contains(findFilmParam.toLowerCase())) {
        filmList.add(film);
      }
    }
    return filmList;
  }
示例#2
0
 public void dialogChangeGroup(AjaxBehaviorEvent event) {
   if (filmEdit != null && filmEdit.getGroup() != null) {
     filmEdit.setMailMessage(filmEdit.getGroup().getEmailMessage());
     filmEdit.setMailRegexp(filmEdit.getGroup().getEmailRegexp());
   }
 }