Package no.ugland.utransprod.service

Examples of no.ugland.utransprod.service.OrderLineManager


     * Setter artikkeltpath.
     */
    public static void changeOrderLineAttributes() {
        OrderManager orderManager = (OrderManager) ModelUtil
                .getBean("orderManager");
        OrderLineManager orderLineManager = (OrderLineManager) ModelUtil
                .getBean("orderLineManager");
        List<Order> orders = orderManager.findAll();

        Set<OrderLine> orderLines;
        Set<OrderLineAttribute> orderLineAttributes;
        for (Order order : orders) {
            orderManager.lazyLoadOrder(order,
                    new LazyLoadOrderEnum[] {LazyLoadOrderEnum.ORDER_LINES});
            orderLines = order.getOrderLines();
            for (OrderLine orderLine : orderLines) {
                orderLineManager
                        .lazyLoad(
                                orderLine,
                                new LazyLoadOrderLineEnum[] {LazyLoadOrderLineEnum.ORDER_LINE_ATTRIBUTE});
                if (orderLine.getArticlePath() == null) {
                    String path = orderLine.getGeneratedArticlePath();
View Full Code Here


  /**
   * Setter om ordrelinje har artikkel
   */
  public static void setOrderLinehasArticle(){
    OrderManager orderManager =(OrderManager)ModelUtil.getBean("orderManager");
    OrderLineManager orderLineManager =(OrderLineManager)ModelUtil.getBean("orderLineManager");
    Set<Order> orders=orderManager.findNotSent();
    Set<OrderLine> orderLines;
    for(Order order:orders){
      orderManager.lazyLoadOrder(order, new LazyLoadOrderEnum[]{LazyLoadOrderEnum.ORDER_LINES,LazyLoadOrderEnum.ORDER_LINE_ORDER_LINES});
      orderLines = order.getOrderLines();
      for(OrderLine orderLine: orderLines){
        //orderLineManager.lazyLoad(orderLine, new LazyLoadOrderLineEnum[]{LazyLoadOrderLineEnum.ORDER_LINE_ATTRIBUTE});
        orderLine.hasArticle();
        orderLineManager.saveOrderLine(orderLine);
      }
    }
  }
View Full Code Here

   *
   */
  public static void setOrderLineDefault() {
    OrderManager orderManager = (OrderManager) ModelUtil
        .getBean("orderManager");
    OrderLineManager orderLineManager = (OrderLineManager) ModelUtil
        .getBean("orderLineManager");
    List<Order> orders = orderManager.findAll();

    Set<OrderLine> orderLines;
   
    for (Order order : orders) {
      orderManager.lazyLoadOrder(order,
          new LazyLoadOrderEnum[] { LazyLoadOrderEnum.ORDER_LINES });
      orderLines = order.getOrderLines();
      for (OrderLine orderLine : orderLines) {
        orderLineManager
            .lazyLoad(
                orderLine,
                new LazyLoadOrderLineEnum[] { LazyLoadOrderLineEnum.ORDER_LINE_ATTRIBUTE });
        orderLine.isDefault();
      }
View Full Code Here

    Order order = orderManager.findByOrderNr("65386");
    orderManager.lazyLoadTree(order);
    OrderLine orderLine = order.getOrderLine("Takstoler");
    assertNotNull(orderLine);
    orderLine.setCuttingDone(Util.getCurrentDate());
    OrderLineManager orderLineManager = (OrderLineManager) ModelUtil
        .getBean(OrderLineManager.MANAGER_NAME);
    orderLineManager.saveOrderLine(orderLine);

    order = orderManager.findByOrderNr("65386");

    orderManager.lazyLoadTree(order);
    orderLine = order.getOrderLine("Takstoler");
    assertNotNull(orderLine);
    assertNotNull(orderLine.getCuttingDone());

    orderLine.setCuttingDone(null);
    orderLineManager.saveOrderLine(orderLine);
  }
View Full Code Here

    Order order = orderManager.findByOrderNr("65386");
    orderManager.lazyLoadTree(order);
    OrderLine orderLine = order.getOrderLine("Takstoler");
    assertNotNull(orderLine);
    orderLine.setCuttingStarted(Util.getCurrentDate());
    OrderLineManager orderLineManager = (OrderLineManager) ModelUtil
        .getBean(OrderLineManager.MANAGER_NAME);
    orderLineManager.saveOrderLine(orderLine);

    order = orderManager.findByOrderNr("65386");

    orderManager.lazyLoadTree(order);
    orderLine = order.getOrderLine("Takstoler");
    assertNotNull(orderLine);
    assertNotNull(orderLine.getCuttingStarted());

    orderLine.setCuttingStarted(null);
    orderLineManager.saveOrderLine(orderLine);
  }
View Full Code Here

    /**
     *
     */
    void doSearch() {
        orderLines.clear();
        OrderLineManager orderLineManager = (OrderLineManager) ModelUtil
                .getBean("orderLineManager");
        numberOfOrders = orderLineManager.countByDate(querySettings);
        List<Order> orderLinesConstrcutionTypeArticleAttribute = null;
        orderLinesConstrcutionTypeArticleAttribute = orderLineManager
                .findByConstructionTypeArticleAttributes(criterias,
                        querySettings);
        if (orderLinesConstrcutionTypeArticleAttribute != null) {
            orderLines.addAll(orderLinesConstrcutionTypeArticleAttribute);
        }
View Full Code Here

  @SuppressWarnings("unchecked")
  private static void addOrderLine(final Login login,
      final ManagerRepository managerRepository,
      final DeviationViewHandlerFactory deviationViewHandlerFactory,
      final Map<String, AbstractProductionPackageViewHandler> map) {
    OrderLineManager orderLineManager = (OrderLineManager) ModelUtil
        .getBean("orderLineManager");

    map.put("Takstein",
        (AbstractProductionPackageViewHandler) new PackageViewHandler(
            login, managerRepository, deviationViewHandlerFactory,
View Full Code Here

  }

  private void addAttributesToOrders(final ProductArea productArea) {
    if (masterDialog) {
      if (universalAttributes.size() != 0) {
        OrderLineManager orderLineManager = (OrderLineManager) ModelUtil
            .getBean("orderLineManager");
        List<OrderLine> orderLines = orderLineManager
            .findAllConstructionTypeNotSent(productArea);
        for (OrderLine orderLine : orderLines) {
          addAttributesToConstructionTypeOrderLine(orderLine,
              universalAttributes);
          orderLineManager.saveOrderLine(orderLine);
        }
      }
    }
  }
View Full Code Here

                    ReportEnum.PACKLIST, null, window);
        }
    }

    private void lazyLoadOrderLines(final Set<OrderLine> orderLineSet) {
        OrderLineManager orderLineManager = (OrderLineManager) ModelUtil
                .getBean("orderLineManager");

        for (OrderLine orderLine : orderLineSet) {
            orderLineManager
                    .lazyLoad(
                            orderLine,
                            new LazyLoadOrderLineEnum[] {LazyLoadOrderLineEnum.ORDER_LINE_ATTRIBUTE});
        }
    }
View Full Code Here

   * @return tabell
   */
  public JXTable getTableOrderLines(WindowInterface window) {
    menuItemPack.addActionListener(new MenuItemListenerPack(window,
        colliListViewHandler));
    OrderLineManager orderLineManager = (OrderLineManager) ModelUtil
        .getBean("orderLineManager");
    Filter[] filters = new Filter[] {
        new PatternFilter("Ja", Pattern.CASE_INSENSITIVE, 5),
        new PatternFilter("---", Pattern.CASE_INSENSITIVE, 4),
        new PatternFilter("Ja", Pattern.CASE_INSENSITIVE, 6), };
View Full Code Here

TOP

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

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.