Package no.ugland.utransprod.model

Examples of no.ugland.utransprod.model.ProductionUnit


    }

  }

  final void setAdditionFilters(final List<Filter> filters) {
    ProductionUnit productionUnit = (ProductionUnit) productionUnitSelectionList
        .getSelection();
    if (productionUnit != null) {
      PatternFilter filterProductionUnit = new PatternFilter(
          productionUnit.getProductionUnitName(),
          Pattern.CASE_INSENSITIVE, 8);
      filters.add(filterProductionUnit);
    }
  }
View Full Code Here


      labelInfo.setText("Setter produsert...");
      }else{
        labelInfo.setText("Setter ikke produsert...");
      }
      if (applied) {
        ProductionUnit productionUnit = setProductionUnit(window,
            produceable);
        setProductionUnitForRelatedArticles(produceable, productionUnit,
            window);
      }
      applyListInterface.setApplied(produceable, applied, window);
View Full Code Here

    }

    @Override
    public ProductionUnitModel getBufferedObjectModel(PresentationModel presentationModel) {
        ProductionUnitModel productionUnitModel = new ProductionUnitModel(
                new ProductionUnit());
        productionUnitModel.setProductionUnitName((String) presentationModel
                .getBufferedValue(PROPERTY_PRODUCTION_UNIT_NAME));
        productionUnitModel.setArticleType((ArticleType) presentationModel
                .getBufferedValue(PROPERTY_ARTICLE_TYPE));
        productionUnitModel.setProductionUnitProductAreaGroupList((List<ProductionUnitProductAreaGroup>) presentationModel
View Full Code Here

    ProductionUnitViewHandler productionUnitViewHandler = new ProductionUnitViewHandler(
        login, productionUnitManager);

    ProductionUnitModel productionUnitModel = new ProductionUnitModel(
        new ProductionUnit());
    final EditProductionUnitView editProductionUnitView = new EditProductionUnitView(
        false, productionUnitModel, productionUnitViewHandler);

    JDialog dialog = GuiActionRunner.execute(new GuiQuery<JDialog>() {
      protected JDialog executeInEDT() {
View Full Code Here

   */
  @After
  public void tearDown() throws Exception {
    dialogFixture.cleanUp();

    ProductionUnit productionUnit = new ProductionUnit();
    productionUnit.setProductionUnitName("test");
    List<ProductionUnit> list = productionUnitManager
        .findByObject(productionUnit);
    if (list != null) {
      for (ProductionUnit prodUnit : list) {
        productionUnitManager.removeObject(prodUnit);
View Full Code Here

    optionDialog.comboBox().selectItem("Takstol");
    optionDialog.button("ButtonOk").click();

    dialogFixture.button("SaveProductionUnit").click();

    ProductionUnit productionUnit = new ProductionUnit();
    productionUnit.setProductionUnitName("test");
    List<ProductionUnit> list = productionUnitManager
        .findByObject(productionUnit);
    assertNotNull(list);
    assertEquals(1, list.size());

    productionUnit = list.get(0);
    productionUnitManager.lazyLoad(productionUnit, new LazyLoadEnum[][] { {
        LazyLoadEnum.PRODUCTION_UNIT_PRODUCT_AREA_GROUPS,
        LazyLoadEnum.NONE } });
    assertEquals("Takstoler", productionUnit.getArticleType()
        .getArticleTypeName());
    assertEquals("test", productionUnit.getProductionUnitName());

    assertEquals(1, productionUnit.getProductionUnitProductAreaGroups()
        .size());
    assertEquals("Takstol", productionUnit
        .getProductionUnitProductAreaGroups().iterator().next()
        .getProductAreaGroup().getProductAreaGroupName());

  }
View Full Code Here

    dialogFixture.button("ButtonRemoveProductAreaGroup").requireEnabled();
    dialogFixture.button("ButtonRemoveProductAreaGroup").click();

    dialogFixture.button("SaveProductionUnit").click();

    ProductionUnit productionUnit = new ProductionUnit();
    productionUnit.setProductionUnitName("test");
    List<ProductionUnit> list = productionUnitManager
        .findByObject(productionUnit);
    assertNotNull(list);
    assertEquals(1, list.size());

    productionUnit = list.get(0);
    productionUnitManager.lazyLoad(productionUnit, new LazyLoadEnum[][] { {
        LazyLoadEnum.PRODUCTION_UNIT_PRODUCT_AREA_GROUPS,
        LazyLoadEnum.NONE } });
    assertEquals("Takstoler", productionUnit.getArticleType()
        .getArticleTypeName());
    assertEquals("test", productionUnit.getProductionUnitName());

    assertEquals(1, productionUnit.getProductionUnitProductAreaGroups()
        .size());
    assertEquals("Takstol", productionUnit
        .getProductionUnitProductAreaGroups().iterator().next()
        .getProductAreaGroup().getProductAreaGroupName());

  }
View Full Code Here

        object), this);
  }

  @Override
  public ProductionUnit getNewObject() {
    return new ProductionUnit();
  }
View Full Code Here

     * @param rowIndex
     * @param columnIndex
     * @return verdi
     */
    public Object getValueAt(int rowIndex, int columnIndex) {
      ProductionUnit productionUnit = (ProductionUnit) getRow(rowIndex);
      switch (columnIndex) {
      case 0:
        return productionUnit.getProductionUnitName();
      case 1:

        return productionUnit.getArticleType();
      default:
        throw new IllegalStateException("Unknown column");
      }

    }
View Full Code Here

    setProductionUnit(produceable);

  }

  public ProductionUnit setProductionUnit(Produceable produceable) {
    ProductionUnit productionUnit = null;
    List<ProductionUnit> productionUnits = managerRepository
        .getProductionUnitManager().findByArticleTypeProductAreaGroup(
            articleType, produceable.getProductAreaGroupName());

    if (productionUnits != null && productionUnits.size() != 0) {
      String productionUnitName = produceable.getProductionUnitName();
      ProductionUnit defaultProductionUnit = null;
      if (productionUnitName != null) {
        defaultProductionUnit = managerRepository
            .getProductionUnitManager().findByName(
                productionUnitName);
      }
View Full Code Here

TOP

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

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.