class EntityGraph implements ConfigurationChangeListener {

    public Set<Entity> getDependents(Entity entity) throws IvoryException {
        Node entityNode = new Node(entity.getEntityType(), entity.getName());
        if (graph.containsKey(entityNode)) {
            ConfigurationStore store = ConfigurationStore.get();
            Set<Entity> dependents = new HashSet<Entity>();
            for (Node node : graph.get(entityNode)) {
                Entity dependentEntity = store.get(node.type, node.name);
                assert dependentEntity != null : "Unable to find " + node;
                dependents.add(dependentEntity);
            }
            return dependents;
        } else {
            return null;
        }
    }

    private  EntityGraph();

}