Package no.ugland.utransprod.model

Examples of no.ugland.utransprod.model.OrderLine


     * @return ordrelinje
     */
    private OrderLine setOrderLineRefs(ArticleType articleType,
            OrderLine orderLineRef, List<OrderLine> orderLines,
            List<ArticleType> usedArticles) {
        OrderLine orderLine = null;

        if (articleType != null && usedArticles.contains(articleType)) {
            orderLine = new OrderLine();
            orderLine.setArticleType(articleType);
            orderLine.setOrderLineRef(orderLineRef);

            if (orderLines != null && orderLines.contains(orderLine)) {
                orderLine = orderLines.get(orderLines.indexOf(orderLine));
            } else {

View Full Code Here


                    OrderWrapper<Order, OrderModel> orderWrapper = (OrderWrapper<Order, OrderModel>) ((OrderLineTreeNode) object)
                            .getObject();
                    orderLines1 = orderWrapper.getOrderLines();
                }

                OrderLine orderLine = getOrderLine(selectedNode, orderLines1,
                        null);

                if (criterias.contains(orderLine)) {
                    orderLine = criterias.get(criterias.indexOf(orderLine));

                } else {
                    criterias.add(orderLine);
                }

                Set<OrderLineAttribute> orderLineAttributes;
                if (orderLine.getOrderLineAttributes() != null) {
                    orderLineAttributes = orderLine.getOrderLineAttributes();
                } else {
                    orderLineAttributes = new HashSet<OrderLineAttribute>();
                    orderLine.setOrderLineAttributes(orderLineAttributes);
                }

                orderLineAttribute.setArticleTypeAttribute(attribute);

                if (orderLine.getOrderLineAttributes().contains(
                        orderLineAttribute)) {
                    List<OrderLineAttribute> atts = new ArrayList<OrderLineAttribute>(
                            orderLine.getOrderLineAttributes());
                    orderLineAttribute = (OrderLineAttributeCriteria) atts
                            .get(atts.indexOf(orderLineAttribute));
                } else {
                    orderLineAttributes.add(orderLineAttribute);
                }
View Full Code Here

            OrderLineTreeNode selectedNode = (OrderLineTreeNode) path
                    .getLastPathComponent();
            if (selectedNode.isLeaf()) {
                OrderLineAttribute attribute = (OrderLineAttribute) selectedNode
                        .getObject();
                OrderLine orderLine = (OrderLine) selectedNode.getParent()
                        .getObject();

                orderLine.getOrderLineAttributes().remove(attribute);

                if (orderLine.getOrderLineAttributes().size() == 0) {
                    criterias.remove(orderLine);

                    Object object = treeTableModelChosen.getRoot();

                    OrderWrapper<Order, OrderModel> orderWrapper = (OrderWrapper<Order, OrderModel>) ((OrderLineTreeNode) object)
View Full Code Here

     */
    @Override
    public void setValueAt(Object aValue, int rowIndex, int columnIndex) {
      Applyable applyable = (Applyable) getRow(rowIndex);
      String columnName = getEnumColumnName(columnIndex);
      OrderLine orderLine = managerRepository.getOrderLineManager()
      .findByOrderLineId(applyable.getOrderLineId());
      Colli colli = getColli(applyable,orderLine);
      ArticleColumn.valueOf(columnName)
          .setValue(applyable, aValue, colli,orderLine);
      managerRepository.getOrderLineManager().saveOrderLine(orderLine);
View Full Code Here

            orderManager.lazyLoadOrder(order, new LazyLoadOrderEnum[] {
                    LazyLoadOrderEnum.ORDER_LINES,
                    LazyLoadOrderEnum.ORDER_LINE_ATTRIBUTES,
                    LazyLoadOrderEnum.ORDER_COSTS,
                    LazyLoadOrderEnum.COMMENTS});
            OrderLine trossOrderLine = order.getOrderLine("Takstoler");
            OrderLine constructionTypeOrderLine = order
                    .getOrderLine("Garasjetype");
            OrderLine portOrderLine = order.getOrderLine("Port");
            Craning craning = Craning.with(craningCostManager).trossOrderLine(trossOrderLine).constructionTypeOrderLine(constructionTypeOrderLine).portOrderLine(portOrderLine).build();
            setCraningAddition(craning.getCostValue());
        }

    }
View Full Code Here

   */
  void removeOrderLine(WindowInterface window) {
    int index = table.convertRowIndexToModel(orderLineSelectionList
        .getSelectionIndex());
    if (index != -1) {
      OrderLine orderLine = (OrderLine) orderLineSelectionList
          .getElementAt(index);

      if (ApplicationParamUtil.getNotPackageList().indexOf(
          orderLine.getArticleName()) < 0) {

        Colli currentColli = ((ColliModel) presentationModel.getBean())
            .getObject();
        ((ColliManager) overviewManager).lazyLoad(currentColli,
            new LazyLoadEnum[][] { { LazyLoadEnum.ORDER_LINES,
                LazyLoadEnum.NONE } });
        Set<OrderLine> orderLines = currentColli.getOrderLines();
        if (orderLines == null) {
          orderLines = new HashSet<OrderLine>();
        }

        boolean success = orderLines.remove(orderLine);
        if (success) {
          orderLine.setColli(null);
          currentColli.setOrderLines(orderLines);

          if (orderLines.size() == 0) {
            currentColli.setPackageDate(null);
          }
View Full Code Here

        if (newArticles != null && newArticles.size() > 0) {
          Deviation deviation = ((DeviationModel) presentationModel
              .getBean()).getObject();
          for (ArticleType article : newArticles) {
            newOrderLines
                .add(new OrderLine(
                    null,
                    (Order) presentationModel
                        .getBufferedValue(DeviationModel.PROPERTY_ORDER),
                    null, article, null, null, null, null,
                    null, null, article
View Full Code Here

      if (postShipment != null && postShipment.getSent() != null) {
        Util
            .showErrorDialog(window, "Sent!",
                "Kan ikke slette artikkel til etterlevering som er sendt!");
      } else {
        OrderLine orderLine = (OrderLine) orderLineSelectionList
            .getSelection();
        if (Util.showConfirmDialog(window.getComponent(), "Slette?",
            "Vil du virkelig slette artikkel?")) {
          if (orderLine != null) {
            ArrayListModel bufferedOrderLines = (ArrayListModel) presentationModel
View Full Code Here

    /**
     * @see javax.swing.table.TableModel#getValueAt(int, int)
     */
    public Object getValueAt(int rowIndex, int columnIndex) {
      OrderLine orderLine = (OrderLine) getRow(rowIndex);
      switch (columnIndex) {
      case 0:
        return orderLine.getArticleName();

      default:
        throw new IllegalStateException("Unknown column");
      }
    }
View Full Code Here

    boolean colliDone = true;
    if (removeColli) {
      List<OrderLine> orderLineList1 = (abstractOrderModel
          .getOrderLines());
      OrderLine orderLine = orderLineList1.get(orderLineList1
          .indexOf(updatedOrderLine));
      orderLine.setColli(null);
      if (rowCount == 0) {
        colliDone = false;
      }
    }
View Full Code Here

TOP

Related Classes of no.ugland.utransprod.model.OrderLine

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.