Interface AddressApi


public interface AddressApi
AddressApi contains all the api operations for handling Address of DzidziApp.
  • Method Details

    • findAddressById

      Address findAddressById(UUID id)
      It finds address by the given id.
      Parameters:
      id - the id of the address
      Returns:
      the address found
      Throws:
      com.dzidzi.exception.EntityNotFoundException - when entity is not found
    • createAddress

      Address createAddress(AddAddressRequest addAddressRequest)
      It adds a new address.
      Parameters:
      addAddressRequest - the AddAddressRequest to create a new address
      Returns:
      the address created/added
    • editAddressRequest

      Address editAddressRequest(ChangeAddressRequest changeAddressRequest)
      It changes a field of an existing address.
      Parameters:
      changeAddressRequest - the ChangeAddressRequest containing the address fields to change of an existing address
      Returns:
      the changed address
    • findAddressByStreet

      List<Address> findAddressByStreet(String street)
      It finds the list of addresses by the street name.
      Parameters:
      street - the street name to search
      Returns:
      the list of addresses found
    • deleteAddress

      void deleteAddress(UUID id)
      It deletes an address.
      Parameters:
      id - the id of the address to delete
    • findAll

      List<Address> findAll()
      It finds all the addresses and sort them by the street name in asc.
      Returns:
      the list of all addresses