Package com.centraview.common

Examples of com.centraview.common.ListGenerator


   * AttendeeList
   */
  private AttendeeList(int individualID, String listType, int dbID, String dataSource)
      throws CommunicationException, NamingException {
    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();
View Full Code Here


    catch( Exception e )
    {
      displaylist = null;
    }

    ListGenerator lg = ListGenerator.getListGenerator(dataSource);//get the List Generator object for Listing
    ExpenseList DL = null ;

    if( displaylist == null  )
    {
      int records = listpreference.getRecordsPerPage();//gets the initial record per page to be displayed from listPreference
      String sortelement = listpreference.getSortElement();//gets the initial sort element from listPreference
      DL = (ExpenseList)lg.getExpenseList( individualID , 1, records , "" ,sortelement);//called when the request for the list is for first time
      DL = setLinksfunction( DL );
    }
    else
    {
      String searchSession = displaylistSession.getSearchString();
      String searchrequest = displaylist.getSearchString();
      if(searchSession == null)
        searchSession = "";
      if(searchrequest == null)
        searchrequest = "";

      if (((displaylistSession.getListID() == displaylist.getListID() )  &&
          ( displaylist.getDirtyFlag() == false ) &&
          ( displaylist.getStartAT() >= displaylistSession.getBeginIndex() ) &&
          ( displaylist.getEndAT()<=displaylistSession.getEndIndex() ) &&
          (displaylist.getSortMember().equals(displaylistSession.getSortMember() ) ) &&
          (displaylist.getSortType()==(displaylistSession.getSortType()) &&
          (searchSession.equals(searchrequest))  ) ) ||
          displaylist.getAdvanceSearchFlag() == true)
      {
        DL = (ExpenseList) displaylistSession;
      }
      else
      {
        DL = ( ExpenseList )lg.getExpenseList( individualID , displaylist );
      }// end of else
      DL = setLinksfunction( DL );
    }

    session.setAttribute( "displaylist" , DL );
View Full Code Here

      if (userobject != null)
      {
        indvID = userobject.getIndividualID();
      }

      ListGenerator lg = ListGenerator.getListGenerator(dataSource);
      lg.makeListDirty("Entity");
      lg.makeListDirty("Individual");

      RandomAccessFile ral = new RandomAccessFile(new File(dyn.getFilePath()), "r");

      String readline = "";
      int i = 0;
View Full Code Here

    }



    FAQList DL = null ;
    ListGenerator lg = ListGenerator.getListGenerator(dataSource);

    if( displaylist == null  ) {
      int records = listpreference.getRecordsPerPage();//gets the initial record per page to be displayed from listPreference
      String sortelement = listpreference.getSortElement();//gets the initial sort element from listPreference
      DL = (FAQList )lg.getFAQList( individualID , 1, records , "" ,sortelement);//called when the request for the list is for first time
      DL = setLinksfunction( DL );
    }
    else //if(displaylistSession !=null)
    {
      String searchSession = displaylistSession.getSearchString();
      String searchrequest = displaylist.getSearchString();

      if(searchSession == null)
        searchSession = "";
      if(searchrequest == null)
        searchrequest = "";

      if (((displaylistSession.getListID() == displaylist.getListID() )
          && ( displaylist.getDirtyFlag() == false )
          && ( displaylist.getStartAT() >= displaylistSession.getBeginIndex() )
          && ( displaylist.getEndAT()<=displaylistSession.getEndIndex() )
          && (displaylist.getSortMember().equals(displaylistSession.getSortMember() ) )
          && (displaylist.getSortType()==(displaylistSession.getSortType())
          && (searchSession.equals(searchrequest))))
          || displaylist.getAdvanceSearchFlag() == true)
      {
        DL = (FAQList) displaylistSession;
      }else {
        DL = ( FAQList )lg.getFAQList( individualID , displaylist );
      }
      DL = setLinksfunction( DL );
    }
    session.setAttribute( "displaylist" , DL );
    request.setAttribute("displaylist" , DL );
View Full Code Here

      }

      ThreadList threadList = remote.getThreadList(individualId, tVO.getId());
      threadList = setLinksfunction(threadList);

      ListGenerator lg1 = ListGenerator.getListGenerator(dataSource);
      HashMap hmDispLists = lg1.getDisplayLists();

      if (hmDispLists != null) {
        hmDispLists.put(new Long(threadList.getListID()), threadList);
      }

      Vector timeSlipColumns = new Vector();

      timeSlipColumns.addElement("Description");
      timeSlipColumns.addElement("Duration");
      timeSlipColumns.addElement("CreatedBy");
      timeSlipColumns.addElement("Date");
      timeSlipColumns.addElement("StartTime");
      timeSlipColumns.addElement("EndTime");

      TimeSlipList timesliplist = new TimeSlipList();

      ListGenerator lg = ListGenerator.getListGenerator(dataSource); //get the List Generator object for Listing

      String searchTimeSlipString =
        "ADVANCE:select ts.TimeSlipID, ts.Description, ts.CreatedBy, individual.FirstName,"
          + "individual.LastName, ts.BreakTime, ts.Date, ts.Start, ts.End "
          + "from timeslip  ts left outer join individual on "
          + "ts.CreatedBy = individual.IndividualID where ts.ticketid="
          + ticketId;

      timesliplist = (TimeSlipList)lg.getTimeSlipList(individualId, 1, 200, searchTimeSlipString, "Description");
      timesliplist = setTimeSlipLinks(timesliplist, ticketId);

      Vector expenseColumns = new Vector();

      expenseColumns.addElement("Reference");
      expenseColumns.addElement("Amount");
      expenseColumns.addElement("Created");
      expenseColumns.addElement("Creator");

      ExpenseList expenselist = new ExpenseList();

      String searchExpenseString =
        "ADVANCE:select expense.ExpenseID,expense.Amount,expense.Created,entity.name as Reference ,expense.Status, concat(individual.firstname,' ',individual.lastname) as Creator,individual.IndividualID "
          + "from expense left outer join individual on expense.creator = individual.individualid left outer join entity on expense.entityid = entity.entityid "
          + " where expense.linestatus != 'deleted'  and expense.ticket="
          + ticketId
          + " group by expense.ExpenseID,expense.Amount,expense.Created,Reference ,expense.Status, Creator";

      expenselist = (ExpenseList)lg.getExpenseList(individualId, 1, 200, searchExpenseString, "Reference"); //called when the request for the list is for first time
      expenselist = setExpenseLinks(expenselist, ticketId);

      request.setAttribute("closeDate", tVO.getCloseDate());
      request.setAttribute("openDate", tVO.getCreatedOn());
      request.setAttribute("modifyDate", tVO.getModifiedOn());
