Beispiel #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();
  }
Beispiel #2
0
 public static void edit(java.lang.Long id) {
   Match entity = Match.findById(id);
   render(entity);
 }
Beispiel #3
0
 public static void delete(java.lang.Long id) {
   Match entity = Match.findById(id);
   entity.delete();
   index();
 }
Beispiel #4
0
 public static void index() {
   List<Match> entities = models.Match.all().fetch();
   render(entities);
 }