Package no.ugland.utransprod.model

Examples of no.ugland.utransprod.model.ConstructionTypeArticleAttribute


    Set<ConstructionTypeArticle> articles = articleType
        .getConstructionTypeArticles();
    Set<ArticleTypeAttribute> articleAttributes = articleType
        .getArticleTypeAttributes();
    Set<ConstructionTypeArticleAttribute> attributes;
    ConstructionTypeArticleAttribute newAttribute;

    ConstructionTypeArticleManager constructionTypeArticleManager = (ConstructionTypeArticleManager) ModelUtil
        .getBean("constructionTypeArticleManager");

    for (ConstructionTypeArticle consArticle : articles) {
      constructionTypeArticleManager.lazyLoad(consArticle,
          new LazyLoadEnum[][] { { LazyLoadEnum.ATTRIBUTES,
              LazyLoadEnum.NONE } });
      attributes = consArticle.getAttributes();
      for (ArticleTypeAttribute articleTypeAttribute : articleAttributes) {
        if (!constructionTypeHasAttribute(attributes,
            articleTypeAttribute)) {
          newAttribute = new ConstructionTypeArticleAttribute(null,
              consArticle, articleTypeAttribute,
              Util.convertNumberToBoolean(articleTypeAttribute
                  .getAttribute().getYesNo()) ? "Nei" : "",
              null);
          attributes.add(newAttribute);
View Full Code Here


      Set<ConstructionTypeArticleAttribute> orgSet) {
    HashSet<ConstructionTypeArticleAttribute> clonedSet = new HashSet<ConstructionTypeArticleAttribute>();

    if (orgSet != null) {
      for (ConstructionTypeArticleAttribute attribute : orgSet) {
        clonedSet.add(new ConstructionTypeArticleAttribute(attribute
            .getConstructionTypeArticleAttributeId(), attribute
            .getConstructionTypeArticle(), attribute
            .getArticleTypeAttribute(), attribute
            .getConstructionTypeArticleValue(), attribute
            .getDialogOrder()));
View Full Code Here

    HashSet<ConstructionTypeArticleAttribute> newAttributes = null;
    if (attributes != null && attributes.size() != 0) {
      newAttributes = new HashSet<ConstructionTypeArticleAttribute>();

      for (ConstructionTypeArticleAttribute attribute : attributes) {
        newAttributes.add(new ConstructionTypeArticleAttribute(null,
            constructionTypeArticle, attribute
                .getArticleTypeAttribute(), attribute
                .getConstructionTypeArticleValue(), attribute
                .getDialogOrder()));
      }
View Full Code Here

   
   
    OrderLine orderLine = new OrderLine();
    orderLine.setArticlePath("Garasjetype");
   
    ConstructionTypeArticleAttribute constructionTypeArticleAttribute=new ConstructionTypeArticleAttribute();
    ArticleTypeAttribute articleTypeAttribute=new ArticleTypeAttribute();
    Attribute attribute=new Attribute();
    attribute.setName("Veggh�yde");
    articleTypeAttribute.setAttribute(attribute);
   
    constructionTypeArticleAttribute.setArticleTypeAttribute(articleTypeAttribute);
   
    OrderLineAttribute orderLineAttribute = new OrderLineAttribute();
    orderLineAttribute.setConstructionTypeArticleAttribute(constructionTypeArticleAttribute);
    orderLine.addAttribute(orderLineAttribute);
   
    constructionTypeArticleAttribute=new ConstructionTypeArticleAttribute();
    articleTypeAttribute=new ArticleTypeAttribute();
    attribute=new Attribute();
    attribute.setName("Murh�yde");
    articleTypeAttribute.setAttribute(attribute);
   
    orderLineAttribute = new OrderLineAttribute();
    orderLineAttribute.setConstructionTypeArticleAttribute(constructionTypeArticleAttribute);
    orderLine.addAttribute(orderLineAttribute);
   
    constructionTypeArticleAttribute.setArticleTypeAttribute(articleTypeAttribute);
   
    constructionTypeArticleAttribute=new ConstructionTypeArticleAttribute();
    articleTypeAttribute=new ArticleTypeAttribute();
    attribute=new Attribute();
    attribute.setName("Bredde");
    articleTypeAttribute.setAttribute(attribute);
   
    orderLineAttribute = new OrderLineAttribute();
    orderLineAttribute.setConstructionTypeArticleAttribute(constructionTypeArticleAttribute);
    orderLine.addAttribute(orderLineAttribute);
   
    constructionTypeArticleAttribute.setArticleTypeAttribute(articleTypeAttribute);
   
    constructionTypeArticleAttribute=new ConstructionTypeArticleAttribute();
    articleTypeAttribute=new ArticleTypeAttribute();
    attribute=new Attribute();
    attribute.setName("Lengde");
    articleTypeAttribute.setAttribute(attribute);
   
    orderLineAttribute = new OrderLineAttribute();
    orderLineAttribute.setConstructionTypeArticleAttribute(constructionTypeArticleAttribute);
    orderLine.addAttribute(orderLineAttribute);
   
    constructionTypeArticleAttribute.setArticleTypeAttribute(articleTypeAttribute);
   
    order.addOrderLine(orderLine);
   
    final Ordln ordln=new Ordln();
    ordln.setWdtu(BigDecimal.valueOf(400));
View Full Code Here

      Set<ConstructionTypeArticleAttribute> constructionTypeArticleAttributes = new HashSet<ConstructionTypeArticleAttribute>();

      for (ArticleTypeAttribute articleTypeAttribute : attributes) {
        constructionTypeArticleAttributes
            .add(new ConstructionTypeArticleAttribute(null,
                constructionTypeArticleMain,
                articleTypeAttribute, null, null));
      }

      if (constructionTypeArticleAttributes.size() != 0) {
View Full Code Here

        if (attributes != null) {
          constructionTypeArticleAttributes = new HashSet<ConstructionTypeArticleAttribute>();

          for (ArticleTypeAttribute attribute : attributes) {
            constructionTypeArticleAttributes
                .add(new ConstructionTypeArticleAttribute(null,
                    constructionTypeArticle, attribute,
                    null, null));
          }

          openAttributeView(constructionTypeArticle,
View Full Code Here

    if (selectedNode != null && selectedNode.isLeaf()) {

      BufferedValueModel bufferedArticles = presentationModel
          .getBufferedModel(ConstructionTypeModel.PROPERTY_CONSTRUCTION_TYPE_ARTICLES);

      ConstructionTypeArticleAttribute attribute = (ConstructionTypeArticleAttribute) selectedNode
          .getObject();

      String attributeValue;
      if (attribute.isYesNo()) {
        attributeValue = (String) JOptionPane.showInputDialog(window
            .getComponent(), "Gi ny verdi", "Endre verdi",
            JOptionPane.QUESTION_MESSAGE, null, new Object[] {
                "Ja", "Nei" }, attribute
                .getConstructionTypeArticleValue());
      } else if (attribute.getChoices() != null
          && attribute.getChoices().size() != 0) {

        attributeValue = (String) Util.showOptionsDialogCombo(window,
            attribute.getChoices(), "Endre verdi", true, attribute
                .getConstructionTypeArticleValue());

      } else {

        attributeValue = JOptionPane.showInputDialog(window
            .getComponent(), "Gi ny verdi", attribute
            .getConstructionTypeArticleValue());
      }

      if (attributeValue != null) {
        String orderValue = JOptionPane.showInputDialog(window
            .getComponent(), "Rekkef�lge", attribute
            .getDialogOrder());

        if (attributeValue.length() != 0) {
          attribute.setConstructionTypeArticleValue(attributeValue);
        }

        if (orderValue != null && orderValue.length() != 0) {
          attribute.setDialogOrder(Integer.valueOf(orderValue));
        } else {
          attribute.setDialogOrder(null);
        }
        if (masterDialog && useAsUniversal.equalsIgnoreCase("Ja")) {
          universalChangedArticleAttributes.add(attribute);
        }
        ConstructionType constructiontype = (ConstructionType) ((ConstructionTreeNode) constructionTreeTableModel
View Full Code Here

TOP

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

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.