The following code is if you want to use the patient list from one of the cohort queries saved in the reporting module that DO NOT have parameters in them. If they have parameters it gets more complicated.
First, you should use the CohortDefinition class and create an object with an ID that has been previously stored. In this example, the ID is retrived from programming.getCohort()
With that definition, you create the cohort using the cohort service. Finally, you can obtain the list of patients for that query.
The code is here