Package com.centraview.common

Examples of com.centraview.common.IndividualList


      // get the records from the database
      Collection sqlResults = cfremote.getEmployeeListCollection(individualId);

      // now create a DisplayList out of those records
      IndividualList employeeList = new IndividualList();

      // ok, now that we have the results from the database,
      // we need to generate a DisplayList object to pass
      // to the List View code (List.jsp)
      Iterator iter = sqlResults.iterator();

      while (iter.hasNext()) {
        HashMap sqlRow = (HashMap)iter.next();

        String individualName = (String)sqlRow.get("Name");
        int individualID = ((Number)sqlRow.get("IndividualID")).intValue();

        IntMember individualIDfield = new IntMember("IndividualID", individualID, 10, "", 'T', false, 10);

        StringMember nameField = new StringMember("Name", individualName, 10, "/centraview/ViewHandler.do?" + Constants.TYPEOFCONTACT + "=" + Constants.INDIVIDUAL + "&rowId=" + individualID, 'T', true);

        if (moduleName.equals(Constants.ACTIVITYMODULE)) {
          if ((vecView != null) && vecView.contains(new Integer(individualID))) {
            colview.add(new DDNameValue("" + individualID, nameField.getDisplayString()));
          } else if ((vecSchedule != null) && vecSchedule.contains(new Integer(individualID))) {
            colschedule.add(new DDNameValue("" + individualID, nameField.getDisplayString()));
          } else if ((vecAll != null) && vecAll.contains(new Integer(individualID))) {
            colAll.add(new DDNameValue("" + individualID, nameField.getDisplayString()));
          }
        } else if (moduleName.equals(Constants.EMAILMODULE)) {
          if ((vecView != null) && vecView.contains(new Integer(individualID))) {
            colview.add(new DDNameValue("" + individualID, nameField.getDisplayString()));
          } else if ((vecSend != null) && vecSend.contains(new Integer(individualID))) {
            colsend.add(new DDNameValue("" + individualID, nameField.getDisplayString()));
          } else if ((vecAll != null&& vecAll.contains(new Integer(individualID))) {
            colAll.add(new DDNameValue("" + individualID, nameField.getDisplayString()));
          }
        }
       
        IndividualListElement ele = new IndividualListElement(individualID);
        ele.put("IndividualID", individualIDfield);
        ele.put("Name", nameField);
       
        employeeList.put(individualName + individualID, ele);
      }

     
      String searchStr = request.getParameter("search");

      if (searchStr != null && (searchStr.trim()).length() > 0) {
        searchStr = searchStr.trim();
        employeeList.setSearchString(searchStr);
        employeeList.search();
      }

      employeeList.setTotalNoOfRecords(employeeList.size());

      request.setAttribute("employeelist", employeeList);
      request.setAttribute("list", "Individual");
      request.setAttribute("typeofmodule", typeofModule);
View Full Code Here


    Vector attendeeList = new Vector();
    ListGenerator lg = ListGenerator.getListGenerator(dataSource);

    if (listType.equals("individual")) {

      IndividualList DL = lg.getIndividualList(individualID, 1, 0, "", "Name", dbID);

      DL.setTotalNoOfRecords(DL.size());
      Set s = DL.keySet();
      Iterator it = s.iterator();
      while (it.hasNext()) {
        String lim = (String)it.next();
        ListElement ile = (ListElement)DL.get(lim);
        StringMember smName = (StringMember)ile.get("Name");
        String name = (String)smName.getMemberValue();
        IntMember smid = (IntMember)ile.get("IndividualID");
        int id = new Integer(smid.getMemberValue().toString()).intValue();
        // attendeeList.addElement(new DDNameValue(id,name));
        attendeeList.addElement(new DDNameValue("" + id + "#" + name, name));
      }
      put("attendee", attendeeList);
    } else if (listType.equals("allindividual")) {
      IndividualList DL = lg.getIndividualList(individualID, 0, 0, "", "Name");
      DL.setTotalNoOfRecords(DL.size());
      Set s = DL.keySet();
      Iterator it = s.iterator();
      while (it.hasNext()) {
        String lim = (String)it.next();
        ListElement ile = (ListElement)DL.get(lim);
        StringMember smName = (StringMember)ile.get("Name");
        String name = (String)smName.getMemberValue();
        IntMember smid = (IntMember)ile.get("IndividualID");
        int id = new Integer(smid.getMemberValue().toString()).intValue();
        // attendeeList.addElement(new DDNameValue(id,name));
View Full Code Here

      // get the records from the database
      Collection sqlResults = cfremote.getUserListCollection(uid);

      // now create a DisplayList out of those records
      IndividualList employeeList = new IndividualList();

      // ok, now that we have the results from the database,
      // we need to generate a DisplayList object to pass
      // to the List View code (List.jsp)
      Iterator iter = sqlResults.iterator();

      while (iter.hasNext()) {
        HashMap sqlRow = (HashMap)iter.next();

        String individualName = (String)sqlRow.get("Name");
        int individualID  = ((Number)sqlRow.get("IndividualID")).intValue();

        IntMember individualIDfield = new IntMember("IndividualID", individualID, 10, "", 'T', false, 10);
        StringMember nameField  = new StringMember("Name", individualName, 10, "/centraview/ViewHandler.do?" + Constants.TYPEOFCONTACT + "=" + Constants.INDIVIDUAL  + "&rowId=" + individualID, 'T', true);

        if (vecview != null && vecview.contains(new Long(individualID))) {
          colview.add(new DDNameValue(""+individualID, nameField.getDisplayString()));
        }else if (vecmodify != null && vecmodify.contains(new Long(individualID))){
          colmodify.add(new DDNameValue(""+individualID, nameField.getDisplayString()));
        }else if (vecdelete != null && vecdelete.contains(new Long(individualID))){
          coldelete.add(new DDNameValue(""+individualID, nameField.getDisplayString()));
        }

        IndividualListElement ele = new IndividualListElement(individualID);
        ele.put("IndividualID", individualIDfield);
        ele.put("Name", nameField);

        employeeList.put(individualName + individualID, ele);
      }   // end while(iter.hasNext())

      request.setAttribute("employeelist", employeeList);

      request.setAttribute("colview", colview);
View Full Code Here

      } //end of else if statement (req.getAttribute("currentPage") != null)


      String searchStr = req.getParameter("search");
      ListGenerator lg = ListGenerator.getListGenerator(dataSource);
      IndividualList DL = ( IndividualList )lg.getIndividualAndEntityEmailList(individualID , 0,0 , "" ,"Name",listID);

      if ((searchStr != null) && ((searchStr.trim()).length() > 0))
      {
        searchStr = "SIMPLE: " + searchStr.trim();
        DL.setSearchString(searchStr);
        DL.search();
      }

      DL.setTotalNoOfRecords(DL.size());
      Set listkey = DL.keySet();
      Iterator it =  listkey.iterator();
      while( it.hasNext() )
      {
        String str = ( String )it.next();
        StringMember sm=null;
        ListElement ele  = ( ListElement )DL.get( str );
        sm = ( StringMember )ele.get("Name" );
        sm = ( StringMember )ele.get("Email" );
      }


      int startingAT = 1;
      int endingAt = recordsPerPage;

      if (currentPage != 1)
      {
        startingAT = currentPage  * recordsPerPage;
        endingAt = startingAT + recordsPerPage;
      }

      DL.setStartAT(startingAT);
      DL.setEndAT(endingAt);
      DL.setRecordsPerPage(recordsPerPage);

      req.setAttribute("emailAddresslookuplist" , DL );
      session.setAttribute("emailAddresslookuplist", DL);
      req.setAttribute("lookupListName", "emailAddresslookuplist");
      req.setAttribute("list" , "EmailAddress" );
View Full Code Here

  /**
   * Returns and IndividualList object (sub-class of DisplayList).
   */
  public IndividualList getAllIndividualList(int userID, HashMap preference)
  {
    IndividualList  individualList = null;

    try
    {
      InitialContext ic = CVUtility.getInitialContext();
      ContactListLocalHome home = (ContactListLocalHome)ic.lookup("local/ContactList");
View Full Code Here

  /**
  * Returns and IndividualList object (sub-class of DisplayList).
  */
  public IndividualList getAllIndividualAndEntityEmailList(int userID, HashMap preference)
  {
    IndividualList  individualList = null;

    try
    {
      InitialContext ic = CVUtility.getInitialContext();
      ContactListLocalHome home = (ContactListLocalHome)ic.lookup("local/ContactList");
View Full Code Here

TOP

Related Classes of com.centraview.common.IndividualList

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.