Package com.skava.repository
Interface AddressesRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<AddressesEntity,
,Long> org.springframework.data.repository.Repository<AddressesEntity,
Long>
public interface AddressesRepository
extends org.springframework.data.repository.CrudRepository<AddressesEntity,Long>
This is AddressesRepository interface.
Interface for generic CRUD operations of the Addresses entity.
This handles the below operations.
- Create
- Read
- Update
- Delete
- Author:
- Infosys Equinox
-
Method Summary
Modifier and TypeMethodDescriptionfindByUserId
(long userId) This is used to load the list of address by userId.findOneByIdAndUserId
(long id, long userId) This is used to load address by addressId and userId.Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findAll, findAllById, findById, save, saveAll
-
Method Details
-
findByUserId
This is used to load the list of address by userId.- Parameters:
userId
- Indicates the user id for which user the address gets loaded.- Returns:
- The list of
AddressesEntity
object.
-
findOneByIdAndUserId
This is used to load address by addressId and userId.- Parameters:
id
- Indicates the address id for loading the address.userId
- Indicates the user id for which user the address gets loaded.- Returns:
- The optional of
AddressesEntity
object.
-