Package com.skava.repository
Interface UsersRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<UsersEntity,
,Long> org.springframework.data.querydsl.QuerydslPredicateExecutor<UsersEntity>
,org.springframework.data.repository.Repository<UsersEntity,
Long>
public interface UsersRepository
extends org.springframework.data.repository.CrudRepository<UsersEntity,Long>, org.springframework.data.querydsl.QuerydslPredicateExecutor<UsersEntity>
This is UsersRepository interface.
Interface for generic CRUD operations of the Users entity.
This handles the below operations.
- Create
- Read
- Update
- Delete
- Author:
- Infosys Equinox
-
Method Summary
Modifier and TypeMethodDescriptionboolean
existsByIdAndCollectionId
(long userId, long collectionId) This is used to check whether user exist by userid and collection id.org.springframework.data.domain.Page<UsersEntity>
findAll
(org.springframework.data.jpa.domain.Specification<UsersEntity> specifications, org.springframework.data.domain.Pageable pageRequest) This is used to load all the users by specification.findByCollectionIdAndIdentitiesIdentity
(long collectionId, String identity) This is used to load users by collection id and identity.findByCollectionIdAndIdentitiesIdentityAndIdentitiesType
(long collectionId, String identity, int type) This is used to load the users by collection id, identity and type.findByCollectionIdAndTypeAndEmail
(long collectionId, int type, String email) This is used to load the users by email, type and collectionId.findByCollectionIdAndTypeAndPhoneNumber
(long collectionId, int type, String phoneNumber) This is used to load the users by phoneNumber, type and collectionId.findByCollectionIdAndTypeAndUserName
(long collectionId, int type, String userName) This is used to load the users by user name, type and collectionId.findByIdAndCollectionId
(long id, long collectionId) This is used to load the users by id and collectionId.findByIdAndStatusAndCollectionId
(long id, String status, long collectionId) This is used to load the users by id, status and collectionId.findByIdAndTypeAndCollectionId
(long id, int type, long collectionId) This is used to load the users by id, type and collectionId.findByPhoneNumberAndCollectionIdAndType
(String phoneNumber, long collectionId, int type) This is used to load the users by phoneNumber, type and collectionId.findByUserNameAndCollectionId
(String userName, long collectionId) This is used to load the users by user name and collectionId.findByUserNameAndCollectionIdAndType
(String userName, long collectionId, int type) This is used to load the users by user name, type and collectionId.Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findAll, findAllById, findById, save, saveAll
Methods inherited from interface org.springframework.data.querydsl.QuerydslPredicateExecutor
count, exists, findAll, findAll, findAll, findAll, findAll, findBy, findOne
-
Method Details
-
findAll
org.springframework.data.domain.Page<UsersEntity> findAll(org.springframework.data.jpa.domain.Specification<UsersEntity> specifications, org.springframework.data.domain.Pageable pageRequest) This is used to load all the users by specification.- Parameters:
specifications
- HoldsSpecification
ofUsersEntity
object.pageRequest
- HoldsPageable
object.- Returns:
- The
Page
ofUsersEntity
.
-
findByIdAndTypeAndCollectionId
This is used to load the users by id, type and collectionId.- Parameters:
id
- Indicates the user id.type
- Indicates the user type.collectionId
- Indicates the collection id.- Returns:
- The
Optional
ofUsersEntity
object.
-
findByIdAndCollectionId
This is used to load the users by id and collectionId.- Parameters:
id
- Indicates the id of the user.collectionId
- Indicates the collection id.- Returns:
- The
Optional
ofUsersEntity
object.
-
findByIdAndStatusAndCollectionId
This is used to load the users by id, status and collectionId.- Parameters:
id
- Indicates the id of the user.status
- Indicates the status of the user.collectionId
- Indicates the collection id of the user.- Returns:
- The
Optional
ofUsersEntity
object.
-
findByCollectionIdAndTypeAndEmail
This is used to load the users by email, type and collectionId.- Parameters:
email
- Indicates the email of the user.collectionId
- Indicates the collection id of the user.type
- Indicates the type of the user.- Returns:
- The
Optional
ofUsersEntity
object.
-
findByCollectionIdAndTypeAndPhoneNumber
Optional<UsersEntity> findByCollectionIdAndTypeAndPhoneNumber(long collectionId, int type, String phoneNumber) This is used to load the users by phoneNumber, type and collectionId.- Parameters:
phoneNumber
- Indicates the phone number of the user.collectionId
- Indicates the collection id of the user.type
- Indicates the type of the user.- Returns:
- The
Optional
ofUsersEntity
object.
-
findByCollectionIdAndTypeAndUserName
Optional<UsersEntity> findByCollectionIdAndTypeAndUserName(long collectionId, int type, String userName) This is used to load the users by user name, type and collectionId.- Parameters:
userName
- Indicates the user name of the user.collectionId
- Indicates the collection id of the user.type
- Indicates the type of the user.- Returns:
- The
Optional
ofUsersEntity
object.
-
findByCollectionIdAndIdentitiesIdentityAndIdentitiesType
Optional<UsersEntity> findByCollectionIdAndIdentitiesIdentityAndIdentitiesType(long collectionId, String identity, int type) This is used to load the users by collection id, identity and type.- Parameters:
collectionId
- Indicates the collection id of the user.identity
- Indicates the identity of the user.type
- Indicates the type of the user.- Returns:
- The
Optional
ofUsersEntity
object.
-
findByCollectionIdAndIdentitiesIdentity
This is used to load users by collection id and identity.- Parameters:
collectionId
- Indicates the collection id of the user.identity
- Indicates the identity of the user.- Returns:
- The
Optional
ofUsersEntity
object.
-
existsByIdAndCollectionId
boolean existsByIdAndCollectionId(long userId, long collectionId) This is used to check whether user exist by userid and collection id.- Parameters:
userId
- Indicates the id of the user.collectionId
- Indicates the collection id.- Returns:
- Boolean value true, if user exist by user id and collection id.
-
findByUserNameAndCollectionIdAndType
Optional<UsersEntity> findByUserNameAndCollectionIdAndType(String userName, long collectionId, int type) This is used to load the users by user name, type and collectionId.- Parameters:
userName
- Indicates the user name of the user.collectionId
- Indicates the collection id of the user.type
- Indicates the type of the user.- Returns:
- The
Optional
ofUsersEntity
object.
-
findByPhoneNumberAndCollectionIdAndType
Optional<UsersEntity> findByPhoneNumberAndCollectionIdAndType(String phoneNumber, long collectionId, int type) This is used to load the users by phoneNumber, type and collectionId.- Parameters:
phoneNumber
- Indicates the phone number of the user.collectionId
- Indicates the collection id of the user.type
- Indicates the type of the user.- Returns:
- The
Optional
ofUsersEntity
object.
-
findByUserNameAndCollectionId
This is used to load the users by user name and collectionId.- Parameters:
userName
- Indicates the user name of the user.collectionId
- Indicates the collection id of the user.- Returns:
- The
Optional
ofUsersEntity
object.
-