class AddressResolversImpl implements AddressResolvers {

    @Override
    public DataFetcher<Address> createAddressDataFetcher() {
        return environment -> {
            long userId = util.getLongArg(environment, "userId", util.getDefaultUserId());
            String className = util.getStringArg(environment, "className");
            long classPK = util.getLongArg(environment, "classPK");
            String street1 = util.getStringArg(environment, "street1");
            String street2 = util.getStringArg(environment, "street2");
            String street3 = util.getStringArg(environment, "street3");
            String city = util.getStringArg(environment, "city");
            String zip = util.getStringArg(environment, "zip");
            long regionId = util.getLongArg(environment, "regionId");
            long countryId = util.getLongArg(environment, "countryId");
            long typeId = util.getLongArg(environment, "typeId");
            boolean mailing = util.getBooleanArg(environment, "mailing");
            boolean primary = util.getBooleanArg(environment, "primary");
            ServiceContext serviceContext = new ServiceContext();

            return addressLocalService.addAddress(
                    userId,
                    className,
                    classPK,
                    street1,
                    street2,
                    street3,
                    city,
                    zip,
                    regionId,
                    countryId,
                    typeId,
                    mailing,
                    primary,
                    serviceContext);
        };
    }

}