View Full Code Here

          request.setAttribute("displaylist" , displaylistSession );
         }else
         {

          ListGenerator lg = ListGenerator.getListGenerator(dataSource);

          //System.out.println( displaylist );
          DL = ( NoteList )lg.getNoteList( individualID , displaylist );

          request.setAttribute(NoteConstantKeys.TYPEOFNOTE,DL.getNoteType());


          DL = setLinksfunction( DL );
View Full Code Here

        DL = ( PromotionList )displaylistSession;
        request.setAttribute("displaylist" , displaylistSession );
       }else
       {
   
        ListGenerator lg = ListGenerator.getListGenerator(dataSource);
        DL = ( PromotionList )lg.getPromotionList( individualId , displaylist );
       }
    }
   
   
    //code to set the url for required cols
View Full Code Here

          TimeSheetList DL = null;

          if (displaylist == null)
          {
            ListGenerator lg = ListGenerator.getListGenerator(dataSource);
            DL = (TimeSheetList) lg.getTimeSheetList(userobjectd.getIndividualID(),
            1, listpreference.getRecordsPerPage(), "", listpreference.getSortElement());
          }
          else
          {
            DL = (TimeSheetList) displaylistSession;
          }

          request.setAttribute("HrExpenseForm", form);
          session.setAttribute("HrExpenseForm", form);

          session.setAttribute("displaylist", DL);
          session.setAttribute("timesheetvo", timeSheetVO);
          request.setAttribute("displaylist", DL);
          request.setAttribute("list", "TimeSheet");
          request.setAttribute(HrConstantKeys.TYPEOFSUBMODULE, HrConstantKeys.TIMESHEET);

          returnStatus = ".view.hr.timesheet.edit";
        }
        else if ((saveandclose != null) &&
           saveandclose.equalsIgnoreCase("Save & Close"))
        {
          TimeSheetVOX timeSheetVOX = new TimeSheetVOX(userobjectd,
          dynaValidatorForm);
          TimeSheetVO timeSheetVO = timeSheetVOX.getTimeSheetVO();

          String addslipflag = (String) session.getAttribute("addslip");

          //Condition that instructs that the NewSlip button is clicked  and the timesheet is already added to the database
          if (addslipflag == null)
          {
            saveForm();
          }
          else
          {
            session.setAttribute("addslip", null);
          }

          ListPreference listpreference = userobjectd.getListPreference("TimeSheet");
          DisplayList displaylistSession = (DisplayList) session.getAttribute("displaylist");

          DisplayList displaylist = (DisplayList) request.getAttribute("displaylist");

          TimeSheetList DL = null;

          if (displaylist == null)
          {
            ListGenerator lg = ListGenerator.getListGenerator(dataSource);
            DL = (TimeSheetList) lg.getTimeSheetList(userobjectd.getIndividualID(),
            1, listpreference.getRecordsPerPage(), "", listpreference.getSortElement());
          }
          else
          {
            DL = (TimeSheetList) displaylistSession;
View Full Code Here

        categoryID = formCategoryID.intValue();
      }

      ListPreference listPrefs = userObject.getListPreference("Knowledgebase");

      ListGenerator lg = ListGenerator.getListGenerator(dataSource);
      int records = listPrefs.getRecordsPerPage();
      String sortElement = listPrefs.getSortElement();
      boolean customerViewFlag = true;
      KnowledgebaseList kbList = (KnowledgebaseList)lg.getKnowledgebaseList(individualID, 1, records, "", sortElement, categoryID,customerViewFlag);

      Set listkey = kbList.keySet();
      Iterator iter = listkey.iterator();
      while (iter.hasNext())
      {
View Full Code Here

          DL = ( FileList )displaylistSession;
          request.setAttribute(FileConstantKeys.TYPEOFFILELIST,displaylist.getFileTypeRequest());

         }else
         {
          ListGenerator lg = ListGenerator.getListGenerator(dataSource);
          DL = ( FileList )lg.getFileList( individualID ,displaylistSession.getCurrentFolderID(), displaylist );
          request.setAttribute(FileConstantKeys.TYPEOFFILELIST,DL.getFileTypeRequest());
          DL.setCurrentFolderID(DL.getCurrentFolderID());
         }
         DL = setLinksfunction( DL );
          session.setAttribute( "displaylist" , DL );
View Full Code Here

TOP

Related Classes of com.centraview.common.ListGenerator

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.