Examples of RTTicketDAO


Examples of de.boksa.rt.dao.RTTicketDAO

    factoryParameters.put(RESTRTDAOFactory.REST_INTERFACE_BASE_URL, "http://rt.easter-eggs.org/demos/stable/REST/1.0/");
    factoryParameters.put(RESTRTDAOFactory.REST_INTERFACE_USERNAME, "john.foo");
    factoryParameters.put(RESTRTDAOFactory.REST_INTERFACE_PASSWORD, "john.foo");
   
    LOG.debug("Creating the RTTicketDAO");
    RTTicketDAO dao = RESTRTDAOFactory.getInstance().getRTTicketDAO(factoryParameters);
   
    // 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()));
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.