public T getGroupById()

in torque/src/java/org/apache/fulcrum/security/torque/TorqueAbstractGroupManager.java [341:383]


	public <T extends Group> T getGroupById(Object id) throws DataBackendException, UnknownEntityException
    {
        T group;

        if (id != null && id instanceof Integer)
        {
            Connection con = null;

            try
            {
                con = Transaction.begin();

                group = doSelectById((Integer)id, con);

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

                Transaction.commit(con);
                con = null;
            }
            catch (NoRowsException e)
            {
                throw new UnknownEntityException("Group with id '" + id + "' does not exist.", e);
            }
            catch (TorqueException e)
            {
                throw new DataBackendException("Error retrieving group information", e);
            }
            finally
            {
                if (con != null)
                {
                    Transaction.safeRollback(con);
                }
            }
        }
        else
        {
            throw new UnknownEntityException("Invalid group id '" + id + "'");
        }

        return group;
    }