@NotFinalAPI public interface TopologyCountByClasses extends Serializable
Example: Return the number of hosts in uCMDB with breakdown by class name
QueryDefinition queryDefinition = factory.createQueryDefinition("Get all hosts");
queryDefinition.addNode("Hosts").ofType("host").linkedTo(queryDefinition.addNode("Ips").ofType("ip"));
TopologyCountByClasses topologyCountByClass =
topologyQueryService.evaluateQueryByClasses(queryDefinition, Arrays.asList("host"));
System.out.println("Hosts breakdown by class:" + topologyCountByClass.getClassesCount("Hosts"));
}
| Modifier and Type | Method and Description |
|---|---|
Map<String,Integer> |
getClassesCount(String elementName)
Returns the classes count map (class name -> class count) for the given query element
(QueryNode or QueryLink) name.
|
Map<String,Map<String,Integer>> |
getFullMap()
Returns the full count map of available classes.
|
Map<String,Integer> getClassesCount(String elementName)
elementName - the query element name. Documentation Feedback
Copyright 2011 - 2023 Micro Focus or one of its affiliates.