Interface ContactmethodsRepository

  • All Superinterfaces:
    org.springframework.data.repository.CrudRepository<Contactmethods,​java.util.UUID>, org.springframework.data.jpa.repository.JpaRepository<Contactmethods,​java.util.UUID>, org.springframework.data.repository.PagingAndSortingRepository<Contactmethods,​java.util.UUID>, org.springframework.data.repository.query.QueryByExampleExecutor<Contactmethods>, org.springframework.data.repository.Repository<Contactmethods,​java.util.UUID>

    @Repository
    public interface ContactmethodsRepository
    extends org.springframework.data.jpa.repository.JpaRepository<Contactmethods,​java.util.UUID>
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.List<Contactmethods> find​(ContactmethodType contactmethod, java.lang.String contactvalue)
      Find all the Contactmethods objects from the given contact value and the given ContactmethodType.
      java.util.List<Contactmethods> findContactmethods​(ContactmethodType contactmethod, Users user)
      Find all the Contactmethods objects from the given user and the given ContactmethodType.
      • Methods inherited from interface org.springframework.data.repository.CrudRepository

        count, delete, deleteAll, deleteAll, deleteById, existsById, findById, save
      • Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository

        deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, findAllById, flush, getOne, saveAll, saveAndFlush
      • Methods inherited from interface org.springframework.data.repository.PagingAndSortingRepository

        findAll
      • Methods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor

        count, exists, findAll, findOne
    • Method Detail

      • find

        @Query("select distinct cm from Contactmethods cm where cm.contactmethod=:contactmethod and cm.contactvalue=:contactvalue")
        java.util.List<Contactmethods> find​(@Param("contactmethod")
                                            ContactmethodType contactmethod,
                                            @Param("contactvalue")
                                            java.lang.String contactvalue)
        Find all the Contactmethods objects from the given contact value and the given ContactmethodType.
        Parameters:
        contactmethod - the contact method
        contactvalue - the contact value
        Returns:
        the list of the found Contactmethods objects.
      • findContactmethods

        @Query("select distinct cm from UserInfos u inner join u.contactmethods cm where u.owner=:user and cm.contactmethod=:contactmethod")
        java.util.List<Contactmethods> findContactmethods​(@Param("contactmethod")
                                                          ContactmethodType contactmethod,
                                                          @Param("user")
                                                          Users user)
        Find all the Contactmethods objects from the given user and the given ContactmethodType.
        Parameters:
        contactmethod - the contact method
        user - the user
        Returns:
        the list of the found Contactmethods objects.