Package no.ugland.utransprod.service

Examples of no.ugland.utransprod.service.ColliManager


        frontProductionVManager);
    ProductionUnitManager productionUnitManager = (ProductionUnitManager) ModelUtil
        .getBean(ProductionUnitManager.MANAGER_NAME);
    when(managerRepository.getProductionUnitManager()).thenReturn(
        productionUnitManager);
    ColliManager colliManager = (ColliManager) ModelUtil
        .getBean(ColliManager.MANAGER_NAME);
    when(managerRepository.getColliManager()).thenReturn(colliManager);
    TakstolProductionVManager takstolProductionVManager = (TakstolProductionVManager) ModelUtil
        .getBean(TakstolProductionVManager.MANAGER_NAME);
    when(managerRepository.getTakstolProductionVManager()).thenReturn(
View Full Code Here


    userType.setUserTypeAccesses(userTypeAccesses);
    userType.setIsAdmin(1);
   
    when(login.getUserType()).thenReturn(userType);

    final ColliManager colliManager = (ColliManager) ModelUtil
        .getBean(ColliManager.MANAGER_NAME);
    when(managerRepository.getColliManager()).thenReturn(colliManager);
    final ApplicationUserManager applicationUserManager = (ApplicationUserManager) ModelUtil
        .getBean(ApplicationUserManager.MANAGER_NAME);
    when(managerRepository.getApplicationUserManager()).thenReturn(applicationUserManager);
View Full Code Here

    }

    private OrderLine setObjectApplied(
            final OrderLineManager orderLineManager, final OrderLine orderLine, final String aColliName)
            throws ProTransException {
        ColliManager colliManager = (ColliManager) ModelUtil.getBean("colliManager");
        Colli colli;
        String currentColliName = aColliName != null ? aColliName : colliName;
        if (orderLine.getPostShipment() != null) {
            colli = colliManager.findByNameAndPostShipment(currentColliName, orderLine.getPostShipment());
        } else {
            colli = colliManager.findByNameAndOrder(currentColliName, orderLine.getOrder());
        }
        if (colli == null) {
            if (orderLine.getPostShipment() != null) {
                colli = new Colli(null, null, currentColliName, null, null, null,
                        orderLine.getPostShipment(), null, Util.getCurrentDate());
            } else {
                colli = new Colli(null, orderLine.getOrder(), currentColliName, null, null, null, null, null,
                        Util.getCurrentDate());
            }
        } else {
            if(!Hibernate.isInitialized(colli.getOrderLines())){
            colliManager.lazyLoad(colli,
                    new LazyLoadEnum[][] { { LazyLoadEnum.ORDER_LINES, LazyLoadEnum.NONE } });
            }
        }
        colli.addOrderLine(orderLine);
        colli.setPackageDate(Util.getCurrentDate());
        colliManager.saveColli(colli);

        orderLine.setColli(colli);

        orderLineManager.saveOrderLine(orderLine);
        checkCompleteness(orderLine, true);
View Full Code Here

   * @throws ProTransException
   */
  private void doPackage(final OrderLine orderLine, final String aColliName)
      throws ProTransException {
    String currentColliName = aColliName != null ? aColliName : colliName;
    ColliManager colliManager = (ColliManager) ModelUtil
        .getBean("colliManager");
    OrderLineManager orderLineManager = (OrderLineManager) ModelUtil
        .getBean("orderLineManager");
    Colli colli;
    if (orderLine.getPostShipment() != null) {
      colli = colliManager.findByNameAndPostShipment(currentColliName,
          orderLine.getPostShipment());
    } else {
      colli = colliManager.findByNameAndOrder(currentColliName, orderLine
          .getOrder());
    }
    if (colli == null) {
      if (orderLine.getPostShipment() != null) {
        colli = new Colli(null, null, currentColliName, null, null,
            null, orderLine.getPostShipment(), null, Util
                .getCurrentDate());
      } else {
        colli = new Colli(null, orderLine.getOrder(), currentColliName,
            null, null, null, null, null, Util.getCurrentDate());
      }
    } else {
      colliManager.lazyLoad(colli, new LazyLoadEnum[][] { {
          LazyLoadEnum.ORDER_LINES, LazyLoadEnum.NONE } });
    }
    colli.addOrderLine(orderLine);
    colliManager.saveColli(colli);

    orderLine.setColli(colli);

    orderLineManager.saveOrderLine(orderLine);
    checkCompleteness(colli, true);
View Full Code Here

        frontProductionVManager);
    OrderLineManager orderLineManager = (OrderLineManager) ModelUtil
        .getBean(OrderLineManager.MANAGER_NAME);
    when(managerRepository.getOrderLineManager()).thenReturn(
        orderLineManager);
    ColliManager colliManager=(ColliManager)ModelUtil.getBean(ColliManager.MANAGER_NAME);
    when(managerRepository.getColliManager()).thenReturn(colliManager);

    final ApplicationUser applicationUser = new ApplicationUser();
    ProductArea productArea = new ProductArea();
    ProductAreaGroup productAreaGroup = new ProductAreaGroup();
View Full Code Here

    //    final ManagerRepository managerRepository = context
//        .mock(ManagerRepository.class);
    when(managerRepository.getOrderManager()).thenReturn(orderManager);
    OrdlnManager ordlnManager=(OrdlnManager)ModelUtil.getBean(OrdlnManager.MANAGER_NAME);
    when(managerRepository.getOrdlnManager()).thenReturn(ordlnManager);
    ColliManager colliManager=(ColliManager)ModelUtil.getBean(ColliManager.MANAGER_NAME);
    when(managerRepository.getColliManager()).thenReturn(colliManager);
    TransportLetter transportLetter = new GarageTransportLetter(
        managerRepository);
    final Order transportable = new Order();
    ConstructionType constructionType = new ConstructionType();
View Full Code Here

                    .saveOrderLine(orderLine);
              }
            }
            Set<Colli> collies = postShipment.getCollies();
            if (collies != null) {
              ColliManager colliManager = (ColliManager) ModelUtil
                  .getBean("colliManager");
              for (Colli colli : collies) {
                colli.setPostShipment(null);
                colli.setOrder(postShipment.getOrder());
                colliManager.saveColli(colli);
                /*
                 * colliManager .lazyLoadColli( colli, new
                 * LazyLoadColliEnum[]
                 * {LazyLoadColliEnum.ORDER_LINES});
                 */
 
View Full Code Here

        .thenReturn(supplierManager);
    TransportManager transportManager = (TransportManager) ModelUtil
        .getBean(TransportManager.MANAGER_NAME);
    when(managerRepository.getTransportManager()).thenReturn(
        transportManager);
    ColliManager colliManager = (ColliManager) ModelUtil
        .getBean(ColliManager.MANAGER_NAME);
    when(managerRepository.getColliManager()).thenReturn(colliManager);
    DeviationManager deviationManager = (DeviationManager) ModelUtil
        .getBean(DeviationManager.MANAGER_NAME);
    when(managerRepository.getDeviationManager()).thenReturn(
View Full Code Here

   *
   * @param window
   */
  @SuppressWarnings("unchecked")
  private void saveObjects(final WindowInterface window) {
    ColliManager colliManager = (ColliManager) ModelUtil
        .getBean("colliManager");
    if (isCollies) {
      saveCollies(colliManager);
    } else {
      handleSendingTransportables(window);
View Full Code Here

          .savePostShipment((PostShipment) transportlistable);
    }
  }

  private void handleCollies(TransportListable transportlistable) {
    ColliManager colliManager = (ColliManager) ModelUtil
        .getBean("colliManager");
    Set<Colli> collies;
    if (!orderUpdatedCollies.contains(transportlistable)) {
      collies = transportlistable.getCollies();
      if (collies != null) {
        for (Colli colli : collies) {
          colli.setSent(sentDate);
          colliManager.saveColli(colli);
        }
      }
    }
  }
View Full Code Here

TOP

Related Classes of no.ugland.utransprod.service.ColliManager

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.