接口 ResourceDao
- 所有超级接口:
org.springframework.data.repository.CrudRepository<Resource,,Long> io.geewit.data.jpa.essential.repository.EntityGraphCrudRepository<Resource,,Long> io.geewit.data.jpa.essential.repository.EntityGraphJpaRepository<Resource,,Long> io.geewit.data.jpa.essential.repository.EntityGraphJpaSpecificationExecutor<Resource>,io.geewit.data.jpa.essential.repository.EntityGraphPagingAndSortingRepository<Resource,,Long> org.springframework.data.jpa.repository.JpaRepository<Resource,,Long> org.springframework.data.jpa.repository.JpaSpecificationExecutor<Resource>,org.springframework.data.repository.PagingAndSortingRepository<Resource,,Long> org.springframework.data.repository.query.QueryByExampleExecutor<Resource>,org.springframework.data.repository.Repository<Resource,Long>
-
方法概要
修饰符和类型方法说明longcountByAppIdAndResourceCode(long appId, String resourceCode) 根据AppId和资源码记录查询数量voiddeleteById(Long id) findByAppIdAndResourceCode(long appId, String resourceCode) 根据AppId和资源码记录查询列表findByParentId(long parentId) findByServiceApiId(long serviceApiId) findResourceNamePairsByResourceIds(Collection<Long> resourceIds) intupdateStatus(long id, int status) 从接口继承的方法 org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, existsById, findById, save从接口继承的方法 io.geewit.data.jpa.essential.repository.EntityGraphCrudRepository
findAll, findAllById, findById从接口继承的方法 io.geewit.data.jpa.essential.repository.EntityGraphJpaSpecificationExecutor
findAll, findAll, findAll, findOne从接口继承的方法 io.geewit.data.jpa.essential.repository.EntityGraphPagingAndSortingRepository
findAll, findAll从接口继承的方法 org.springframework.data.jpa.repository.JpaRepository
deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, findAllById, flush, getById, getOne, saveAll, saveAllAndFlush, saveAndFlush从接口继承的方法 org.springframework.data.jpa.repository.JpaSpecificationExecutor
count, findAll, findAll, findAll, findOne从接口继承的方法 org.springframework.data.repository.PagingAndSortingRepository
findAll从接口继承的方法 org.springframework.data.repository.query.QueryByExampleExecutor
count, exists, findAll, findOne
-
方法详细资料
-
deleteById
@Transactional(rollbackFor=java.lang.Exception.class) @Modifying(flushAutomatically=true, clearAutomatically=true) @Query("delete from Resource r where r.resourceId = :resourceId") void deleteById(@Param("resourceId") Long id) -
findByParentId
-
updateStatus
@Transactional(rollbackFor=java.lang.Exception.class) @Modifying(flushAutomatically=true, clearAutomatically=true) @Query("update Resource r set r.status = :status where r.resourceId = :id") int updateStatus(@Param("id") long id, @Param("status") int status) -
findResourceNamePairsByResourceIds
@Transactional(readOnly=true) @Query("select new org.apache.commons.lang3.tuple.MutablePair(r.resourceId, r.resourceName) from Resource r where r.resourceId in :resourceIds") List<org.apache.commons.lang3.tuple.Pair<Long,String>> findResourceNamePairsByResourceIds(@Param("resourceIds") Collection<Long> resourceIds) -
findByAppIdAndResourceCode
@Transactional(readOnly=true) List<Resource> findByAppIdAndResourceCode(long appId, String resourceCode) 根据AppId和资源码记录查询列表- 参数:
appId- AppIdresourceCode- ResourceCode- 返回:
- List
-
countByAppIdAndResourceCode
@Transactional(readOnly=true) @Query("select count(r) from Resource r where r.appId = :appId and r.resourceCode = :resourceCode") long countByAppIdAndResourceCode(@Param("appId") long appId, @Param("resourceCode") String resourceCode) 根据AppId和资源码记录查询数量- 参数:
appId- AppIdresourceCode- ResourceCode- 返回:
- 数量
-
findByServiceApiId
-