in torque/src/java/org/apache/fulcrum/security/torque/TorqueAbstractGroupManager.java [288:327]
public boolean checkExists(String groupName) throws DataBackendException
{
boolean exists = false;
Connection con = null;
try
{
con = Transaction.begin();
doSelectByName(groupName, con);
Transaction.commit(con);
con = null;
exists = true;
}
catch (NoRowsException e)
{
exists = false;
}
catch (TooManyRowsException e)
{
throw new DataBackendException(
"Multiple groups with same name '" + groupName + "'");
}
catch (TorqueException e)
{
throw new DataBackendException("Error retrieving group information", e);
}
finally
{
if (con != null)
{
Transaction.safeRollback(con);
}
}
return exists;
}