Interface DelegationRepo
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<JPADelegation,,String> DAO<Delegation>,DelegationDAO,org.springframework.data.repository.ListCrudRepository<JPADelegation,,String> org.springframework.data.repository.Repository<JPADelegation,String>
public interface DelegationRepo
extends org.springframework.data.repository.ListCrudRepository<JPADelegation,String>, DelegationDAO
-
Field Summary
Fields inherited from interface org.apache.syncope.core.persistence.api.dao.DAO
DEFAULT_SORT -
Method Summary
Modifier and TypeMethodDescriptionfindValidDelegating(String delegated, OffsetDateTime now) findValidFor(String delegating, String delegated, OffsetDateTime now) Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, saveMethods inherited from interface org.apache.syncope.core.persistence.api.dao.DAO
count, delete, deleteById, existsById, findAll, findById, saveMethods inherited from interface org.apache.syncope.core.persistence.api.dao.DelegationDAO
findByDelegated, findByDelegating, findByRolesMethods inherited from interface org.springframework.data.repository.ListCrudRepository
findAll, findAllById, saveAll
-
Method Details
-
findValidFor
@Query("SELECT e.id FROM #{#entityName} e WHERE e.delegating.id = :delegating AND e.delegated.id = :delegated AND e.startDate <= :now AND (e.endDate IS NULL OR e.endDate >= :now)") Optional<String> findValidFor(@Param("delegating") String delegating, @Param("delegated") String delegated, @Param("now") OffsetDateTime now) - Specified by:
findValidForin interfaceDelegationDAO
-
findValidDelegating
@Query("SELECT e.delegating.username FROM #{#entityName} e WHERE e.delegated.id = :delegated AND e.startDate <= :now AND (e.endDate IS NULL OR e.endDate >= :now)") List<String> findValidDelegating(@Param("delegated") String delegated, @Param("now") OffsetDateTime now) - Specified by:
findValidDelegatingin interfaceDelegationDAO
-