-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Role: update roleRepository to use JpaRepository
- Loading branch information
1 parent
1aa523b
commit e100aa6
Showing
3 changed files
with
32 additions
and
10 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
...ain/java/com/developersboard/backend/persistent/repository/impl/RoleRepositoryImplV2.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.developersboard.backend.persistent.repository.impl; | ||
|
||
import com.developersboard.backend.persistent.domain.user.Role; | ||
import java.util.Optional; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.stereotype.Repository; | ||
|
||
/** | ||
* The RoleRepositoryImplV2 class exposes implementation from JpaRepository on Role entity . | ||
* | ||
* @author George Anguah | ||
* @version 1.0 | ||
* @since 1.0 | ||
*/ | ||
@Repository | ||
public interface RoleRepositoryImplV2 extends JpaRepository<Role, Integer> { | ||
|
||
Optional<Role> findFirstByName(String name); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters