/** * If not already created, a new <code>datasource</code> element will be created and returned. * Otherwise, the first existing <code>datasource</code> element will be returned. * @return the instance defined for the element <code>datasource</code> */ public DatasourceType<DatasourcesDescriptor> getOrCreateDatasource() { List<Node> nodeList = model.get("datasource"); if (nodeList != null && nodeList.size() > 0) { return new DatasourceTypeImpl<DatasourcesDescriptor>(this, "datasource", model, nodeList.get(0)); } return createDatasource(); }
/** * If not already created, a new <code>datasource</code> element will be created and returned. * Otherwise, the first existing <code>datasource</code> element will be returned. * @return the instance defined for the element <code>datasource</code> */ public DatasourceType<DatasourcesDescriptor> getOrCreateDatasource() { List<Node> nodeList = model.get("datasource"); if (nodeList != null && nodeList.size() > 0) { return new DatasourceTypeImpl<DatasourcesDescriptor>(this, "datasource", model, nodeList.get(0)); } return createDatasource(); }