Making rid return a RID java object