public static void createSomeInstitutions(int numInstitutions) { for (int i = 0; i < numInstitutions; i++) { User.NameGenerator ng = new User.NameGenerator(); Institution in = new Institution("School of " + ng.getName(), ng.getName() + ", VA", "descriptionnnn"); in.save(); } }
public static void delete(Long id) { Institution institution = find.ref(id); if (institution == null) { return; } institution.retired = true; institution.save(); }
/** ****************************** CREATE / DELETE ****************************** */ public static Institution create(Institution institution) { institution.save(); return institution; }