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 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 - Holds Specification of UsersEntity object.
      pageRequest - Holds Pageable object.
      Returns:
      The Page of UsersEntity.
    • findByIdAndTypeAndCollectionId

      Optional<UsersEntity> findByIdAndTypeAndCollectionId(long id, int type, long collectionId)
      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 of UsersEntity object.
    • findByIdAndCollectionId

      Optional<UsersEntity> findByIdAndCollectionId(long id, long collectionId)
      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 of UsersEntity object.
    • findByIdAndStatusAndCollectionId

      Optional<UsersEntity> findByIdAndStatusAndCollectionId(long id, String status, long collectionId)
      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 of UsersEntity object.
    • findByCollectionIdAndTypeAndEmail

      Optional<UsersEntity> findByCollectionIdAndTypeAndEmail(long collectionId, int type, String email)
      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 of UsersEntity 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 of UsersEntity 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 of UsersEntity 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 of UsersEntity object.
    • findByCollectionIdAndIdentitiesIdentity

      Optional<UsersEntity> findByCollectionIdAndIdentitiesIdentity(long collectionId, String identity)
      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 of UsersEntity 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 of UsersEntity 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 of UsersEntity object.
    • findByUserNameAndCollectionId

      Optional<UsersEntity> findByUserNameAndCollectionId(String userName, long collectionId)
      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 of UsersEntity object.