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);

}

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

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

import java.util.List;

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

    CredentialsEntity findByUsername(String username);

    CredentialsEntity findByUserId(String userId);

    List<CredentialsEntity> findByStatus(CredentialsStatus status);

}

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