// Strictly following the J2EE DAO Pattern that would be:
// RTTicketDAO dao = RTDAOFactory.getRTDAOFactory(RTDAOFactoryType.REST).getRTTicketDAO(factoryParameters);
try {
LOG.debug("Running the RT Query Builder query and parsing the results");
List<RTTicket> result = dao.findByQuery(RTQBQ_ALL_FROM_CUSTOMER_SERVICE, RTRESTClient.TicketSearchResponseFormat.MULTILINE);
LOG.debug("Iterating over the resulting POJOs");
for (RTTicket ticket : result) {
LOG.debug(String.format(" Found ticket: #%s / %s", ticket.getId(), ticket.getSubject()));
}