class CompanyResolversImpl implements CompanyResolvers {

    @Override
    public DataFetcher<Company> createCompanyDataFetcher() {
        return environment -> {
            String webId = util.getStringArg(environment, "webId");
            String virtualHostname = util.getStringArg(environment, "virtualHostname");
            String mx = util.getStringArg(environment, "mx");
            boolean system = util.getBooleanArg(environment, "system");
            int maxUsers = util.getIntArg(environment, "maxUsers");
            boolean active = util.getBooleanArg(environment, "active", true);

            return companyLocalService.addCompany(
                    webId,
                    virtualHostname,
                    mx,
                    system,
                    maxUsers,
                    active);
        };
    }

}