Skip to content

ICoordinateRepo

Namespace: Database.Repository.CoordinateRepo

Repository interface for accessing and managing coordinate locations.

public interface ICoordinateRepo

Methods

DeletePostalCode(Int32)

Deletes postalcode from the database.

Task DeletePostalCode(int postalCode)

Parameters

postalCode Int32

The postal code to delete from the database.

Returns

Task

ExistsPostalCode(Int32)

Checks if there is an entry for that opstal code in the database.

Task<Boolean> ExistsPostalCode(int postalcode)

Parameters

postalcode Int32

Defines which entry will be checked.

Returns

Returns a boolean values for the existence of an entry in the database associated with the postalcode.

GetAllLocations()

Gets all postalcodes that are saved in the database.

Task<List<Tuple<Int32, String>>> GetAllLocations()

Returns

List with all postalcodes.

GetLocation()

Retrieves the coordinates of the postalcode that was inserted last.

Task<CoordinateMapping> GetLocation()

Returns

Returns coordinates of the location that was last chosen by the User.

GetLocation(String)

Retrieves the coordinates for a specific place/location.

Task<CoordinateMapping> GetLocation(string place)

Parameters

place String

The name of the place to retrieve coordinates for.

Returns

Returns the CoordinateMapping for the specified place, or null if not found.

GetUnlockedLocation()

Gets the next unlocked entry in CoordinateMappings and locks it for the next minute.

Task<CoordinateMapping> GetUnlockedLocation()

Returns

Returns the next available unlocked CoordinateMapping, or null if none available.

InsertNewPostalCode(CoordinateMapping)

Inserts a new combination of postalcode and coordinates.

Task InsertNewPostalCode(CoordinateMapping postalCodeLocation)

Parameters

postalCodeLocation CoordinateMapping

A CoordinateMapping instance that will be saved in the database.

Returns

Task

UpdateTime(Int32, DateTime)

Updates the timestamp of an entry in the Coordinates Database.

Task UpdateTime(int postalcode, DateTime newTime)

Parameters

postalcode Int32

Defines which entry will be updated.

newTime DateTime

Defines the new time for that entry.

Returns

Task