Package org.openiam.esb.repository
Interface LoginRepository
-
- All Superinterfaces:
AbstractEntityRepository<LoginEntity,String>,AbstractKeyEntityCustomRepository<LoginEntity,String>,AbstractKeyEntityRepository<LoginEntity,String>,org.springframework.data.repository.CrudRepository<LoginEntity,String>,FindBeansRepositoryCustom<LoginEntity,LoginSearchBean>,org.springframework.data.jpa.repository.JpaRepository<LoginEntity,String>,org.springframework.data.jpa.repository.JpaSpecificationExecutor<LoginEntity>,LoginRepositoryCustom,org.springframework.data.repository.PagingAndSortingRepository<LoginEntity,String>,org.springframework.data.repository.query.QueryByExampleExecutor<LoginEntity>,org.springframework.data.repository.Repository<LoginEntity,String>
@Repository public interface LoginRepository extends AbstractKeyEntityRepository<LoginEntity,String>, LoginRepositoryCustom
This is repository for working with LoginEntity- Author:
- zaporozhec
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description intbulkResetPasswordChangeCount()List<LoginAuthenticationInformation>findAllSimplified()List<LoginEntity>findByUserId(String userId)replace public ListfindUser(String userId) from DAO List<LoginEntity>findByUserIdInAndManagedSysId(List<String> userIds, String defaultManagedSysId)replace public ListfindByUserIds(List userIds, String managedSysId) from DAO LoginEntityfindFirstByLowerCaseLoginAndManagedSysId(String login, String managedSysId)replace public LoginEntity getRecord(final String login, final String managedSysId) from DAOLoginEntityfindFirstByPswdResetToken(String token)replace public LoginEntity findByPasswordResetToken(String token) from DAOList<LoginEntity>findLockedUsers(Date startTime)List<LoginAuthenticationInformation>findSimplifiedByUserId(String userId)default LoginEntitygetRecord(String login, String managedSysId)Deprecated.voidupdatePassword(String id, String password)-
Methods inherited from interface org.openiam.esb.repository.AbstractEntityRepository
getPageable
-
Methods inherited from interface org.openiam.esb.repository.custom.AbstractKeyEntityCustomRepository
findByIdIn
-
Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, save
-
Methods inherited from interface org.openiam.esb.repository.custom.FindBeansRepositoryCustom
count, find, find, find, getByExample, getByExample, isValidSearchBean
-
Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository
deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, findAllById, flush, getById, getOne, getReferenceById, saveAll, saveAllAndFlush, saveAndFlush
-
Methods inherited from interface org.springframework.data.jpa.repository.JpaSpecificationExecutor
count, exists, findAll, findAll, findAll, findOne
-
Methods inherited from interface org.openiam.esb.repository.custom.LoginRepositoryCustom
findInactiveUsers, findUserNearPswdExp, findUserPswdExpYesterday
-
-
-
-
Method Detail
-
findByUserId
@Query("select l from LoginEntity l JOIN l.user u where u.id = :userId") List<LoginEntity> findByUserId(@Param("userId") String userId)replace public ListfindUser(String userId) from DAO - Parameters:
userId-- Returns:
-
findSimplifiedByUserId
@Query("SELECT new org.openiam.esb.core.auth.model.LoginAuthenticationInformation(l.password, l.user.id, l.id) FROM LoginEntity l WHERE l.user.id=:userId") List<LoginAuthenticationInformation> findSimplifiedByUserId(@Param("userId") String userId)
-
findAllSimplified
@Query("SELECT new org.openiam.esb.core.auth.model.LoginAuthenticationInformation(l.password, l.user.id, l.id) FROM LoginEntity l") List<LoginAuthenticationInformation> findAllSimplified()
-
bulkResetPasswordChangeCount
@Modifying @Query("UPDATE LoginEntity l SET l.passwordChangeCount = 0 WHERE l.passwordChangeCount <> 0") int bulkResetPasswordChangeCount()
-
updatePassword
@Modifying @Query("UPDATE LoginEntity l SET l.password=:password WHERE l.id=:id") void updatePassword(@Param("id") String id, @Param("password") String password)
-
findLockedUsers
@Query("select l from LoginEntity l where l.lockMarker= \'LOCKED\' and l.lastAuthAttempt >=:startTime") List<LoginEntity> findLockedUsers(@Param("startTime") Date startTime)- Parameters:
startTime-- Returns:
-
findFirstByPswdResetToken
@Query("select l from LoginEntity l where l.pswdResetToken= :pswdResetToken") LoginEntity findFirstByPswdResetToken(@Param("pswdResetToken") String token)replace public LoginEntity findByPasswordResetToken(String token) from DAO- Parameters:
token-- Returns:
-
findFirstByLowerCaseLoginAndManagedSysId
@Query("select l from LoginEntity l where l.lowerCaseLogin = :login and l.managedSysId=:managedSysId") LoginEntity findFirstByLowerCaseLoginAndManagedSysId(@Param("login") String login, @Param("managedSysId") String managedSysId)replace public LoginEntity getRecord(final String login, final String managedSysId) from DAO- Parameters:
login-managedSysId-- Returns:
-
findByUserIdInAndManagedSysId
@Query("select l from LoginEntity l JOIN l.user u where u.id IN (:userIds) AND l.managedSysId = :defaultManagedSysId") List<LoginEntity> findByUserIdInAndManagedSysId(@Param("userIds") List<String> userIds, @Param("defaultManagedSysId") String defaultManagedSysId)replace public ListfindByUserIds(List userIds, String managedSysId) from DAO - Parameters:
userIds-defaultManagedSysId-- Returns:
-
getRecord
@Deprecated default LoginEntity getRecord(String login, String managedSysId)
Deprecated.Use findFirstByLowerCaseLoginAndManagedSysId- Parameters:
login-managedSysId-- Returns:
-
-