接口 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>

public interface ResourceDao extends io.geewit.data.jpa.essential.repository.EntityGraphJpaRepository<Resource,Long>, io.geewit.data.jpa.essential.repository.EntityGraphJpaSpecificationExecutor<Resource>
  • 方法概要

    修饰符和类型
    方法
    说明
    long
    countByAppIdAndResourceCode(long appId, String resourceCode)
    根据AppId和资源码记录查询数量
    void
     
    findByAppIdAndResourceCode(long appId, String resourceCode)
    根据AppId和资源码记录查询列表
    findByParentId(long parentId)
     
    findByServiceApiId(long serviceApiId)
     
    List<org.apache.commons.lang3.tuple.Pair<Long,String>>
     
    int
    updateStatus(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)
      指定者:
      deleteById 在接口中 org.springframework.data.repository.CrudRepository<Resource,Long>
    • findByParentId

      @Transactional(readOnly=true) List<Resource> findByParentId(long parentId)
    • 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 - AppId
      resourceCode - 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 - AppId
      resourceCode - ResourceCode
      返回:
      数量
    • findByServiceApiId

      @Transactional(readOnly=true) @Query("select rel.resource from com.xforceplus.entity.ResourceApiRel rel where rel.serviceApiId = :serviceApiId") List<Resource> findByServiceApiId(long serviceApiId)