private Set<IndexMode> fetchIndexModes(long typeId) {
   ResultSet<RelatedTopicModel> indexModes =
       dms.storage.getTopicRelatedTopics(
           typeId,
           "dm4.core.aggregation",
           "dm4.core.type",
           null,
           "dm4.core.index_mode",
           0); // ### FIXME: null
   return IndexMode.fromTopics(indexModes.getItems());
 }
 private ViewConfigurationModel fetchTypeViewConfig(Topic typeTopic) {
   try {
     // Note: othersTopicTypeUri=null, the view config's topic type is unknown (it is
     // client-specific)
     ResultSet<RelatedTopic> configTopics =
         typeTopic.getRelatedTopics(
             "dm4.core.aggregation",
             "dm4.core.type",
             "dm4.core.view_config",
             null,
             true,
             false,
             0,
             null);
     return new ViewConfigurationModel(DeepaMehtaUtils.toTopicModels(configTopics.getItems()));
   } catch (Exception e) {
     throw new RuntimeException(
         "Fetching view configuration for type \"" + typeTopic.getUri() + "\" failed", e);
   }
 }
 private ViewConfigurationModel fetchAssocDefViewConfig(Association assocDef) {
   try {
     // Note: othersTopicTypeUri=null, the view config's topic type is unknown (it is
     // client-specific)
     ResultSet<RelatedTopic> configTopics =
         assocDef.getRelatedTopics(
             "dm4.core.aggregation",
             "dm4.core.assoc_def",
             "dm4.core.view_config",
             null,
             true,
             false,
             0,
             null);
     return new ViewConfigurationModel(DeepaMehtaUtils.toTopicModels(configTopics.getItems()));
   } catch (Exception e) {
     throw new RuntimeException(
         "Fetching view configuration for association definition " + assocDef.getId() + " failed",
         e);
   }
 }