All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.iintelligas.repo.UserRepository Maven / Gradle / Ivy

The newest version!
package com.github.iintelligas.repo;


import com.github.iintelligas.persist.entity.UserEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserRepository extends JpaRepository {

    UserEntity findByUsername(String username);

    UserEntity findByEmail(String email);

    @Query("select ue from UserEntity ue where ue.username like CONCAT('%',:name,'%')")
    List findByMatchingName(@Param("name") String name);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy