in SdmxStructureRetrieval/src/main/java/org/sdmxsource/sdmx/structureretrieval/manager/BaseSdmxBeanRetrievalManager.java [198:263]
public <T extends MaintainableBean> Set<T> getMaintainableBeans(Class<T> structureType, MaintainableRefBean ref, boolean returnLatest, boolean returnStub) {
Set<T> returnSet;
if (returnLatest) {
ref = new MaintainableRefBeanImpl(ref.getAgencyId(), ref.getMaintainableId(), null);
}
if (structureType == AgencySchemeBean.class) {
returnSet = (Set<T>) getAgencySchemeBeans(ref, returnStub);
} else if (structureType == AttachmentConstraintBean.class) {
returnSet = (Set<T>) getAttachmentConstraints(ref, returnLatest, returnStub);
} else if (structureType == ContentConstraintBean.class) {
returnSet = (Set<T>) getContentConstraints(ref, returnLatest, returnStub);
} else if (structureType == DataConsumerSchemeBean.class) {
returnSet = (Set<T>) getDataConsumerSchemeBeans(ref, returnStub);
} else if (structureType == DataProviderSchemeBean.class) {
returnSet = (Set<T>) getDataProviderSchemeBeans(ref, returnStub);
} else if (structureType == CategorisationBean.class) {
returnSet = (Set<T>) getCategorisationBeans(ref, returnStub);
} else if (structureType == CategorySchemeBean.class) {
returnSet = (Set<T>) getCategorySchemeBeans(ref, returnLatest, returnStub);
} else if (structureType == CodelistBean.class) {
returnSet = (Set<T>) getCodelistBeans(ref, returnLatest, returnStub);
} else if (structureType == ConceptSchemeBean.class) {
returnSet = (Set<T>) getConceptSchemeBeans(ref, returnLatest, returnStub);
} else if (structureType == DataflowBean.class) {
returnSet = (Set<T>) getDataflowBeans(ref, returnLatest, returnStub);
} else if (structureType == HierarchicalCodelistBean.class) {
returnSet = (Set<T>) getHierarchicCodeListBeans(ref, returnLatest, returnStub);
} else if (structureType == DataStructureBean.class) {
returnSet = (Set<T>) getDataStructureBeans(ref, returnLatest, returnStub);
} else if (structureType == MetadataFlowBean.class) {
returnSet = (Set<T>) getMetadataflowBeans(ref, returnLatest, returnStub);
} else if (structureType == MetadataStructureDefinitionBean.class) {
returnSet = (Set<T>) getMetadataStructureBeans(ref, returnLatest, returnStub);
} else if (structureType == OrganisationUnitSchemeBean.class) {
returnSet = (Set<T>) getOrganisationUnitSchemeBeans(ref, returnLatest, returnStub);
} else if (structureType == ProcessBean.class) {
returnSet = (Set<T>) getProcessBeans(ref, returnLatest, returnStub);
} else if (structureType == ReportingTaxonomyBean.class) {
returnSet = (Set<T>) getReportingTaxonomyBeans(ref, returnLatest, returnStub);
} else if (structureType == StructureSetBean.class) {
returnSet = (Set<T>) getStructureSetBeans(ref, returnLatest, returnStub);
} else if (structureType == ProvisionAgreementBean.class) {
returnSet = (Set<T>) getProvisionAgreementBeans(ref, returnLatest, returnStub);
} else if (structureType == RegistrationBean.class) {
returnSet = (Set<T>) getRegistrationBeans(ref);
} else if (structureType == SubscriptionBean.class) {
returnSet = (Set<T>) getSubscriptionBeans(ref, false, false);
} else if (structureType == null || structureType == MaintainableBean.class) {
returnSet = (Set<T>) getAllMaintainables(ref, returnLatest, returnStub);
} else {
throw new SdmxNotImplementedException("getMaintainableBean for type: " + structureType);
}
if (returnStub && serviceRetrievalManager != null) {
Set<T> stubSet = new HashSet<T>();
for (T returnItm : returnSet) {
if (returnItm.isExternalReference().isTrue()) {
stubSet.add(returnItm);
} else {
stubSet.add((T) serviceRetrievalManager.createStub(returnItm));
}
}
returnSet = stubSet;
}
return returnSet;
}