Interface GeoLocationService
-
- All Known Implementing Classes:
GeoLocationServiceImpl
public interface GeoLocationService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description Address
addShippingAddress(java.lang.String sellerId, java.util.LinkedHashMap<java.lang.String,java.lang.Object> addressAsMap)
Adds shipping address to seller.java.util.Optional<Address>
createAddress(Address address)
This method creates a database entity.java.util.Optional<Address>
createAddress(java.util.LinkedHashMap<java.lang.String,java.lang.Object> addressAsMap)
This method creates a database entity.Address
findCompanyAddress(Address address)
This method is looking for the company address in the existing databaseAddressRepository
getAddressRepository()
java.util.List<Country>
getCountries()
This method returns database entities as list.Country
getCountryByCode(java.lang.String code)
This method returns database entity.Country
getCountryBySellerId(java.lang.String sellerId)
This method returns database entity.java.lang.String
getCountryCodeValue(java.lang.String code)
This method returns database entity field name.java.lang.String
getCountryNameBySellerId(java.lang.String sellerId)
This method returns database entity field name.java.util.Deque<java.util.Map<java.lang.String,java.lang.Object>>
getPaginationFilter(java.lang.String requestJson)
This method does calculation for a pages based on the request.java.util.List<Seller>
getSellersByCountryCode(java.lang.String countryCode)
This method returns data as list.java.util.Set<Address>
getShippingAddresses(java.lang.String sellerId)
Get saved shipping addresses.void
removeAddressAndClean(java.lang.String addressId)
This method removes a database entity and clean all relationships from another entities.void
removeAddressesByIds(java.util.ArrayList<java.lang.String> addressesIds)
This method removes a list of database entities.java.util.Optional<Address>
saveAddress(Address address)
This method save an updates of database entity.java.util.Optional<Address>
saveAddress(java.util.LinkedHashMap<java.lang.String,java.lang.Object> addressAsMap)
This method save an updates of database entity.java.util.List<Address>
searchAddresses(java.lang.String query, java.lang.String from, java.lang.String to)
Deprecated.java.util.LinkedHashSet<Country>
searchCountries(java.lang.String requestJson)
This method does search requests and returns data as list.org.springframework.data.domain.Page<Country>
searchCountriesPaged(java.lang.String requestJson)
This method does search requests and returns data as pages.
-
-
-
Method Detail
-
getAddressRepository
AddressRepository getAddressRepository()
-
getPaginationFilter
java.util.Deque<java.util.Map<java.lang.String,java.lang.Object>> getPaginationFilter(java.lang.String requestJson)
This method does calculation for a pages based on the request.- Parameters:
requestJson
- JSON-object of request contains an instructions for search queries- Returns:
- map-representation of data
-
searchCountries
java.util.LinkedHashSet<Country> searchCountries(java.lang.String requestJson)
This method does search requests and returns data as list.- Parameters:
requestJson
- search request- Returns:
- data transport entities as list
-
searchCountriesPaged
org.springframework.data.domain.Page<Country> searchCountriesPaged(java.lang.String requestJson)
This method does search requests and returns data as pages.- Parameters:
requestJson
- JSON-object of request contains an instructions for search queries- Returns:
- database entities separated to pages
-
searchAddresses
@Deprecated java.util.List<Address> searchAddresses(java.lang.String query, java.lang.String from, java.lang.String to)
Deprecated.This method does search requests and returns data as list.- Parameters:
query
- search queryfrom
- field which filter and returned itemsto
- field which filter and returned items- Returns:
- database entities as list
-
findCompanyAddress
Address findCompanyAddress(Address address)
This method is looking for the company address in the existing database- Parameters:
address
- input address entity- Returns:
- address of the company
-
getCountries
java.util.List<Country> getCountries()
This method returns database entities as list.- Returns:
- database entities as list
-
getCountryBySellerId
Country getCountryBySellerId(java.lang.String sellerId)
This method returns database entity.- Parameters:
sellerId
- identification for filter and return database entity- Returns:
- database entity
-
getCountryNameBySellerId
java.lang.String getCountryNameBySellerId(java.lang.String sellerId)
This method returns database entity field name.- Parameters:
sellerId
- identification for filter and return database entity field name- Returns:
- value as text
-
getCountryByCode
Country getCountryByCode(java.lang.String code)
This method returns database entity.- Parameters:
code
- field for filter and return database entity- Returns:
- database entity
-
getCountryCodeValue
java.lang.String getCountryCodeValue(java.lang.String code)
This method returns database entity field name.- Parameters:
code
- field for filter and return database entity field code's value- Returns:
- value as text
-
getSellersByCountryCode
java.util.List<Seller> getSellersByCountryCode(java.lang.String countryCode)
This method returns data as list.- Parameters:
countryCode
- field for database entity which filter and returned list of database entities- Returns:
- database beans as list
-
createAddress
java.util.Optional<Address> createAddress(java.util.LinkedHashMap<java.lang.String,java.lang.Object> addressAsMap)
This method creates a database entity.- Parameters:
addressAsMap
- map-representation of database entity- Returns:
- optional value to externally interaction
-
createAddress
java.util.Optional<Address> createAddress(Address address)
This method creates a database entity.- Parameters:
address
- database entity- Returns:
- optional value to externally interaction
-
saveAddress
java.util.Optional<Address> saveAddress(java.util.LinkedHashMap<java.lang.String,java.lang.Object> addressAsMap)
This method save an updates of database entity.- Parameters:
addressAsMap
- map-representation of database entity- Returns:
- optional value to externally interaction
-
saveAddress
java.util.Optional<Address> saveAddress(Address address)
This method save an updates of database entity.- Parameters:
address
- database entity- Returns:
- optional value to externally interaction
-
removeAddressAndClean
void removeAddressAndClean(java.lang.String addressId)
This method removes a database entity and clean all relationships from another entities.- Parameters:
addressId
- identification for database entity which will be removed
-
removeAddressesByIds
void removeAddressesByIds(java.util.ArrayList<java.lang.String> addressesIds)
This method removes a list of database entities.- Parameters:
addressesIds
- the list of database entities which will be removed
-
addShippingAddress
Address addShippingAddress(java.lang.String sellerId, java.util.LinkedHashMap<java.lang.String,java.lang.Object> addressAsMap)
Adds shipping address to seller.- Parameters:
sellerId
- seller IDaddressAsMap
- address- Returns:
- created Address
-
getShippingAddresses
java.util.Set<Address> getShippingAddresses(java.lang.String sellerId)
Get saved shipping addresses.- Parameters:
sellerId
- id of the seller to obtain addresses- Returns:
- addresses set
-
-