Class GeoLocationServiceImpl

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      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.
      AddressRepository 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.List<Seller> getSellersByCountryCode​(java.lang.String countryCode)
      This method returns data as list.
      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)
      This method does search requests and returns data as list.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GeoLocationServiceImpl

        public GeoLocationServiceImpl()
    • Method Detail

      • searchAddresses

        public java.util.List<Address> searchAddresses​(java.lang.String query,
                                                       java.lang.String from,
                                                       java.lang.String to)
        Description copied from interface: GeoLocationService
        This method does search requests and returns data as list.
        Specified by:
        searchAddresses in interface GeoLocationService
        Parameters:
        query - search query
        from - field which filter and returned items
        to - field which filter and returned items
        Returns:
        database entities as list
      • getCountryByCode

        public Country getCountryByCode​(java.lang.String code)
        Description copied from interface: GeoLocationService
        This method returns database entity.
        Specified by:
        getCountryByCode in interface GeoLocationService
        Parameters:
        code - field for filter and return database entity
        Returns:
        database entity
      • getCountryCodeValue

        public java.lang.String getCountryCodeValue​(java.lang.String code)
        Description copied from interface: GeoLocationService
        This method returns database entity field name.
        Specified by:
        getCountryCodeValue in interface GeoLocationService
        Parameters:
        code - field for filter and return database entity field code's value
        Returns:
        value as text
      • getCountryBySellerId

        public Country getCountryBySellerId​(java.lang.String sellerId)
        Description copied from interface: GeoLocationService
        This method returns database entity.
        Specified by:
        getCountryBySellerId in interface GeoLocationService
        Parameters:
        sellerId - identification for filter and return database entity
        Returns:
        database entity
      • getCountryNameBySellerId

        public java.lang.String getCountryNameBySellerId​(java.lang.String sellerId)
        Description copied from interface: GeoLocationService
        This method returns database entity field name.
        Specified by:
        getCountryNameBySellerId in interface GeoLocationService
        Parameters:
        sellerId - identification for filter and return database entity field name
        Returns:
        value as text
      • getSellersByCountryCode

        public java.util.List<Seller> getSellersByCountryCode​(java.lang.String countryCode)
        Description copied from interface: GeoLocationService
        This method returns data as list.
        Specified by:
        getSellersByCountryCode in interface GeoLocationService
        Parameters:
        countryCode - field for database entity which filter and returned list of database entities
        Returns:
        database beans as list
      • createAddress

        @Transactional
        public java.util.Optional<Address> createAddress​(java.util.LinkedHashMap<java.lang.String,​java.lang.Object> addressAsMap)
        Description copied from interface: GeoLocationService
        This method creates a database entity.
        Specified by:
        createAddress in interface GeoLocationService
        Parameters:
        addressAsMap - map-representation of database entity
        Returns:
        optional value to externally interaction
      • createAddress

        @Transactional
        public java.util.Optional<Address> createAddress​(Address address)
        Description copied from interface: GeoLocationService
        This method creates a database entity.
        Specified by:
        createAddress in interface GeoLocationService
        Parameters:
        address - database entity
        Returns:
        optional value to externally interaction
      • saveAddress

        @Transactional
        public java.util.Optional<Address> saveAddress​(java.util.LinkedHashMap<java.lang.String,​java.lang.Object> addressAsMap)
        Description copied from interface: GeoLocationService
        This method save an updates of database entity.
        Specified by:
        saveAddress in interface GeoLocationService
        Parameters:
        addressAsMap - map-representation of database entity
        Returns:
        optional value to externally interaction
      • saveAddress

        @Transactional
        public java.util.Optional<Address> saveAddress​(Address address)
        Description copied from interface: GeoLocationService
        This method save an updates of database entity.
        Specified by:
        saveAddress in interface GeoLocationService
        Parameters:
        address - database entity
        Returns:
        optional value to externally interaction
      • removeAddressAndClean

        @Transactional
        public void removeAddressAndClean​(java.lang.String addressId)
        Description copied from interface: GeoLocationService
        This method removes a database entity and clean all relationships from another entities.
        Specified by:
        removeAddressAndClean in interface GeoLocationService
        Parameters:
        addressId - identification for database entity which will be removed
      • removeAddressesByIds

        @Transactional
        public void removeAddressesByIds​(java.util.ArrayList<java.lang.String> addressesIds)
        Description copied from interface: GeoLocationService
        This method removes a list of database entities.
        Specified by:
        removeAddressesByIds in interface GeoLocationService
        Parameters:
        addressesIds - the list of database entities which will be removed