jeudi 11 juin 2015

understand a SPRING DATA JPA (dao layer) project

Hi everybody, I'm a beginner & I want to understand a project's DAO layer,and it's developed by SPRING DATA JPA . I will take the entity "user" as example.so I have this Interface named
userRepository extends JpaRepository

what's the (Utilisateur, Long) is for ? and secondly

@Query("select u from Utilisateur u where u.login = :login")
Utilisateur findUserByLogin(@Param("login")String login);

I can't find an Implementation of this Interface in the project, so, Are we gonna work with this Interface directly to get data from DB ?

Thanks, & excuse my English :)

Aucun commentaire:

Enregistrer un commentaire