Interface ApplicationDAO

All Superinterfaces:
org.springframework.data.repository.CrudRepository<ApplicationEntity,Long>, org.springframework.data.jpa.repository.JpaRepository<ApplicationEntity,Long>, org.springframework.data.repository.ListCrudRepository<ApplicationEntity,Long>, org.springframework.data.repository.ListPagingAndSortingRepository<ApplicationEntity,Long>, org.springframework.data.repository.PagingAndSortingRepository<ApplicationEntity,Long>, org.springframework.data.repository.query.QueryByExampleExecutor<ApplicationEntity>, org.springframework.data.repository.Repository<ApplicationEntity,Long>

@Component public interface ApplicationDAO extends org.springframework.data.jpa.repository.JpaRepository<ApplicationEntity,Long>
  • Method Details

    • findBySystemIsTrueAndUrl

      List<ApplicationEntity> findBySystemIsTrueAndUrl(String url)
    • getApplicationIds

      @Query("SELECT app.id FROM ApplicationEntity app\n") List<Long> getApplicationIds(org.springframework.data.domain.Sort sort)
    • getApplicationIds

      default List<Long> getApplicationIds()
    • getApplicationIds

      @Query("SELECT app.id FROM ApplicationEntity app\nWHERE LOWER(app.title) LIKE %?1%\nOR LOWER(app.description) like %?1%\nOR LOWER(app.url) LIKE %?1%\nORDER BY LOWER(app.title)\n") List<Long> getApplicationIds(String keyword, org.springframework.data.domain.Sort sort)
    • getApplicationIds

      default List<Long> getApplicationIds(String keyword)
    • getSystemApplicationIds

      @Query("SELECT app.id FROM ApplicationEntity app\nWHERE app.system = TRUE\n") List<Long> getSystemApplicationIds()
    • getApplicationIdsByBadge

      @Query("SELECT app.id FROM ApplicationEntity app\nWHERE app.badgeName = :badgeName\nOR (app.badgeName IS NULL AND app.url IN (:urls))\n") List<Long> getApplicationIdsByBadge(@Param("badgeName") String badgeName, @Param("urls") List<String> urls)
      Reverse lookup of the applications a badge is bound to. An explicit badgeName always wins; otherwise a Drawer or Portlet entry binds implicitly when its url matches one the plugin declares.
      Parameters:
      badgeName - the badge identifier
      urls - the drawer and/or portlet names declared by the plugin, never empty
      Returns:
      the matching application ids
    • getApplicationIdsByBadgeName

      @Query("SELECT app.id FROM ApplicationEntity app\nWHERE app.badgeName = :badgeName\n") List<Long> getApplicationIdsByBadgeName(@Param("badgeName") String badgeName)
    • findFavoriteAndMandatoryApplications

      @Query("SELECT new FavoriteApplicationEntity(favoriteApp.id, app, favoriteApp.userName, favoriteApp.order, favoriteApp.favorite)\nFROM ApplicationEntity app\nLEFT JOIN FavoriteApplicationEntity favoriteApp\nON app.id = favoriteApp.application.id AND favoriteApp.userName = :userName\nWHERE app.active = TRUE\nAND (\n app.isMandatory = TRUE\n OR (favoriteApp.id IS NOT NULL AND favoriteApp.favorite = TRUE)\n OR (favoriteApp.id IS NULL AND app.isDefault = TRUE)\n)\nORDER BY favoriteApp.order NULLS LAST, app.order NULLS LAST, app.isMandatory DESC\n") org.springframework.data.domain.Page<FavoriteApplicationEntity> findFavoriteAndMandatoryApplications(@Param("userName") String userName, org.springframework.data.domain.Pageable pageable)