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

global.maplink.place.sync.PlaceSyncApiImpl Maven / Gradle / Ivy

There is a newer version: 1.5.14
Show newest version
package global.maplink.place.sync;

import global.maplink.place.async.PlaceAsyncAPI;
import global.maplink.place.schema.*;
import lombok.RequiredArgsConstructor;

import java.util.List;
import java.util.Optional;

import static global.maplink.helpers.FutureHelper.await;
import static lombok.AccessLevel.PROTECTED;

@RequiredArgsConstructor(access = PROTECTED)
public class PlaceSyncApiImpl implements PlaceSyncAPI {
    private final PlaceAsyncAPI delegate;

    @Override
    public PlaceRouteResponse calculate(PlaceRouteRequest request) {
        return await(delegate.calculate(request));
    }

    @Override
    public void create(CreatePlaceRequest request) {
        await(delegate.create(request));
    }

    @Override
    public void create(Place place) {
        await(delegate.create(place));
    }

    @Override
    public List listAllStates(ListAllStatesRequest request) {
        return await(delegate.listAllStates(request));
    }

    @Override
    public List listAllCities(ListAllCitiesRequest request) {
        return await(delegate.listAllCities(request));
    }

    @Override
    public List listAllDistricts(ListAllDistrictsRequest request) {
        return await(delegate.listAllDistricts(request));
    }

    @Override
    public PlacePageResult listAll(ListAllPlacesRequest request) {
        return await(delegate.listAll(request));
    }

    @Override
    public PlacePageResult listAll(int limit, int offset) {
        return await(delegate.listAll(limit, offset));
    }

    @Override
    public PlacePageResult listAll() {
        return await(delegate.listAll());
    }

    @Override
    public Optional getByOriginId(PlaceByOriginIdRequest request) {
        return await(delegate.getByOriginId(request));
    }

    @Override
    public Optional getByOriginId(String originId) {
        return await(delegate.getByOriginId(originId));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy