Package com.melitronic.domain.entity

Examples of com.melitronic.domain.entity.Deployment


    super.persist(e, em, context);
   
  }

    public Deployment store(Deployment deployment, Product product, EntityManager em,CallContext context) {
      Deployment last = null;
      product = (Product)refresh(product, em, context);
      boolean isNew = deployment.getId() == null;
      if (isNew) {
          Collection<Deployment> depl = getDeplyments(product, em, context);
          if (depl != null && depl.size() > 0) {
            for (Deployment d : depl) {
              if (d.getNextId() == null) {
                last = d;
                break;
              }
            }
          }
      }
      else {
          deployment = (Deployment)refresh(deployment, em, context);
      }
     
      deployment.setProduct(product);
      persist(deployment, em, context);
     
      if (isNew && last !=null) {
        last.setNextId(deployment.getId());
        PmDeployment.instance().store(last, product, em, context);
      }
     
      return deployment;
View Full Code Here


     
      return (Collection<ImplementationPhase>)query.getResultList();
  }
 
    public void changePositions(Deployment entity, EntityManager em, CallContext context) {
    Deployment depl = (Deployment)PmDeployment.instance().findById(entity, em, context);
    depl.setNextId(entity.getNextId());
    persist(depl, em, context);
    }
View Full Code Here

    public Item store(Item item, Sprint sprint, EntityManager em, CallContext context) {
      Item lastItem = null;
      ItemImplementation last = null;
      boolean isNew = item.getId() == null;
      sprint = (Sprint)PmDeployment.instance().refresh(sprint, em, context);
      Deployment deployment = sprint.getDeployment();
     
      if (isNew) {
          Collection<ItemImplementation> iic = sprint.getItemImplementation();
          if (iic != null && iic.size() > 0) {
            for (ItemImplementation ii : iic) {
              if (ii.getNextId() == null) {
                last = ii;
                break;
              }
            }
          }
         
          Collection<Item> items = deployment.getItems();
          if (items != null && items.size() > 0) {
            for (Item i : items) {
              if (i.getNextId() == null) {
                lastItem = i;
                break;
              }
            }
          }
      }
      else {
        item = (Item)refresh(item, em, context);
      }
     
      if (item.getItemKey() == null) {
        Product product = deployment.getProduct();
        String prefix = product.getPrefix();
       
        if (product.getLastKey() == null) {
          product.setLastKey(new Long(1));
        }
View Full Code Here

      // item->item; deployment list
      Item item = new Item();
      item.setId(itemId);
      item = (Item)findById(item, em, context);
     
      Deployment oldParent = item.getDeployment();
      newParent = (Deployment)PmDeployment.instance().findById(newParent, em, context);
     
      if (item.getId() != null && before != null && item.getId().longValue() == before.longValue()) {
        return;
      }
     
      if ( oldParent != null && oldParent.getItems().contains(item) ) {
        Long n = item.getNextId();
        for (Item i : oldParent.getItems()) {
          if (i.getNextId() != null && i.getNextId().longValue() == item.getId().longValue()) {
            i.setNextId(n);
            persist(i, em, context);
            break;
          }
        }
        oldParent.getItems().remove(item);
      }
     
    item.setDeployment(newParent);
    for (Item i : newParent.getItems()) {
      if ( before != null && i.getNextId() != null &&
View Full Code Here

      return product.getTeam();
    }
   
    public Deployment store(Deployment deployment, Product product, CallContext context) {
     
      Deployment resp = PmDeployment.instance().store(deployment, product, em, context);
     
      return resp;
    }
View Full Code Here

    product.setName("Product 1");
    product.setPrefix("P1");
    product.setLastKey(new Long(9));
    PmProduct.instance().persist(product, em, context);

    Deployment deployment = new Deployment();
    deployment.setName("release 1.3");
    deployment.setReleaseNumber("01");
    deployment.setVersionNumber("03");
    Calendar cal = GregorianCalendar.getInstance();
    cal.setTimeInMillis(System.currentTimeMillis() + (24 * 60 * 60 * 1000));
    deployment.setStartTime(cal);
    cal = GregorianCalendar.getInstance();
    cal.setTimeInMillis(System.currentTimeMillis() + (4 * 7 * 24 * 60 * 60 * 1000));
    deployment.setReleaseTime(cal);
    deployment.setDescription("jaada jaada jaada...\npada pada pada");
    deployment.setProduct(product);
    product.getDeployment().add(deployment);
    PmDeployment.instance().persist(deployment, em, context);
   
      Item item = new Item();
      item.setSummary("Item 1.3 summary");
      item.setEffort(new Integer(5));
      item.setItemKey("P1-3");
      cal = GregorianCalendar.getInstance();
      cal.setTimeInMillis(System.currentTimeMillis() + (7*24*60*60*1000));
      item.setDueDate(cal);
      item.setDescription("diiba daaba\njou jou");
      item.setItemType(ItemType.FEATURE);
      item.setDeployment(deployment);
      deployment.getItems().add(item);
      PmDeployment.instance().persist(item, em, context);

        Task task = new Task();
        task.setName("Task 1.3.2 name");
        task.setEstimation(new Integer(8));
        task.setDescription("xxxxxxxx\nyyyyyyyyy");
        task.setTaskStatus(TaskStatus.NOT_STARTED);
        ItemImplementation ii = new ItemImplementation();
        item.getItemImplementation().add(ii);
        ii.setItem(item);
        PmDeployment.instance().persist(ii, em, context);
        ii.getTasks().add(task);
        task.setItemImplementation(ii);
        PmDeployment.instance().persist(task, em, context);
          TaskEstimation tes = new TaskEstimation();
          tes.setEstimation(new Integer(8));
          cal = GregorianCalendar.getInstance();
          cal.setTimeInMillis(System.currentTimeMillis() - (3*24*60*60*1000));
          tes.setEstimationDate(new Date(cal.getTimeInMillis()));
          tes.setTask(task);
          PmDeployment.instance().persist(tes, em, context);

        Task prevTask = task;
        task = new Task();
        task.setName("Task 1.3.1 name");
        task.setEstimation(new Integer(5));
        task.setDescription("xxxxxxxx\nyyyyyyyyy");
        task.setTaskStatus(TaskStatus.NOT_STARTED);
        task.setNextId(prevTask.getId());
        ii.getTasks().add(task);
        task.setItemImplementation(ii);
        PmDeployment.instance().persist(task, em, context);
          tes = new TaskEstimation();
          tes.setEstimation(new Integer(5));
          cal = GregorianCalendar.getInstance();
          cal.setTimeInMillis(System.currentTimeMillis() - (2*24*60*60*1000));
          tes.setEstimationDate(new Date(cal.getTimeInMillis()));
          tes.setTask(task);
          PmDeployment.instance().persist(tes, em, context);

      Item prevItem = item;
      item = new Item();
      item.setSummary("Item 1.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("diiba daaba\njou jou");
      item.setItemType(ItemType.FEATURE);
      item.setNextId(prevItem.getId());
      item.setDeployment(deployment);
      deployment.getItems().add(item);
      PmDeployment.instance().persist(item, em, context);

        task = new Task();
        task.setName("Task 1.2.2 name");
        task.setEstimation(new Integer(8));
        task.setDescription("xxxxxxxx\nyyyyyyyyy");
        task.setTaskStatus(TaskStatus.NOT_STARTED);
        ii = new ItemImplementation();
        item.getItemImplementation().add(ii);
        ii.setItem(item);
        PmDeployment.instance().persist(ii, em, context);
        ii.getTasks().add(task);
        task.setItemImplementation(ii);
        PmDeployment.instance().persist(task, em, context);
          tes = new TaskEstimation();
          tes.setEstimation(new Integer(8));
          cal = GregorianCalendar.getInstance();
          cal.setTimeInMillis(System.currentTimeMillis() - (1*24*60*60*1000));
          tes.setEstimationDate(new Date(cal.getTimeInMillis()));
          tes.setTask(task);
          PmDeployment.instance().persist(tes, em, context);
 
        prevTask = task;
        task = new Task();
        task.setName("Task 1.2.1 name");
        task.setEstimation(new Integer(5));
        task.setDescription("xxxxxxxx\nyyyyyyyyy");
        task.setTaskStatus(TaskStatus.NOT_STARTED);
        task.setNextId(prevTask.getId());
        ii.getTasks().add(task);
        task.setItemImplementation(ii);
        PmDeployment.instance().persist(task, em, context);
          tes = new TaskEstimation();
          tes.setEstimation(new Integer(5));
          cal = GregorianCalendar.getInstance();
          cal.setTimeInMillis(System.currentTimeMillis() - (2*24*60*60*1000));
          tes.setEstimationDate(new Date(cal.getTimeInMillis()));
          tes.setTask(task);
          PmDeployment.instance().persist(tes, em, context);

      prevItem = item;
      item = new Item();
      item.setSummary("Item 1.1 summary");
      item.setEffort(new Integer(8));
      item.setItemKey("P1-1");
      cal = GregorianCalendar.getInstance();
      cal.setTimeInMillis(System.currentTimeMillis() + (4*24*60*60*1000));
      item.setDueDate(cal);
      item.setDescription("diiba daaba\njou jou");
      item.setItemType(ItemType.FEATURE);
      item.setNextId(prevItem.getId());
      item.setDeployment(deployment);
      deployment.getItems().add(item);
      PmDeployment.instance().persist(item, em, context);

        task = new Task();
        task.setName("Task 1.1.2 name");
        task.setEstimation(new Integer(8));
        task.setDescription("xxxxxxxx\nyyyyyyyyy");
        task.setTaskStatus(TaskStatus.NOT_STARTED);
        ii = new ItemImplementation();
        item.getItemImplementation().add(ii);
        ii.setItem(item);
        PmDeployment.instance().persist(ii, em, context);
        ii.getTasks().add(task);
        task.setItemImplementation(ii);
        PmDeployment.instance().persist(task, em, context);
          tes = new TaskEstimation();
          tes.setEstimation(new Integer(8));
          cal = GregorianCalendar.getInstance();
          cal.setTimeInMillis(System.currentTimeMillis() - (1*24*60*60*1000));
          tes.setEstimationDate(new Date(cal.getTimeInMillis()));
          tes.setTask(task);
          PmDeployment.instance().persist(tes, em, context);
 
        prevTask = task;
        task = new Task();
        task.setName("Task 1.1.1 name");
        task.setEstimation(new Integer(5));
        task.setDescription("xxxxxxxx\nyyyyyyyyy");
        task.setTaskStatus(TaskStatus.NOT_STARTED);
        task.setNextId(prevTask.getId());
        ii.getTasks().add(task);
        task.setItemImplementation(ii);
        PmDeployment.instance().persist(task, em, context);
          tes = new TaskEstimation();
          tes.setEstimation(new Integer(5));
          cal = GregorianCalendar.getInstance();
          cal.setTimeInMillis(System.currentTimeMillis() - (24*60*60*1000));
          tes.setEstimationDate(new Date(cal.getTimeInMillis()));
          tes.setTask(task);
          PmDeployment.instance().persist(tes, em, context);

    Deployment prevDeployment = deployment;
    deployment = new Deployment();
    deployment.setName("release 1.2");
    deployment.setReleaseNumber("01");
    deployment.setVersionNumber("02");
    cal = GregorianCalendar.getInstance();
    cal.setTimeInMillis(System.currentTimeMillis() - (4* 7 * 24 * 60 * 60 * 1000));
    deployment.setStartTime(cal);
    cal = GregorianCalendar.getInstance();
    cal.setTimeInMillis(System.currentTimeMillis());
    deployment.setReleaseTime(cal);
    deployment.setDescription("jaada jaada jaada...\npada pada pada");
    deployment.setNextId(prevDeployment.getId());
    deployment.setProduct(product);
    product.getDeployment().add(deployment);
    PmDeployment.instance().persist(deployment, em, context);
   
      item = new Item();
      item.setSummary("Item 2.3 summary");
      item.setEffort(new Integer(5));
      item.setItemKey("P1-6");
      cal = GregorianCalendar.getInstance();
      cal.setTimeInMillis(System.currentTimeMillis() + (7*24*60*60*1000));
      item.setDueDate(cal);
      item.setDescription("diiba daaba\njou jou");
      item.setItemType(ItemType.FEATURE);
      item.setDeployment(deployment);
      deployment.getItems().add(item);
      PmDeployment.instance().persist(item, em, context);

        task = new Task();
        task.setName("Task 2.3.2 name");
        task.setEstimation(new Integer(8));
        task.setDescription("xxxxxxxx\nyyyyyyyyy");
        task.setTaskStatus(TaskStatus.NOT_STARTED);
        ii = new ItemImplementation();
        item.getItemImplementation().add(ii);
        ii.setItem(item);
        PmDeployment.instance().persist(ii, em, context);
        ii.getTasks().add(task);
        task.setItemImplementation(ii);
        PmDeployment.instance().persist(task, em, context);
          tes = new TaskEstimation();
          tes.setEstimation(new Integer(8));
          cal = GregorianCalendar.getInstance();
          cal.setTimeInMillis(System.currentTimeMillis() - (4*24*60*60*1000));
          tes.setEstimationDate(new Date(cal.getTimeInMillis()));
          tes.setTask(task);
          PmDeployment.instance().persist(tes, em, context);
 
        prevTask = task;
        task = new Task();
        task.setName("Task 2.3.1 name");
        task.setEstimation(new Integer(5));
        task.setDescription("xxxxxxxx\nyyyyyyyyy");
        task.setTaskStatus(TaskStatus.NOT_STARTED);
        task.setNextId(prevTask.getId());
        ii.getTasks().add(task);
        task.setItemImplementation(ii);
        PmDeployment.instance().persist(task, em, context);
          tes = new TaskEstimation();
          tes.setEstimation(new Integer(5));
          cal = GregorianCalendar.getInstance();
          cal.setTimeInMillis(System.currentTimeMillis() - (5*24*60*60*1000));
          tes.setEstimationDate(new Date(cal.getTimeInMillis()));
          tes.setTask(task);
          PmDeployment.instance().persist(tes, em, context);

      prevItem = item;
      item = new Item();
      item.setSummary("Item 2.2 summary");
      item.setEffort(new Integer(14));
      item.setItemKey("P1-5");
      cal = GregorianCalendar.getInstance();
      cal.setTimeInMillis(System.currentTimeMillis() + (4*24*60*60*1000));
      item.setDueDate(cal);
      item.setDescription("diiba daaba\njou jou");
      item.setItemType(ItemType.FEATURE);
      item.setNextId(prevItem.getId());
      item.setDeployment(deployment);
      deployment.getItems().add(item);
      PmDeployment.instance().persist(item, em, context);

        task = new Task();
        task.setName("Task 2.2.2 name");
        task.setEstimation(new Integer(8));
        task.setDescription("xxxxxxxx\nyyyyyyyyy");
        task.setTaskStatus(TaskStatus.NOT_STARTED);
        ii = new ItemImplementation();
        item.getItemImplementation().add(ii);
        ii.setItem(item);
        PmDeployment.instance().persist(ii, em, context);
        ii.getTasks().add(task);
        task.setItemImplementation(ii);
        PmDeployment.instance().persist(task, em, context);
          tes = new TaskEstimation();
          tes.setEstimation(new Integer(8));
          cal = GregorianCalendar.getInstance();
          cal.setTimeInMillis(System.currentTimeMillis() - (1*24*60*60*1000));
          tes.setEstimationDate(new Date(cal.getTimeInMillis()));
          tes.setTask(task);
          PmDeployment.instance().persist(tes, em, context);
 
        prevTask = task;
        task = new Task();
        task.setName("Task 2.2.1 name");
        task.setEstimation(new Integer(5));
        task.setDescription("xxxxxxxx\nyyyyyyyyy");
        task.setTaskStatus(TaskStatus.NOT_STARTED);
        task.setNextId(prevTask.getId());
        ii.getTasks().add(task);
        task.setItemImplementation(ii);
        PmDeployment.instance().persist(task, em, context);
          tes = new TaskEstimation();
          tes.setEstimation(new Integer(5));
          cal = GregorianCalendar.getInstance();
          cal.setTimeInMillis(System.currentTimeMillis() - (2*24*60*60*1000));
          tes.setEstimationDate(new Date(cal.getTimeInMillis()));
          tes.setTask(task);
          PmDeployment.instance().persist(tes, em, context);

      prevItem = item;
      item = new Item();
      item.setSummary("Item 2.1 summary");
      item.setEffort(new Integer(8));
      item.setItemKey("P1-4");
      cal = GregorianCalendar.getInstance();
      cal.setTimeInMillis(System.currentTimeMillis() + (4*24*60*60*1000));
      item.setDueDate(cal);
      item.setDescription("diiba daaba\njou jou");
      item.setItemType(ItemType.FEATURE);
      item.setNextId(prevItem.getId());
      item.setDeployment(deployment);
      deployment.getItems().add(item);
      PmDeployment.instance().persist(item, em, context);

        task = new Task();
        task.setName("Task 2.1.2 name");
        task.setEstimation(new Integer(8));
        task.setDescription("xxxxxxxx\nyyyyyyyyy");
        task.setTaskStatus(TaskStatus.NOT_STARTED);
        ii = new ItemImplementation();
        item.getItemImplementation().add(ii);
        ii.setItem(item);
        PmDeployment.instance().persist(ii, em, context);
        ii.getTasks().add(task);
        task.setItemImplementation(ii);
        PmDeployment.instance().persist(task, em, context);
          tes = new TaskEstimation();
          tes.setEstimation(new Integer(8));
          cal = GregorianCalendar.getInstance();
          cal.setTimeInMillis(System.currentTimeMillis() - (3*24*60*60*1000));
          tes.setEstimationDate(new Date(cal.getTimeInMillis()));
          tes.setTask(task);
          PmDeployment.instance().persist(tes, em, context);
 
        prevTask = task;
        task = new Task();
        task.setName("Task 2.1.1 name");
        task.setEstimation(new Integer(5));
        task.setDescription("xxxxxxxx\nyyyyyyyyy");
        task.setTaskStatus(TaskStatus.NOT_STARTED);
        task.setNextId(prevTask.getId());
        ii.getTasks().add(task);
        task.setItemImplementation(ii);
        PmDeployment.instance().persist(task, em, context);
          tes = new TaskEstimation();
          tes.setEstimation(new Integer(5));
          cal = GregorianCalendar.getInstance();
          cal.setTimeInMillis(System.currentTimeMillis() - (2*24*60*60*1000));
          tes.setEstimationDate(new Date(cal.getTimeInMillis()));
          tes.setTask(task);
          PmDeployment.instance().persist(tes, em, context);

    prevDeployment = deployment;
    deployment = new Deployment();
    deployment.setName("release 1.1");
    deployment.setReleaseNumber("01");
    deployment.setVersionNumber("01");
    cal = GregorianCalendar.getInstance();
    cal.setTimeInMillis(System.currentTimeMillis() - (8 * 7 * 24 * 60 * 60 * 1000));
    deployment.setStartTime(cal);
    cal = GregorianCalendar.getInstance();
    cal.setTimeInMillis(System.currentTimeMillis() - (4 * 7 * 24 * 60 * 60 * 1000));
    deployment.setReleaseTime(cal);
    deployment.setDescription("jaada jaada jaada...\npada pada pada");
    deployment.setNextId(prevDeployment.getId());
    deployment.setProduct(product);
    product.getDeployment().add(deployment);
    PmDeployment.instance().persist(deployment, em, context);

      item = new Item();
View Full Code Here

      setSelectedProduct(dmProduct.store(getSelectedProduct(), getCallContext()));
    }
  }
 
  public Deployment updateDeployment(DeploymentListItem depli) {
    Deployment deployment = getDeployment(depli);
     
    DmProduct dmProduct =
        DmProductFactory.instance().getClient(getCallContext());
     
    Deployment resp = dmProduct.store(deployment, getSelectedProduct(), getCallContext());
   
    productDeployments = null;
   
    return resp;
  }
View Full Code Here

   
    return resp;
  }
 
  public Deployment getDeployment(DeploymentListItem depl) {
      Deployment deployment = new Deployment();

      if (depl.getId() != null && productDeployments != null) {
        for (AbstractEntity d : productDeployments) {
          if ( ((Deployment)d).getId() != null && depl.getId().longValue() == ((Deployment)d).getId().longValue() ) {
            deployment = (Deployment)d;
View Full Code Here

        for (Deployment depl : coll) {
          productsDeployments.add(depl);
        }
       
        if (getProduct() == null && coll != null && coll.size() > 0) {
          Deployment d = coll.iterator().next();
          setProduct(d.getProduct());
        }
      }
     
      return productsDeployments;
     
View Full Code Here

    public Deployment getDeployment(com.melitronic.rmapp.model.Deployment depl) {
      if (depl == null) {
        return null;
      }
      Deployment deployment = new Deployment();

      if (depl.getId() != null) {
        for (AbstractEntity d : productsDeployments) {
          if ( ((Deployment)d).getId() != null && depl.getId().longValue() == ((Deployment)d).getId().longValue() ) {
            deployment = (Deployment)d;
View Full Code Here

TOP

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

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.