Package com.centraview.support.faq

Examples of com.centraview.support.faq.QuestionList


     
      SupportFacadeHome supFacade = (SupportFacadeHome)CVUtility.getHomeObject("com.centraview.support.supportfacade.SupportFacadeHome", "SupportFacade");
      SupportFacade supRemote = supFacade.create();
      supRemote.setDataSource(dataSource);
     
      QuestionList questionList = supRemote.getQuestionList(individualID, faqID);

      ArrayList qList = new ArrayList();
     
      Set listkey = questionList.keySet();
      Iterator iter = listkey.iterator();
      while (iter.hasNext()) {
        String key = (String)iter.next();
        ListElement row = (ListElement)questionList.get(key);

        HashMap questionInfo = new HashMap();
       
        StringMember questionField = (StringMember)row.get("Question");
        StringMember answerField = (StringMember)row.get("Answer");
View Full Code Here


    return threadlist;
  }

  public QuestionList getQuestionList(int userID, int curFaqID)
  {
    QuestionList questionList = null;
    try {
      InitialContext ic = CVUtility.getInitialContext();
      SupportListLocalHome home = (SupportListLocalHome) ic.lookup("local/SupportList");
      SupportListLocal remote = home.create();
      remote.setDataSource(this.dataSource);
View Full Code Here

    return vecDDNameValue;
  }

  public QuestionList getQuestionList(int userID, int curFaqID)
  {
    QuestionList questionList = new QuestionList();

    CVDal cvdl = new CVDal(dataSource);

    Collection colList = null;

    cvdl.setSql("support.faq.getquestionforfaq");

    cvdl.setInt(1, curFaqID);
    colList = cvdl.executeQuery();
    cvdl.clearParameters();

    cvdl.destroy();

    if (colList.size() > 0)
    {
      Iterator it = colList.iterator();
      int i = 0;

      while (it.hasNext())
      {
        i++;
        HashMap hm = (HashMap)it.next();
        int questionID = ((Long)hm.get("questionid")).intValue();

        try
        {
          IntMember intQuestionID = new IntMember("QuestionID", questionID, 10, "", 'T', false, 10);

          StringMember strQuestion = null;

          if ((hm.get("question") != null))
            strQuestion = new StringMember("Question", (String)hm.get("question"), 10, "", 'T', true);
          else
            strQuestion = new StringMember("Question", null, 10, "", 'T', true);

          StringMember strAnswer = null;

          if ((hm.get("answer") != null))
            strAnswer = new StringMember("Answer", (String)hm.get("answer"), 10, "", 'T', true);
          else
            strAnswer = new StringMember("Answer", null, 10, "", 'T', true);

          QuestionListElement questionListElement = new QuestionListElement(questionID);

          questionListElement.put("QuestionID", intQuestionID);
          questionListElement.put("Question", strQuestion);
          questionListElement.put("Answer", strAnswer);

          StringBuffer stringbuffer = new StringBuffer("00000000000");
          stringbuffer.setLength(11);
          String s3 = (new Integer(i)).toString();
          stringbuffer.replace(stringbuffer.length() - s3.length(), stringbuffer.length(), s3);
          String s4 = stringbuffer.toString();

          questionList.put(s4, questionListElement);
        } catch (Exception e) {
          logger.debug(" [Exception] SupportListEJB.getQuestionList " + e);
          e.printStackTrace();
        }
      }
View Full Code Here

TOP

Related Classes of com.centraview.support.faq.QuestionList

Copyright © 2018 www.massapicom. 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.