public T getGroupByName()

in torque/src/java/org/apache/fulcrum/security/torque/TorqueAbstractGroupManager.java [193:231]


	public <T extends Group> T getGroupByName(String name) throws DataBackendException, UnknownEntityException
    {
        T group = null;
        Connection con = null;

        try
        {
            con = Transaction.begin();

            group = doSelectByName(name, con);

            // Add dependent objects if they exist
            ((TorqueAbstractSecurityEntity)group).retrieveAttachedObjects(con, getLazyLoading());

            Transaction.commit(con);
            con = null;
        }
        catch (NoRowsException e)
        {
            throw new UnknownEntityException("Could not find group " + name);
        }
        catch (TooManyRowsException e)
        {
            throw new DataBackendException("Multiple Groups with same name '" + name + "'");
        }
        catch (TorqueException e)
        {
            throw new DataBackendException("Error retrieving group information", e);
        }
        finally
        {
            if (con != null)
            {
                Transaction.safeRollback(con);
            }
        }

        return group;
    }