All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.opentripplanner.ext.legacygraphqlapi.datafetchers.LegacyGraphQLContactInfoImpl Maven / Gradle / Ivy

package org.opentripplanner.ext.legacygraphqlapi.datafetchers;

import graphql.schema.DataFetcher;
import graphql.schema.DataFetchingEnvironment;
import org.opentripplanner.ext.legacygraphqlapi.generated.LegacyGraphQLDataFetchers;
import org.opentripplanner.model.ContactInfo;

public class LegacyGraphQLContactInfoImpl implements LegacyGraphQLDataFetchers.LegacyGraphQLContactInfo {
    @Override
    public DataFetcher contactPerson() {
        return environment -> getSource(environment).getContactPerson();
    }

    @Override
    public DataFetcher phoneNumber() {
        return environment -> getSource(environment).getPhoneNumber();
    }

    @Override
    public DataFetcher eMail() {
        return environment -> getSource(environment).geteMail();
    }

    @Override
    public DataFetcher faxNumber() {
        return environment -> getSource(environment).getFaxNumber();
    }

    @Override
    public DataFetcher infoUrl() {
        return environment -> getSource(environment).getInfoUrl();
    }

    @Override
    public DataFetcher bookingUrl() {
        return environment -> getSource(environment).getBookingUrl();
    }

    @Override
    public DataFetcher additionalDetails() {
        return environment -> getSource(environment).getAdditionalDetails();
    }

    private ContactInfo getSource(DataFetchingEnvironment environment) {
        return environment.getSource();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy