Package com.melitronic.domain.entity

Examples of com.melitronic.domain.entity.ItemGroup


   
  }

    public ItemGroup store(ItemGroup iteggroup, Product product, EntityManager em, CallContext context) {
      product = (Product)findById(product, em, context);
      ItemGroup last = null;
      boolean isNew = iteggroup.getId() == null;
      if (isNew) {
          Collection<ItemGroup> igs = product.getItemGroup();
          if (igs != null && igs.size() > 0) {
            for (ItemGroup ig : igs) {
              if (ig.getNextId() == null) {
                last = ig;
                break;
              }
            }
          }
      }
      else {
        iteggroup = (ItemGroup)refresh(iteggroup, em, context);
      }
     
      iteggroup.setProduct(product);
      persist(iteggroup, em, context);
     
      if (isNew && last !=null) {
        last.setNextId(iteggroup.getId());
        store(last, product, em, context);
      }
     
      return iteggroup;
    }
View Full Code Here


    sprint.setNextId(entity.getNextId());
    persist(sprint, em, context);
    }

    public void changePositions(ItemGroup entity, EntityManager em, CallContext context) {
      ItemGroup itemGroup = (ItemGroup)PmSprint.instance().findById(entity, em, context);
      itemGroup.setNextId(entity.getNextId());
    persist(itemGroup, em, context);
    }
View Full Code Here

      return resp;
    }
   
    public ItemGroup store(ItemGroup itemgroup, Product product, CallContext context) {
     
      ItemGroup resp = PmItemGroup.instance().store(itemgroup, product, em, context);
     
      return resp;
    }
View Full Code Here

      }
      else {
        product = PmProduct.instance().findProduct(productId, em);
      }
      if (product.getItemGroup().size() == 0) {
      ItemGroup ig = new ItemGroup();
      ig.setName("Itemgroup");
      ig.setProduct(product);
      product.getItemGroup().add(ig);
      PmDeployment.instance().persist(ig, em, context);
     
      product = PmProduct.instance().findProduct(product.getId(), em);
      }
     
      Collection<ItemGroup> igs = null;
      if (issueSearchCriteries == null) {
        igs = product.getItemGroup();
      }
      else {
        Collection<Item> items = PmItemGroup.instance().findItemGroups(product, issueSearchCriteries, em, context);
        HashMap<Long, ItemGroup> igmap = new HashMap<Long, ItemGroup>();
        for (Item i : items) {
          ItemGroup ig = i.getItemGroup();
          ig.setItem(new ArrayList<Item>());
          igmap.put(ig.getId(), ig);
        }
        for (Item i : items) {
          ItemGroup ig = i.getItemGroup();
          igmap.get(ig.getId()).getItem().add(i);
        }
        igs = igmap.values();
      }
      for (ItemGroup ig : igs) {
        ig.getProduct();
        for (Item item : ig.getItem()) {
          for (ItemImplementation ii : item.getItemImplementation()) {
            for (Task task : ii.getTasks()) {
              task.getId();
            }
          }
View Full Code Here

    teamMember.setRole("owner");
    teamMember.setPerson(person);
    teamMember.setTeam(team);
    PmDeployment.instance().persist(teamMember, em, context);

    ItemGroup ig = new ItemGroup();
    ig.setName("Itemgroup 2");
    ig.setProduct(product);
    product.getItemGroup().add(ig);
    PmDeployment.instance().persist(ig, em, context);
   
      item = new Item();
      item.setSummary("Item 4.2 summary");
      item.setEffort(new Integer(14));
      item.setItemKey("P1-2");
      cal = GregorianCalendar.getInstance();
      cal.setTimeInMillis(System.currentTimeMillis() + (4*24*60*60*1000));
      item.setDueDate(cal);
      item.setDescription("brevbirvdncvenrclndc");
      item.setItemType(ItemType.FEATURE);
      //item.setNextId(prevItem.getId());
      item.setItemGroup(ig);
      ig.getItem().add(item);
      PmDeployment.instance().persist(item, em, context);

      prevItem = item;
      item = new Item();
      item.setSummary("Item 4.1 summary");
      item.setEffort(new Integer(10));
      item.setItemKey("P1-3");
      cal = GregorianCalendar.getInstance();
      cal.setTimeInMillis(System.currentTimeMillis() + (3*24*60*60*1000));
      item.setDueDate(cal);
      item.setDescription("xxxxxxxxxxxxxx\nyyyyyyyyyyyyy");
      item.setItemType(ItemType.FEATURE);
      item.setNextId(prevItem.getId());
      item.setItemGroup(ig);
      ig.getItem().add(item);
      PmDeployment.instance().persist(item, em, context);

    ItemGroup prevItemGroup = ig;
    ig = new ItemGroup();
    ig.setName("Itemgroup 1");
    ig.setProduct(product);
    ig.setNextId(prevItemGroup.getId());
    product.getItemGroup().add(ig);
    PmDeployment.instance().persist(ig, em, context);
   
      Issue issue = new Issue();  
      issue.setSummary("Issue 5.1");
View Full Code Here

        for (ItemGroup ig : coll) {
          productsItemGroups.add(ig);
        }
       
        if (getProduct() == null && coll != null && coll.size() > 0) {
          ItemGroup ig = coll.iterator().next();
          setProduct(ig.getProduct());
        }
      }
     
      return productsItemGroups;
     
View Full Code Here

     
      return deployment;
    }
   
    public ItemGroup getItemGroup(com.melitronic.rmapp.model.ItemGroup spr) {
      ItemGroup itemgroup = new ItemGroup();

      if (spr.getId() != null) {
        for (AbstractEntity ig : getProductItemGroups()) {
          if ( ig.getId() != null && spr.getId().longValue() == ig.getId().longValue() ) {
            itemgroup = (ItemGroup)ig;
          }
        }
      }
     
      itemgroup.setName(spr.getName());
     
      return itemgroup;
    }
View Full Code Here

      // haetaan kaikki uudestaa
      productsDeployments = null;
    }

    public ItemGroup selectedItemGroupUpdate(com.melitronic.rmapp.model.ItemGroup itemgroup) {
      ItemGroup ig = getItemGroup(itemgroup);
     
      boolean isNew = ig.getId() == null;
     
      DmProduct dmProduct =
        DmProductFactory.instance().getClient(getCallContext());
     
      ItemGroup resp = null;
     
      resp = dmProduct.store(ig, getProduct(), getCallContext());
     
      // haetaan kaikki uudestaa
      productsItemGroups = null;
View Full Code Here

      selectedItemUpdate(item, (com.melitronic.rmapp.model.ItemGroup)null);
    }

    public void selectedItemUpdate(com.melitronic.rmapp.model.Item item, com.melitronic.rmapp.model.ItemGroup parentItemGroup) {
      Item it = null;
      ItemGroup ig = null;
      if (item instanceof com.melitronic.rmapp.model.Issue) {
        it = getIssue((com.melitronic.rmapp.model.Issue)item);
      }
      else {
        it = getItem(item);
View Full Code Here

  public void itemPositionChanged(com.melitronic.rmapp.model.Item item, AbstractListItem[] list,
            com.melitronic.rmapp.model.ItemGroup oldParent,
            com.melitronic.rmapp.model.Deployment newParent) {
     
      Item domainItem = null;
        ItemGroup entity1 = null;
      Deployment entity2 = null;

      for (AbstractEntity entity : getProductsDeployments()) {
        if (entity.getId() != null && (newParent).getId() != null &&
          entity.getId().longValue() == (newParent).getId().longValue()) {
              entity2 = (Deployment)entity;
            break;
        }
      }

      for (AbstractEntity entity : productsItemGroups) {
        if (entity.getId() != null && oldParent.getId() != null &&
          entity.getId().longValue() == oldParent.getId().longValue()) {
          entity1 = (ItemGroup)entity;
          break;
        }
      }
     
      for (Item entity : entity1.getItem()) {
        if (entity.getId() != null && item.getId() != null &&
          entity.getId().longValue() == item.getId().longValue()) {
          domainItem = entity;
          break;
        }
View Full Code Here

TOP

Related Classes of com.melitronic.domain.entity.ItemGroup

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.