Package com.dzidzi.api
Interface AddressApi
public interface AddressApi
AddressApi contains all the api operations for handling
Address of DzidziApp.-
Method Summary
Modifier and TypeMethodDescriptioncreateAddress(AddAddressRequest addAddressRequest) It adds a new address.voiddeleteAddress(UUID id) It deletes an address.editAddressRequest(ChangeAddressRequest changeAddressRequest) It changes a field of an existing address.findAddressById(UUID id) It finds address by the given id.findAddressByStreet(String street) It finds the list of addresses by the street name.findAll()It finds all the addresses and sort them by the street name in asc.
-
Method Details
-
findAddressById
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
It adds a new address.- Parameters:
addAddressRequest- theAddAddressRequestto create a new address- Returns:
- the address created/added
-
editAddressRequest
It changes a field of an existing address.- Parameters:
changeAddressRequest- theChangeAddressRequestcontaining the address fields to change of an existing address- Returns:
- the changed address
-
findAddressByStreet
It finds the list of addresses by the street name.- Parameters:
street- the street name to search- Returns:
- the list of addresses found
-
deleteAddress
It deletes an address.- Parameters:
id- the id of the address to delete
-
findAll
It finds all the addresses and sort them by the street name in asc.- Returns:
- the list of all addresses
-