code: public PersistenceUnitRefType<WebAppDescriptor> getOrCreatePersistenceUnitRef()
     {
        List<Node> nodeList = model.get("persistence-unit-ref");
        if (nodeList != null &&  nodeList.size() > 0)
        {
           return new PersistenceUnitRefTypeImpl<WebAppDescriptor>(this, "persistence-unit-ref", model, nodeList.get(0));
        }
        return createPersistenceUnitRef();
     }
docs: If not already created, a new <code>persistence-unit-ref</code> element will be created and returned.
  Otherwise, the first existing <code>persistence-unit-ref</code> element will be returned.
  @return the instance defined for the element <code>persistence-unit-ref</code>