Interface AddressesRepository

All Known Implementing Classes:
AddressesRepositoryImpl

public interface AddressesRepository
Repository interface responsible for CRUD operations on Address entities.
  • Method Details

    • findAllByUserId

      List<Address> findAllByUserId(UUID userId)
      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

      void save(@NotEmpty @NotEmpty List<AddressRequestDTO> address, UUID generatedUserId)
      Saves a list of addresses for a specified user ID.
      Parameters:
      address - a non-empty list of AddressRequestDTO objects to be saved
      generatedUserId - the UUID of the user to whom the addresses belong
    • findAllByUserIds

      List<Address> findAllByUserIds(Set<UUID> userIdSet)
      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

      void deleteByUserId(UUID id)
      Deletes all addresses associated with a specific user ID.
      Parameters:
      id - the UUID of the user whose addresses are to be deleted