Retrieval of a collection of objects based on the value of one or more data members
To extend the previous example, we use the query method to return a number of elements
in the collection that satisfy a condition (in this case, those staff with a salary
greater than £30,000). This query returns another collection and we again use a cursor
to iterate over the elements of the collection and display the staff number, staffNo.