class RatingsEntryResolversImpl implements RatingsEntryResolvers {

    @Override
    public DataFetcher<RatingsEntry> createRatingsEntryDataFetcher() {
        return environment -> {
            long userId = util.getLongArg(environment, "userId", util.getDefaultUserId());
            String className = util.getStringArg(environment, "className");
            long classPK = util.getLongArg(environment, "classPK");
            double score = util.getDoubleArg(environment, "score");
            ServiceContext serviceContext = new ServiceContext();

            return ratingsEntryLocalService.updateEntry(
                    userId,
                    className,
                    classPK,
                    score,
                    serviceContext);
        };
    }

}