/** * If not already created, a new <code>properties</code> element with the given value will be created. * Otherwise, the existing <code>properties</code> element will be returned. * @return a new or existing instance of <code>Properties<PersistenceUnit<T>></code> */ public Properties<PersistenceUnit<T>> getOrCreateProperties() { Node node = childNode.getOrCreate("properties"); Properties<PersistenceUnit<T>> properties = new PropertiesImpl<PersistenceUnit<T>>(this, "properties", childNode, node); return properties; }
/** * If not already created, a new <code>property</code> element will be created and returned. * Otherwise, the first existing <code>property</code> element will be returned. * @return the instance defined for the element <code>property</code> */ public Property<Properties<T>> getOrCreateProperty() { List<Node> nodeList = childNode.get("property"); if (nodeList != null && nodeList.size() > 0) { return new PropertyImpl<Properties<T>>(this, "property", childNode, nodeList.get(0)); } return createProperty(); }
/** * If not already created, a new <code>property</code> element will be created and returned. * Otherwise, the first existing <code>property</code> element will be returned. * @return the instance defined for the element <code>property</code> */ public Property<Properties<T>> getOrCreateProperty() { List<Node> nodeList = childNode.get("property"); if (nodeList != null && nodeList.size() > 0) { return new PropertyImpl<Properties<T>>(this, "property", childNode, nodeList.get(0)); } return createProperty(); }
/** * If not already created, a new <code>properties</code> element with the given value will be created. * Otherwise, the existing <code>properties</code> element will be returned. * @return a new or existing instance of <code>Properties<PersistenceUnit<T>></code> */ public Properties<PersistenceUnit<T>> getOrCreateProperties() { Node node = childNode.getOrCreate("properties"); Properties<PersistenceUnit<T>> properties = new PropertiesImpl<PersistenceUnit<T>>(this, "properties", childNode, node); return properties; }