Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: for the plan.

Jump to: navigation, search

Stardust/Knowledge Base/API/JavaAPICookbook/FetchingOrganizationOfProviderModel


This article describes how to fetch Organizations, Departments and Particpants in a Multi model environment which involves consumer-provider hierarchy.


Approach 1:

// For each provider model of main model
for(long oid : mainModel.getProviderModels()){
	// Get the model
DeployedModel providerModel = queryService.getModel(oid);
// Get list of all organizations of provider model
      List<OrganizationDetails> orgDetails =      providerModel.getAllOrganizations();
       for(OrganizationDetails orgDetail : orgDetails) {
       		System.out.println("Name" + orgDetail.getName());

Approach 2:

You can download sample FilterableAttributeImpl java source from here.

//Create Filterable query for Provider.
FilterableAttribute PROVIDER = new FilterableAttributeImpl(DeployedModelQuery.class, "provider");                  
DeployedModelQuery query = DeployedModelQuery.findAll();
// Get all provider models
Models models = qs.getModels(query) ;
// For each model
for(DeployedModelDescription model : models) {
     List<OrganizationDetails> orgDetails =     model.getAllOrganizations();
       for(OrganizationDetails orgDetail : orgDetails) {
       		System.out.println("Name" + orgDetail.getName());

Back to the top