*/
private static boolean testIfGroupAlreadyExists(String name, String type, BGContext groupContext) {
DB db = DBFactory.getInstance();
String query = "select count(bgs) from " + " org.olat.group.BusinessGroupImpl as bgs " + " where bgs.type = :type"
+ " and bgs.groupContext = :context" + " and bgs.name = :name";
DBQuery dbq = db.createQuery(query);
dbq.setString("type", type);
dbq.setEntity("context", groupContext);
dbq.setString("name", name);
int result = ((Long) dbq.list().get(0)).intValue();
if (result != 0) return true;