Divisorial ideals and invertible ideals in a graded integral domain