Package com.centraview.account.item

Examples of com.centraview.account.item.ItemList


      /*ADD item*/
      else if ( typeOfOperation != null && typeOfOperation.equals("ADDITEM") )
      {

        String newItemID = request.getParameter("theitemid");
        ItemList IL = null ;
        ListGenerator lg = ListGenerator.getListGenerator(dataSource);//get the List Generator object for Listing
        IL = (ItemList )lg.getItemList( individualID , 1, 10 , "" , "ItemID");//called when the request for the list is for first time

        StringTokenizer st;
        String token, nextItr;

        if (newItemID != null)
        {
          st = new StringTokenizer(newItemID, ",");
          itemLines = ((PurchaseOrderForm)form).getItemLines();

          if(itemLines == null)
          itemLines = new ItemLines();
          int counter = itemLines.size();
          while (st.hasMoreTokens())
          {
            token   = (String)st.nextToken();
            int intToken = Integer.parseInt(token);

            Iterator itr = IL.keySet().iterator();
            while (itr.hasNext())
            {
              nextItr = (String)itr.next();
              ListElement ile = (ListElement)IL.get(nextItr);
              IntMember smid = (IntMember)ile.get("ItemID");
              Integer listItemid = (Integer)smid.getMemberValue();
              if ( listItemid.intValue() == intToken )
              {
                StringMember smName = (StringMember)ile.get("Name"); // name = description
View Full Code Here


        request.setAttribute("ItemLines",itemLines);
      }
     
      if (typeOfOperation != null && typeOfOperation.equals("ADDITEM")) {
        String newItemID = request.getParameter("theitemid");
        ItemList IL = null;
        ListGenerator lg = ListGenerator.getListGenerator(dataSource);
        IL = (ItemList)lg.getItemList(individualID, 1, 10, "", "ItemID");
       
        OrderForm orderForm = (OrderForm)form;
        orderForm.convertArrayToItemLines();
        orderForm.convertFormbeanToValueObject("edit");
       
        StringTokenizer st;
        String token, nextItr;
       
        if (newItemID != null) {
          st = new StringTokenizer(newItemID, ",");
          ItemLines itemLines = (orderForm).getItemLines();
          Integer intJurisdictionID = (orderForm).getJurisdictionID();
          int jurisdictionID = intJurisdictionID.intValue();
         
          if (itemLines == null) {
            itemLines = new ItemLines();
          }
          int counter = itemLines.size();
         
          while (st.hasMoreTokens()) {
            token = (String)st.nextToken();
            int intToken = Integer.parseInt(token);
           
            Iterator itr = IL.keySet().iterator();
            while (itr.hasNext()) {
              nextItr = (String)itr.next();
              ListElement ile = (ListElement)IL.get(nextItr);
              IntMember smid = (IntMember)ile.get("ItemID");
              Integer listItemid = (Integer)smid.getMemberValue();
             
              if (listItemid.intValue() == intToken) {
                StringMember smName = (StringMember)ile.get("Name"); // name = description
View Full Code Here

      }// end of if(typeOfOperation != null &&  typeOfOperation.equals("REMOVEITEM") )
      /*  ADD item  */
      else if(typeOfOperation != null && typeOfOperation.equals("ADDITEM") )
      {
        String newItemID = request.getParameter("theitemid");
        ItemList IL = null ;
        ListGenerator lg = ListGenerator.getListGenerator(dataSource);//get the List Generator object for Listing
        IL = (ItemList )lg.getItemList( individualID , 1, 10 , "" , "ItemID");//called when the request for the list is for first time

        StringTokenizer st;
        String token, nextItr;

        if (newItemID != null)
        {
          st = new StringTokenizer(newItemID, ",");
          itemLines = (expenseForm).getItemLines();

          if(itemLines == null)
            itemLines = new ItemLines();
          int counter = itemLines.size();
          while (st.hasMoreTokens())
          {
            token   = (String)st.nextToken();
            int intToken = Integer.parseInt(token);
            Iterator itr = IL.keySet().iterator();
            while (itr.hasNext())
            {
              nextItr = (String)itr.next();
              ListElement ile = (ListElement)IL.get(nextItr);
              IntMember smid = (IntMember)ile.get("ItemID");
              Integer listItemid = (Integer)smid.getMemberValue();

              if ( listItemid.intValue() == intToken )
              {
View Full Code Here

        }
       
        ((OrderForm)form).setItemLines(itemLines);
      } else if (typeOfOperation != null && typeOfOperation.equals("ADDITEM")) {
        String newItemID = request.getParameter("theitemid");
        ItemList IL = null;
        ListGenerator lg = ListGenerator.getListGenerator(dataSource);      // get the List Generator object for Listing
        IL = (ItemList)lg.getItemList(individualID, 1, 10, "", "ItemID");   // called when the request for the list is for first time
       
        orderForm.convertArrayToItemLines();
        orderForm.convertFormbeanToValueObject("add");
       
        StringTokenizer st;
        String token, nextItr;
        if (newItemID != null) {
          st = new StringTokenizer(newItemID, ",");
          itemLines = (orderForm).getItemLines();
         
          if (itemLines == null) {
            itemLines = new ItemLines();
          }
          int counter = itemLines.size();
          while (st.hasMoreTokens()) {
            token = (String)st.nextToken();
            int intToken = Integer.parseInt(token);
           
            Iterator itr = IL.keySet().iterator();
            while (itr.hasNext()) {
              nextItr = (String)itr.next();
              ListElement ile = (ListElement)IL.get(nextItr);
              IntMember smid = (IntMember)ile.get("ItemID");
              Integer listItemid = (Integer)smid.getMemberValue();
             
              if (listItemid.intValue() == intToken) {
                StringMember smName = (StringMember)ile.get("Name"); // name = description
View Full Code Here

      }// end of if(typeOfOperation != null &&  typeOfOperation.equals("REMOVEITEM") )
      /*  ADD item  */
      else if(typeOfOperation != null && typeOfOperation.equals("ADDITEM") )
      {
        String newItemID = request.getParameter("theitemid");
        ItemList IL = null ;
        ListGenerator lg = ListGenerator.getListGenerator(dataSource);//get the List Generator object for Listing
        IL = (ItemList )lg.getItemList( individualID , 1, 10 , "" , "ItemID");//called when the request for the list is for first time

        StringTokenizer st;
        String token, nextItr;
        if (newItemID != null)
        {
          st = new StringTokenizer(newItemID, ",");
          itemLines = (expenseForm).getItemLines();

          if(itemLines == null)
            itemLines = new ItemLines();
          int counter = itemLines.size();
          while (st.hasMoreTokens())
          {
            token   = (String)st.nextToken();
            int intToken = Integer.parseInt(token);

            Iterator itr = IL.keySet().iterator();
            while (itr.hasNext())
            {
              nextItr = (String)itr.next();
              ListElement ile = (ListElement)IL.get(nextItr);
              IntMember smid = (IntMember)ile.get("ItemID");
              Integer listItemid = (Integer)smid.getMemberValue();

              if ( listItemid.intValue() == intToken )
              {
View Full Code Here

      // added by Sandie for handling custom field values
      request.setAttribute("CustomFieldVector",customFieldVec);
      // added by Sandie - end
      String newItemID = request.getParameter("theitemid");

      ItemList IL = null ;

      ListGenerator lg = ListGenerator.getListGenerator(dataSource);//get the List Generator object for Listing
      IL = (ItemList )lg.getItemList(individualId , 1, 10 , "" , "ItemID");//called when the request for the list is for first time


      StringTokenizer st;
      String token, nextItr;
      Iterator itr = IL.keySet().iterator();

      if (newItemID != null)
      {
        st = new StringTokenizer(newItemID, ",");
        itemLines = ((PromotionDetailListForm)form).getItemLines();
        if(itemLines == null)
          itemLines = new ItemLines();
        counter = itemLines.size();
        while (st.hasMoreTokens())
        {
          token   = (String)st.nextToken();
          int intToken = Integer.parseInt(token);

          while (itr.hasNext())
          {
            nextItr = (String)itr.next();
            ListElement ile = (ListElement)IL.get(nextItr);
            IntMember smid = (IntMember)ile.get("ItemID");
            Integer listItemid = (Integer)smid.getMemberValue();

            if ( listItemid.intValue() == intToken )
            {
View Full Code Here

        {
          hrExpenseLines = hrexpenseForm.getItemLines(); //(HrExpenseLines)session.getAttribute("hrExpenseLines");
        }

        String newItemID = request.getParameter("theitemid");
        ItemList IL = null; //see if u need to write something different.

        ListGenerator lg = ListGenerator.getListGenerator(dataSource); //get the List Generator object for Listing
        //IL = (ItemList )lg.getItemList( 1 , 1, 10 , "" , "ItemID");//called when the request for the list is for first time
        IL = (ItemList)lg.getItemList(individualID, 1, 10, "", "ItemID"); //called when the request for the list is for first time
        StringTokenizer st;
        String token, nextItr;
        if (newItemID != null)
        {
          st = new StringTokenizer(newItemID, ",");
          counter = hrExpenseLines.size();

          while (st.hasMoreTokens())
          {
            token = (String)st.nextToken();
            int intToken = Integer.parseInt(token);
            Iterator itr = IL.keySet().iterator();
            while (itr.hasNext())
            {
              nextItr = (String)itr.next();
              ListElement ile = (ListElement)IL.get(nextItr);
              IntMember smid = (IntMember)ile.get("ItemID");
              Integer listItemid = (Integer)smid.getMemberValue();

              if (listItemid.intValue() == intToken)
              {
View Full Code Here

   */
  public ItemList getItemList(int individualID, int startATparam, int EndAtparam,
      String searchString, String sortColumn)
  {
    if ((searchString != null) && ((searchString.trim()).length() > 0)) {
      ItemList dl = new ItemList();
      dl.setStartAT(startATparam);
      dl.setEndAT(EndAtparam);
      dl.setSortMember(sortColumn);
      dl.setSortType('A');
      dl.setSearchString(searchString);
      dl.setListType("Item");

      long currentListID = this.getNextListID();
      dl.setListID(currentListID);

      displayLists.put(new Long(currentListID), dl);

      return this.getItemList(individualID, dl);

    } else {
      ItemList returnDL = null;
      try {
        HashMap hm = new HashMap();
        hm.put("startATparam", new Integer(startATparam));
        hm.put("EndAtparam", new Integer(EndAtparam));
        hm.put("searchString", searchString);
        hm.put("sortmem", sortColumn);
        hm.put("sortType", new Character('A'));

        try {
          AccountListHome aa = (AccountListHome)CVUtility.getHomeObject(
              "com.centraview.account.accountlist.AccountListHome", "AccountList");
          AccountList remote = (AccountList)aa.create();
          remote.setDataSource(this.dataSource);
          returnDL = remote.getItemList(individualID, hm);
        } catch (Exception e) {
          System.out.println("[Exception] ListGenerator.getItemList: " + e.toString());
          // e.printStackTrace();
        }

        returnDL.setListType("Item");
        returnDL.setTotalNoOfRecords(returnDL.size());

        long currentListID = this.getNextListID();
        returnDL.setListID(currentListID);
        returnDL.setStartAT(startATparam);
        returnDL.setEndAT(EndAtparam);

        ItemList emptyDL = createEmptyObject(returnDL);
        emptyDL.setTotalNoOfRecords(returnDL.getTotalNoOfRecords());
        emptyDL.setListID(currentListID);
        emptyDL.setListType("Item");
        emptyDL.setStartAT(returnDL.getStartAT());
        emptyDL.setEndAT(returnDL.getEndAT());
        displayLists.put(new Long(currentListID), emptyDL);

      } catch (Exception e) {
        e.printStackTrace();
      }
View Full Code Here

   * @param list
   * @return
   */
  public ItemList createEmptyObject(ItemList list)
  {
    ItemList dummy = new ItemList();
    dummy.setListType(list.getListType());
    dummy.setPrimaryMemberType(list.getPrimaryMemberType());
    dummy.setPrimaryTable(list.getPrimaryTable());
    dummy.setSortMember(list.getSortMember());
    dummy.setSortType(list.getSortType());
    dummy.setPrimaryMember(list.getPrimaryMember());
    dummy.setStartAT(list.getStartAT());
    dummy.setEndAT(list.getEndAT());
    dummy.setBeginIndex(0);
    dummy.setEndIndex(0);
    return dummy;
  }// end of createEmptyObject
View Full Code Here

      else if ( request.getParameter(AccountConstantKeys.TYPEOFOPERATION).equals("ADDITEM") )
      {

        String newItemID = request.getParameter("theitemid");

        ItemList IL = null ;

        ListGenerator lg = ListGenerator.getListGenerator(dataSource);//get the List Generator object for Listing
        IL = (ItemList )lg.getItemList( individualID , 1, 10 , "" , "ItemID");//called when the request for the list is for first time


        StringTokenizer st;
        String token, nextItr;
        if (newItemID != null)
        {
          st = new StringTokenizer(newItemID, ",");
          ItemLines itemLines = ((InvoiceForm)form).getItemLines();
          Integer intJurisdictionID = ((InvoiceForm)form).getJurisdictionID();
          int jurisdictionID = intJurisdictionID.intValue();

          if(itemLines == null)
            itemLines = new ItemLines();
          int counter = itemLines.size();
          while (st.hasMoreTokens())
          {
            token   = (String)st.nextToken();
            int intToken = Integer.parseInt(token);

            Iterator itr = IL.keySet().iterator();
            while (itr.hasNext())
            {
              nextItr = (String)itr.next();
              ListElement ile = (ListElement)IL.get(nextItr);
              IntMember smid = (IntMember)ile.get("ItemID");
              Integer listItemid = (Integer)smid.getMemberValue();

              if ( listItemid.intValue() == intToken )
              {
View Full Code Here

TOP

Related Classes of com.centraview.account.item.ItemList

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.