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