@Transactional(readOnly = true) public Object doWork(Session session, ServiceFactory sf) { List<Node> nodes = sf.getQueryService().findAll( Node.class, null); Set<String> nodeIds = new HashSet<String>(); for (Node node : nodes) { if (onlyActive && node.getDown() != null) { continue; // Remove none active managers } nodeIds.add(node.getUuid()); } return nodeIds; } });
/** * Called when the configuration database does not contain a valid * current_id. Used to index all the data which does not have an EventLog. */ @Override public void initialize() { for (Class<IEnum> cls : types.getEnumerationTypes()) { for (IEnum e : queryService.findAll(cls, null)) { addEventLog(cls, e.getId()); } } }