*/
public ResourceIndexerDao indexProjects() {
final DbSession session = mybatis.openSession(true);
try {
final ResourceIndexerMapper mapper = session.getMapper(ResourceIndexerMapper.class);
session.select("org.sonar.core.resource.ResourceIndexerMapper.selectRootProjectIds", /* workaround to get booleans */ResourceIndexerQuery.create(), new ResultHandler() {
@Override
public void handleResult(ResultContext context) {
Integer rootProjectId = (Integer) context.getResultObject();
doIndexProject(rootProjectId, session, mapper);
session.commit();