.lazyLoadArticle(
constructionArticle,
new LazyLoadConstructionTypeArticleEnum[] { LazyLoadConstructionTypeArticleEnum.CONSTRUCTION_TYPE_ARTICLES });
Set<ConstructionTypeArticle> articleRefs = constructionArticle
.getConstructionTypeArticles();
OrderLine orderLine;
Set<OrderLineAttribute> orderLineAttributes;
Set<OrderLine> orderLineRefs = new LinkedHashSet<OrderLine>();
if (articleRefs != null) {
for (ConstructionTypeArticle articleRef : articleRefs) {
orderLine = OrderLine.getInstance(order, articleRef,
orderLineMain, articleRef.getNumberOfItems(),
articleRef.getDialogOrder(), deviation);
constructionTypeManager
.lazyLoadArticle(
articleRef,
new LazyLoadConstructionTypeArticleEnum[] { LazyLoadConstructionTypeArticleEnum.ATTRIBUTES });
Set<ConstructionTypeArticleAttribute> attributes = articleRef
.getAttributes();
if (attributes != null) {
orderLineAttributes = new LinkedHashSet<OrderLineAttribute>();
for (ConstructionTypeArticleAttribute attribute : attributes) {
orderLineAttributes.add(new OrderLineAttribute(null,
orderLine, attribute, null, null, attribute
.getAttributeValue(), attribute
.getDialogOrder(), attribute
.getAttributeName()));
}
orderLine.setOrderLineAttributes(orderLineAttributes);
setOrderLineConstructionRefs(articleRef, orderLine, order,
deviation);
}
orderLineRefs.add(orderLine);
orderLine.setArticlePath(orderLine.getGeneratedArticlePath());
}
orderLineMain.setOrderLines(orderLineRefs);
}
}