Пример #1
0
  public static void update(@Valid Match entity) {
    if (validation.hasErrors()) {
      flash.error(Messages.get("scaffold.validation"));
      render("@edit", entity);
    }

    entity = entity.merge();

    entity.save();
    flash.success(Messages.get("scaffold.updated", "Match"));
    index();
  }
Пример #2
0
 public static void edit(java.lang.Long id) {
   Match entity = Match.findById(id);
   render(entity);
 }
Пример #3
0
 public static void delete(java.lang.Long id) {
   Match entity = Match.findById(id);
   entity.delete();
   index();
 }
Пример #4
0
 public static void index() {
   List<Match> entities = models.Match.all().fetch();
   render(entities);
 }