using ArrayList when accessing query result metadata