Interface AddressesRepository
- All Known Implementing Classes:
AddressesRepositoryImpl
public interface AddressesRepository
Repository interface responsible for CRUD operations on Address entities.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
deleteByUserId
(UUID id) Deletes all addresses associated with a specific user ID.findAllByUserId
(UUID userId) Retrieves all addresses associated with a specific user ID.findAllByUserIds
(Set<UUID> userIdSet) Retrieves all addresses associated with a set of user IDs.void
save
(@NotEmpty List<AddressRequestDTO> address, UUID generatedUserId) Saves a list of addresses for a specified user ID.
-
Method Details
-
findAllByUserId
Retrieves all addresses associated with a specific user ID.- Parameters:
userId
- the UUID of the user whose addresses are to be retrieved- Returns:
- a list of Address entities belonging to the given user
-
save
Saves a list of addresses for a specified user ID.- Parameters:
address
- a non-empty list of AddressRequestDTO objects to be savedgeneratedUserId
- the UUID of the user to whom the addresses belong
-
findAllByUserIds
Retrieves all addresses associated with a set of user IDs.- Parameters:
userIdSet
- a set of UUIDs representing the users- Returns:
- a list of Address entities belonging to the users in the provided set
-
deleteByUserId
Deletes all addresses associated with a specific user ID.- Parameters:
id
- the UUID of the user whose addresses are to be deleted
-