public void deleteGroup(AjaxBehaviorEvent event) { Group group = groupModel.getRowData(); DaoFactory.getInstance().getGroupDao().deleteGroup(group.getId()); groupList.remove(group); fillGroupItem(); // getAllGroup(); }
public void saveFilm(AjaxBehaviorEvent event) { WebBrowser webBrowser = new WebBrowser(LogEnum.WEB.getLog()); try { webBrowser.goToUrl(filmEdit.getLinkRutracker()); filmEdit.setTitle(webBrowser.getTitle()); } catch (CoreException e) { // TODO Избавится от такого большого исключения сделать один статический метод FacesMessage error = new FacesMessage(); error.setSeverity(FacesMessage.SEVERITY_ERROR); error.setSummary(e.getMessage()); throw new ValidatorException(error); } if (filmEdit.getType() != TypeDistributionEnum.SERIALS.getType()) { filmEdit.setRegexpSerialNumber(null); filmEdit.setSeasonNumber(null); } DaoFactory.getInstance().getDistributionDao().addDistribution(filmEdit); if (filmList.size() > 0) filmList.add(0, filmEdit); filmList.add(filmEdit); }
private void getAllGroup() { groupList = DaoFactory.getInstance().getGroupDao().getAllGroup(); fillGroupItem(); }
public void updateFilm(AjaxBehaviorEvent event) { System.out.println("PRE UPDATE"); System.out.println(filmEdit); DaoFactory.getInstance().getDistributionDao().updateDistribution(filmEdit); System.out.println("POST UPDATE"); }
public void saveGroup(AjaxBehaviorEvent event) { DaoFactory.getInstance().getGroupDao().addGroup(groupEdit); groupList.add(groupEdit); fillGroupItem(); }
public void updateGroup(AjaxBehaviorEvent event) { DaoFactory.getInstance().getGroupDao().updateGroup(groupEdit); }
public void deleteFilm(AjaxBehaviorEvent event) { Distribution distribution = filmModel.getRowData(); DaoFactory.getInstance().getDistributionDao().removeDistribution(distribution.getId()); filmList.remove(distribution); // getAllFilm(); }
private void getAllFilm() { filmList = DaoFactory.getInstance().getDistributionDao().getAllDistribution(); allFilmList = new ArrayList<Distribution>(filmList); }