class CassandraMailboxMapper implements MailboxMapper {

    @Override
    public Mono<Boolean> hasChildren(Mailbox mailbox, char delimiter) {
        return Flux.merge(
                mailboxPathDAO.listUserMailboxes(mailbox.getNamespace(), mailbox.getUser()),
                mailboxPathV2DAO.listUserMailboxes(mailbox.getNamespace(), mailbox.getUser()))
            .filter(idAndPath -> isPathChildOfMailbox(idAndPath, mailbox, delimiter))
            .hasElements();
    }

    @Inject public  CassandraMailboxMapper(CassandraMailboxDAO mailboxDAO,
                                  CassandraMailboxPathDAOImpl mailboxPathDAO,
                                  CassandraMailboxPathV2DAO mailboxPathV2DAO,
                                  CassandraUserMailboxRightsDAO userMailboxRightsDAO,
                                  CassandraACLMapper aclMapper,
                                  CassandraSchemaVersionManager versionManager);

}