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