}
}
catch( SQLException e )
{
closeQuietly( conn, ps, rs );
throw new NoSuchPrincipalException( e.getMessage() );
}
finally
{
closeQuietly( conn, ps, rs );
}
if( !found )
{
throw new NoSuchPrincipalException( "Could not find group in database!" );
}
if( !unique )
{
throw new NoSuchPrincipalException( "More than one group in database!" );
}
return group;
}