/** * If not already created, a new <code>element-collection</code> element will be created and returned. * Otherwise, the first existing <code>element-collection</code> element will be returned. * @return the instance defined for the element <code>element-collection</code> */ public ElementCollection<EmbeddableAttributes<T>> getOrCreateElementCollection() { List<Node> nodeList = childNode.get("element-collection"); if (nodeList != null && nodeList.size() > 0) { return new ElementCollectionImpl<EmbeddableAttributes<T>>(this, "element-collection", childNode, nodeList.get(0)); } return createElementCollection(); }
/** * If not already created, a new <code>element-collection</code> element will be created and returned. * Otherwise, the first existing <code>element-collection</code> element will be returned. * @return the instance defined for the element <code>element-collection</code> */ public ElementCollection<EmbeddableAttributes<T>> getOrCreateElementCollection() { List<Node> nodeList = childNode.get("element-collection"); if (nodeList != null && nodeList.size() > 0) { return new ElementCollectionImpl<EmbeddableAttributes<T>>(this, "element-collection", childNode, nodeList.get(0)); } return createElementCollection(); }