Interface WhiteListDestinationRepository

All Superinterfaces:
org.springframework.data.repository.CrudRepository<WhiteListDestination,Integer>, org.springframework.data.repository.Repository<WhiteListDestination,Integer>

@Repository public interface WhiteListDestinationRepository extends org.springframework.data.repository.CrudRepository<WhiteListDestination,Integer>
Spring Data repository used to access the destinations whitelist. See WhiteListDestination.
  • Method Details

    • findByName

      @Query(nativeQuery=true, value="SELECT w.* FROM destination_whitelist w WHERE w.name = :name") WhiteListDestination findByName(@Param("name") String name)
      Find WhiteListDestination by name.
      Parameters:
      name - WhiteListDestination
      Returns:
      The WhiteListDestination
    • findByNameAndUserId

      @Query(nativeQuery=true, value="SELECT w.* FROM destination_whitelist w WHERE w.name = :name and w.user_id = :userId") WhiteListDestination findByNameAndUserId(@Param("name") String name, @Param("userId") String userId)
      Find WhiteListDestination by name and user id.
      Parameters:
      name - WhiteListDestination
      userId - User identification
      Returns:
      The WhiteListDestination
    • findByEmail

      @Query(nativeQuery=true, value="SELECT w.* FROM destination_whitelist w WHERE w.address = :address") WhiteListDestination findByEmail(@Param("address") String address)
      Find WhiteListDestination by address.
      Parameters:
      address - WhiteListDestination
      Returns:
      The WhiteListDestination
    • findByUserId

      @Query(nativeQuery=true, value="SELECT w.* FROM destination_whitelist w WHERE w.user_id = :userId") List<WhiteListDestination> findByUserId(@Param("userId") String userId)
      Find WhiteListDestination by user id.
      Parameters:
      userId - user id
      Returns:
      The WhiteListDestination