public NextVoteManager(final NextVote nvPlugin) {
        this.plugin = nvPlugin;
        try {
            plugin.getDatabase().find(VoteHistory.class).findRowCount();
        } catch (PersistenceException ex) {
            log.log(Level.INFO, "Installing database for " + plugin.getDescription().getName() + " due to first time usage");
            plugin.installDDL();
        }
        try {
            plugin.getDatabase().find(VoteAggregate.class).findRowCount();
        } catch (PersistenceException ex) {
            log.log(Level.INFO, "Installing database for " + plugin.getDescription().getName() + " due to first time usage");
            VoteAggregate.initView(plugin);
        }
        this.database = plugin.getDatabase();
    }