public OrgType orgType(String name, boolean autoCreate, Session session) { OrgType ot = orgType(name); if (ot == null) { if (autoCreate) { if (getOrgTypes() == null) { setOrgTypes(new ArrayList<>()); } ot = new OrgType(); ot.setName(name); ot.setDisplayName(name); ot.setOrganisation(this); getOrgTypes().add(ot); session.save(this); session.save(ot); } } return ot; }