/** * If not already created, a new <code>named-query</code> element will be created and returned. * Otherwise, the first existing <code>named-query</code> element will be returned. * @return the instance defined for the element <code>named-query</code> */ public NamedQuery<Entity<T>> getOrCreateNamedQuery() { List<Node> nodeList = childNode.get("named-query"); if (nodeList != null && nodeList.size() > 0) { return new NamedQueryImpl<Entity<T>>(this, "named-query", childNode, nodeList.get(0)); } return createNamedQuery(); }
/** * If not already created, a new <code>named-query</code> element will be created and returned. * Otherwise, the first existing <code>named-query</code> element will be returned. * @return the instance defined for the element <code>named-query</code> */ public NamedQuery<Entity<T>> getOrCreateNamedQuery() { List<Node> nodeList = childNode.get("named-query"); if (nodeList != null && nodeList.size() > 0) { return new NamedQueryImpl<Entity<T>>(this, "named-query", childNode, nodeList.get(0)); } return createNamedQuery(); }