new LazyLoadArticleTypeEnum[] {
LazyLoadArticleTypeEnum.ATTRIBUTE,
LazyLoadArticleTypeEnum.ARTICLE_TYPE_ARTICLE_TYPE });
Set<ArticleTypeArticleType> articleRefs = articleType
.getArticleTypeArticleTypes();
ConstructionTypeArticle constructionTypeArticle;
Set<ConstructionTypeArticleAttribute> constructionTypeArticleAttributes;
Set<ConstructionTypeArticle> constructionTypeRefs = new HashSet<ConstructionTypeArticle>();
if (articleRefs != null && articleRefs.size() != 0) {
for (ArticleTypeArticleType articleRef : articleRefs) {
constructionTypeArticle = new ConstructionTypeArticle(null,
null, articleRef.getArticleTypeRef(), null,
constructionTypeArticleMain, null, null, null, null);
ArticleType articleTypeRef = articleRef.getArticleTypeRef();
managerRepository
.getArticleTypeManager()
.lazyLoad(
articleTypeRef,
new LazyLoadArticleTypeEnum[] { LazyLoadArticleTypeEnum.ATTRIBUTE });
Set<ArticleTypeAttribute> attributes = articleTypeRef
.getArticleTypeAttributes();
if (attributes != null) {
constructionTypeArticleAttributes = new HashSet<ConstructionTypeArticleAttribute>();
for (ArticleTypeAttribute attribute : attributes) {
constructionTypeArticleAttributes
.add(new ConstructionTypeArticleAttribute(null,
constructionTypeArticle, attribute,
null, null));
}
openAttributeView(constructionTypeArticle,
constructionTypeArticleAttributes);
constructionTypeArticle
.setAttributes(constructionTypeArticleAttributes);
setArticleRefs(articleRef.getArticleTypeRef(),
constructionTypeArticle);
}