Package java.util

Examples of java.util.Set


            DL.setTotalNoOfRecords(DL.size());
          }
        }


        Set listkey = DL.keySet();
        Iterator it =  listkey.iterator();
        while( it.hasNext() )
        {
          String str = ( String )it.next();

          StringMember sm=null;
View Full Code Here


        emailList = (EmailList) sessionEmailList;
      }else{
        emailList = (EmailList)lg.getEmailList(individualID, startAt, endAt, searchString, listPrefs.getSortElement(), sortType, folderID.intValue(),true);
      }

      Set listkey = emailList.keySet();
      Iterator it = listkey.iterator();
      while (it.hasNext())
      {
        String str = (String)it.next();
        ListElement ele = (ListElement)emailList.get(str);
View Full Code Here


  public void removeLine (int lineID) {
    System.out.println("InvoiceLines:removeLine(int)");

    Set s = this.keySet();
    Iterator itr = s.iterator();
    Vector v = new Vector();
    while (itr.hasNext())
    {
      Object o = itr.next();
      AccountingLineElement ale = (AccountingLineElement) this.get(o);
View Full Code Here

  }//removeLiine(int)

  public void removeLine (int[] lineID) {
    System.out.println("InvoiceLines:removeLine(int[])");

      Set s = this.keySet();
    Iterator itr = s.iterator();

    while (itr.hasNext())
    {
      AccountingLineElement ale = (AccountingLineElement) this.get(itr.next());
      int currid = ale.getElementId();
View Full Code Here

      }
      else{
          rulesList = (RuleList)lg.getRuleList(individualID, accountID.intValue(), startAt, endAt, searchString, listPrefs.getSortElement(),sortType);
    }

      Set keySet = rulesList.keySet();
      Iterator it =  keySet.iterator();
      while (it.hasNext())
      {
        try
        {
          String key = (String)it.next();
View Full Code Here

    float subtotal = 0;
    float total = 0;
    float shipping = 0;
    float discount = 0;

    Set s = this.keySet();
    Iterator itr = s.iterator();

    while (itr.hasNext())
    {
      ItemElement ie = (ItemElement)this.get(itr.next());
      ie.calculateLine();
View Full Code Here

      // Setting the Custom Fields..
      String customFields = "";
      TreeMap map = new TreeMap();
      map = CustomFieldData.getCustomField("Ticket", ticketID, dataSource);

      Set set = map.keySet();
      Iterator it = set.iterator();
      while (it.hasNext()) {
        String str = (String) it.next();
        CustomFieldVO field = (CustomFieldVO) map.get(str);
        if (field == null) {
          continue;
        }// end if (field == null)

        String fieldType = field.getFieldType();
        String fieldValue = field.getValue();
        String fieldLabel = field.getLabel();

        if (fieldValue == null) {
          fieldValue = "";
        }// end of if (fieldValue == null)
        if (fieldType == null) {
          fieldType = "SCALAR";
        }// end of if (fieldType == null)

        if (fieldType.equals("SCALAR")) {
          customFields += "<TR>\n";
          customFields += "<TD class=\"popupTableText\">" + fieldLabel + "</TD>";
          customFields += "<TD class=\"popupTableText\">" + fieldValue + "</TD>";
          customFields += "</TR>";
        }// end of if (fieldType.equals("SCALAR"))
        else {
          fieldValue = fieldValue.trim();
          if (fieldValue.equals("")) {
            customFields += "<TR>\n";
            customFields += "<TD class=\"popupTableText\">" + fieldLabel + "</TD>";
            customFields += "<TD class=\"popupTableText\">" + fieldValue + "</TD>";
            customFields += "</TR>";
            fieldValue = "0";
          }// end of if(fieldValue.equals(""))

          Vector vec = field.getOptionValues();
          if (vec != null) {
            for (int j = 0; j < vec.size(); j++) {
              DDNameValue ddName = (DDNameValue) vec.get(j);
              int compId = Integer.parseInt(fieldValue);
              if (ddName.getId() == compId) {
                customFields += "<TR>\n";
                customFields += "<TD class=\"popupTableText\">" + fieldLabel + "</TD>";
                customFields += "<TD class=\"popupTableText\">" + ddName.getName() + "</TD>";
                customFields += "</TR>";
              }
            }
          } // end if (vec != null)
        } // end if (fieldType.equals("SCALAR"))
      } // end while (it.hasNext())

      // Setting the Values in the Values Map
      TreeMap Values = new TreeMap();
      Values.put("--TicketNumber--", new Integer(tVO.getId()).toString());

      GlobalMasterLists gml = GlobalMasterLists.getGlobalMasterLists(dataSource);
      Vector statusVec = gml.getAllStatus();
      if (statusVec != null) {
        for (int j = 0; j < statusVec.size(); j++) {
          DDNameValue ddName = (DDNameValue) statusVec.get(j);
          int compId = tVO.getStatusId();
          if (ddName.getId() == compId) {
            Values.put("--Status--", ddName.getName());
          }
        }
      } // end if (vec != null)

      Vector priorityVec = gml.getAllPriorities();
      if (priorityVec != null) {
        for (int j = 0; j < priorityVec.size(); j++) {
          DDNameValue ddName = (DDNameValue) priorityVec.get(j);
          int compId = tVO.getPriorityId();
          if (ddName.getId() == compId) {

            Values.put("--Priority--", ddName.getName());
          }
        }
      } // end if (priorityVec != null)

      Values.put("--Subject--", tVO.getTitle());
      String detail = tVO.getDetail();
      detail = detail.replaceAll("\n", "<br>");
      Values.put("--Details--", detail);
      Values.put("--Contact--", tVO.getRefIndividualName());
      Values.put("--Manager--", tVO.getManagerName());
      Values.put("--AssignedTo--", tVO.getAssignedToName());

      SupportFacadeHome supFacade = (SupportFacadeHome) CVUtility.getHomeObject(
          "com.centraview.support.supportfacade.SupportFacadeHome", "SupportFacade");
      SupportFacade remote = supFacade.create();
      remote.setDataSource(dataSource);

      ThreadList threadList = remote.getThreadList(individualID, tVO.getId());
      String threadValues = this.setLinksfunction(threadList);

      EntityVO entityVO = tVO.getEntityVO();
      if (entityVO != null) {
        String entityName = entityVO.getName();
        Values.put("--Name--", entityName);
        AddressVO primaryAdd = entityVO.getPrimaryAddress();
        String address = "";
        if (primaryAdd != null) {
          if (primaryAdd.getStreet1() != null && !primaryAdd.getStreet1().equals("")) {
            address += primaryAdd.getStreet1();
          }
          if (primaryAdd.getStreet2() != null && !primaryAdd.getStreet2().equals("")) {
            address += ", " + primaryAdd.getStreet2() + "\n";
          } else {
            address += "\n";
          }
          if (primaryAdd.getCity() != null && !primaryAdd.getCity().equals("")) {
            address += primaryAdd.getCity();
          }
          if (primaryAdd.getStateName() != null && !primaryAdd.getStateName().equals("")) {
            address += ", " + primaryAdd.getStateName();
          }
          if (primaryAdd.getZip() != null && !primaryAdd.getZip().equals("")) {
            address += " " + primaryAdd.getZip();
          }
          if (primaryAdd.getCountryName() != null && !primaryAdd.getCountryName().equals("")) {
            address += ", " + primaryAdd.getCountryName();
          }
          address = address.replaceAll("\n", "<br>");
        } // end if (primaryAdd != null)

        Values.put("--Address--", address);
        Collection mocList = entityVO.getMOC();
        Iterator iterator = mocList.iterator();
        String emailAddress = "";
        String phoneNumber = "";
        while (iterator.hasNext()) {
          MethodOfContactVO moc = (MethodOfContactVO) iterator.next();
          if (moc.getMocType() == 1 && moc.getIsPrimary().equalsIgnoreCase("YES")) // this
                                                                                    // is
                                                                                    // for
                                                                                    // email
          {
            emailAddress = moc.getContent();
          } // end of if statement (moc.getMocType() == 1)
          else if (moc.getMocType() == 4) {
            phoneNumber = moc.getContent();
          } // end of else statement (moc.getMocType() == 1)
        }// end of while
        Values.put("--Email--", emailAddress);
        Values.put("--Phone--", phoneNumber);

      }

      PrintTemplateHome PTHome = (PrintTemplateHome) CVUtility.getHomeObject(
          "com.centraview.printtemplate.PrintTemplateHome", "Printtemplate");
      PrintTemplate PTRemote = PTHome.create();
      PTRemote.setDataSource(dataSource);

      PrintTemplateVO ptVO = PTRemote.getPrintTemplate(3);

      String ticketTemplate = ptVO.getPtData();

      Set listkey = Values.keySet();
      Iterator it1 = listkey.iterator();
      while (it1.hasNext()) {
        String str = (String) it1.next();
        String valueString = (String) Values.get(str);
        try {
          ticketTemplate = ticketTemplate.replaceAll(str, valueString);
View Full Code Here

    return mapping.findForward(FORWARD_final);
  }

  public String setLinksfunction(ThreadList DL) {
    String ThreadListValues = "";
    Set listkey = DL.keySet();
    Iterator it = listkey.iterator();
    int i = 0;
    if (!it.hasNext()) {
      ThreadListValues += "<tr class=\"rowOdd\"  height=\"20\">\n";
      ThreadListValues += "<td class=\"rowOdd\" colspan=\"5\" align=\"center\">No Selected Threads.</td>\n";
      ThreadListValues += "</tr>\n";
View Full Code Here

    This function sets links on members
  */
  public EventList setLinksfunction(EventList DL)
  {
    //code to set the url for required cols
    Set listkey = DL.keySet();
    Iterator it = listkey.iterator();

    while (it.hasNext())
    {
      try
      {
View Full Code Here


  public GLAccountList setLinksfunction( GLAccountList DL )
  {

    Set listkey = DL.keySet();
    Iterator it =  listkey.iterator();
    while( it.hasNext() )
    {
      try
      {
        String str = ( String )it.next();
View Full Code Here

TOP

Related Classes of java.util.Set

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.