package sg.ncl.service.authentication.data.jpa.repositories;

import org.springframework.data.jpa.repository.JpaRepository;
import sg.ncl.service.authentication.data.jpa.entities.CredentialsEntity;

/**
 * @author Christopher Zhong
 */
public interface CredentialsRepository extends JpaRepository<CredentialsEntity, Long> {

    CredentialsEntity findByUsername(String username);

    CredentialsEntity findByUserId(String userId);

}

@@ -190,16 +190,103 @@
 sEntity;
+%0Aimport sg.ncl.service.authentication.domain.CredentialsStatus;%0A%0Aimport java.util.List;
 %0A%0A/**%0A *
@@ -513,10 +513,79 @@
 erId);%0A%0A
+    List%3CCredentialsEntity%3E findByStatus(CredentialsStatus status);%0A%0A
 %7D%0A

Add ability to return a list of credentials based on status (DEV-99)