Package java.util

Examples of java.util.Collection


      SyncFacadeHome syncHome = (SyncFacadeHome)CVUtility.getHomeObject("com.centraview.syncfacade.SyncFacadeHome", "SyncFacade");
      com.centraview.syncfacade.SyncFacade sfremote = (com.centraview.syncfacade.SyncFacade)syncHome.create();
      sfremote.setDataSource(dataSource);

      // get the list of individuals from the ejb layer
      Collection individualList = sfremote.getIndividualList(individualIDsession);

      ModuleFieldRightMatrix rightsMatrix = userObject.getUserPref().getModuleAuthorizationMatrix();
      HashMap indivFieldRights = rightsMatrix.getFieldRights("Individual");
      HashMap entityFieldRights = rightsMatrix.getFieldRights("Entity");

      // individualList shouldn't be null. If it is, there's a problem.
      // SyncFacadeEJB should always return a valid collection (an
      // empty Collection is still a valid Collection, but null is not).
      if (individualList != null)
      {
        // print the header row. Do it even if there are no individuals in the list
        writer.print("ContactID\tlastModified\tcompanyName\tfirstName\tMI\tlastName\ttitle\t");
        writer.print("street1\tstreet2\tcity\tstate\tzipCode\tcountry\t");
        writer.print("email\tworkPhone\thomePhone\tfaxPhone\totherPhone\tmainPhone\t");
        writer.print("pagerPhone\tmobilePhone\tworkPhoneExt\thomePhoneExt\tfaxPhoneExt\t");
        writer.print("otherPhoneExt\tmainPhoneExt\tpagerPhoneExt\tmobilePhoneExt\tnotes\n");

        // we successfully got the IndividualList, let's process it :-)
        if (individualList.size() > 0)
        {
          Iterator it = individualList.iterator();
         
          while (it.hasNext())
          {
            HashMap individualDetails = (HashMap)it.next();
View Full Code Here


      AuthorizationLocal local = home.create();
      local.setDataSource(dataSource);

      hm = local.getNoneRightFieldMethod(moduleName, individualId);
      if (hm != null) {
        Collection col = hm.values();
        Iterator it = col.iterator();

        Class clDB = objDBVO.getClass();
        Class clUI = objUIVO.getClass();

        String get = "get";
View Full Code Here

    EntityVO entityVO = ticketVO.getEntityVO();
    if (entityVO != null)
    {
    String entityName = entityVO.getName();
    ticketForm.setEntityname(entityName);
    Collection mocList = entityVO.getMOC();
    Iterator iterator = mocList.iterator();
    while (iterator.hasNext())
    {
      MethodOfContactVO moc  = (MethodOfContactVO) iterator.next();
      if (moc.getMocType() == 1 && moc.getIsPrimary().equalsIgnoreCase("YES")) // this is for email
      {
View Full Code Here

      Vector stateList = (Vector)gml.get("States");
      profileForm.set("state", primaryAddress.getStateName());
      Vector countryList = (Vector)gml.get("Country");
      profileForm.set("country", primaryAddress.getCountryName());
     
      Collection mocList = entityVO.getMOC();
      Iterator iterator = mocList.iterator();
      int count = 1;
      while (iterator.hasNext()) {
        MethodOfContactVO moc = (MethodOfContactVO)iterator.next();
        if (moc.getMocType() == 1 && moc.getIsPrimary().equalsIgnoreCase("YES")) {
          // this is for email
View Full Code Here

          newEventHashMap.put("Attachment", newAttachments);

          newEventID = remote.addEvent(newEventHashMap, individualId);
        } //end of if statement (eventDetails != null)

        Collection oldEventAttendees = remote.getAttendeesForEvent(individualId, eventID);
        if (oldEventAttendees != null)
        {
          HashMap map = new HashMap();
          Iterator iterator = oldEventAttendees.iterator();
          String[] individualIDs = new String[oldEventAttendees.size()];

          map.put("EventId", Integer.toString(newEventID));
          map.put("Accepted", "NO");
          int i = 0;
View Full Code Here

          if (primaryAdd.getWebsite() != null) {
            dynaForm.setWebsite(primaryAdd.getWebsite());
          }
        }
       
        Collection mocList = entityVO.getMOC();
        Iterator iterator = mocList.iterator();
       
        while (iterator.hasNext()) {
          MethodOfContactVO moc = (MethodOfContactVO)iterator.next();
          if (moc.getMocType() == 1 && moc.getIsPrimary().equalsIgnoreCase("YES")) {
            dynaForm.setEmail(moc.getContent());
View Full Code Here

          dynaForm.set("street2", strValue);
        else if (strhead.equals("city"))
          dynaForm.set("city", strValue);
        else if (strhead.equals("state"))
        {
          Collection stateCol = (Collection)gml.get("States");

          Iterator stateIter = stateCol.iterator();
          while (stateIter.hasNext())
          {
            DDNameValue ddname = (DDNameValue)stateIter.next();

            if ((ddname.getName()).equals(strValue))
            {
              dynaForm.set("state", (new Integer(ddname.getId())).toString());
              break;
            }
          }
        } else if (strhead.equals("zip"))
          dynaForm.set("zip", strValue);
        else if (strhead.equals("country"))
        {
          Collection countryCol = (Collection)gml.get("Country");

          Iterator stateIter = countryCol.iterator();
          while (stateIter.hasNext())
          {
            DDNameValue ddname = (DDNameValue)stateIter.next();

            if ((ddname.getName()).equals(strValue))
              dynaForm.set("country", (new Integer(ddname.getId())).toString());

          }
        } else if (strhead.equals("title"))
          dynaForm.set("title", strValue);
        else if (strhead.equals("source"))
          dynaForm.set("source", strValue);
        else if (strhead.equals("firstname"))
          dynaForm.set("firstname", strValue);
        else if (strhead.equals("lastname"))
          dynaForm.set("lastname", strValue);
        else if (strhead.equals("middlename"))
          dynaForm.set("middlename", strValue);
        else if (strhead.equals("entity"))
          dynaForm.set("entity", strValue);
        else if (strhead.equals("entity1"))
          dynaForm.set("entity1", strValue);
        else if (strhead.equals("Fax"))
        {
          Collection mocFax = (Collection)gml.get("MOC");

          Iterator mocFaxIter = mocFax.iterator();
          while (mocFaxIter.hasNext())
          {
            DDNameValue ddnameFax = (DDNameValue)mocFaxIter.next();

            if ((ddnameFax.getName()).equals(strhead))
            {
              dynaForm.set("mocType1", (new Integer(ddnameFax.getId())).toString());
              dynaForm.set("moc1", strValue);
            }
          }

        } else if (strhead.equals("Phone")) {
          Collection mocPhone = (Collection)gml.get("MOC");

          Iterator mocPhoneIter = mocPhone.iterator();
          while (mocPhoneIter.hasNext())
          {
            DDNameValue ddnamePhone = (DDNameValue)mocPhoneIter.next();

            if ((ddnamePhone.getName()).equals(strhead))
            {
              dynaForm.set("mocType2", (new Integer(ddnamePhone.getId())).toString());
              dynaForm.set("moc2", strValue);
            }
          }
        } else if (strhead.equals("Mobile"))
        {
          Collection mocMobile = (Collection)gml.get("MOC");

          Iterator mocMobileIter = mocMobile.iterator();
          while (mocMobileIter.hasNext())
          {
            DDNameValue ddnameMobile = (DDNameValue)mocMobileIter.next();

            if ((ddnameMobile.getName()).equals(strhead))
View Full Code Here


  // toString() now prints out the keys also.
  public String toString()
  {
    Collection keys = this.keySet();
    StringBuffer toReturn = new StringBuffer();

    for (Iterator i = keys.iterator(); i.hasNext();)
    {
      String key = (String)i.next();
      toReturn.append(key+": ");
      toReturn.append(this.get(key));
      toReturn.append("\n");
View Full Code Here

      // fetch the alerts from DB
      AlertHome ah = (AlertHome) CVUtility.getHomeObject("com.centraview.alert.AlertHome", "Alert");
      Alert remote = ah.create();
      remote.setDataSource(dataSource);
      Collection rs = remote.getAlertList(hmConf);

      if (rs != null) {
        Iterator it = rs.iterator();

        String Title = "";
        String AlertType = "";
        alertsArl.clear();
View Full Code Here

              if (primaryAdd.getWebsite() != null) {
                ticketForm.setWebsite(primaryAdd.getWebsite());
              }
            }
           
            Collection mocList = entityVO.getMOC();
            Iterator iterator = mocList.iterator();
            while (iterator.hasNext()) {
              MethodOfContactVO moc  = (MethodOfContactVO) iterator.next();
              if (moc.getMocType() == 1 && moc.getIsPrimary().equalsIgnoreCase("YES")) {
                ticketForm.setEmail(moc.getContent());
              } else if (moc.getMocType() == 4) {
View Full Code Here

TOP

Related Classes of java.util.Collection

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.