@Test public void testFindAll() throws Exception { RequestDAO dao = injector.getInstance(RequestDAO.class); Set<Long> set = Collections.emptySet(); List<RequestEntity> list = dao.findByPks(set); Assert.assertEquals(0, list.size()); }
@RequiresSession public List<RequestEntity> findAll() { return daoUtils.selectAll(entityManagerProvider.get(), RequestEntity.class); }
RequestDAO { @RequiresSession public List<RequestEntity> findAll() { return daoUtils.selectAll(entityManagerProvider.get(), RequestEntity.class); } }
RequestDAO { @RequiresSession public List<RequestEntity> findAll() { return daoUtils.selectAll(entityManagerProvider.get(), RequestEntity.class); }  }
RequestDAO { @RequiresSession public List<RequestEntity> findAll() { return daoUtils.selectAll(entityManagerProvider.get(), RequestEntity.class); }  @RequiresSession RequestEntity findByPK(Long requestId); @RequiresSession List<RequestEntity> findByPks(Collection<Long> requestIds); @RequiresSession List<RequestEntity> findByPks(Collection<Long> requestIds, boolean refreshHint); @RequiresSession List<RequestEntity> findAll(); @RequiresSession List<Long> findAllRequestIds(int limit, boolean ascending); @RequiresSession List<RequestResourceFilterEntity> findAllResourceFilters(); @RequiresSession boolean isAllTasksCompleted(long requestId); @RequiresSession Long getLastStageId(long requestId); @Transactional void updateStatus(long requestId, HostRoleStatus status, HostRoleStatus displayStatus); @Transactional void create(RequestEntity requestEntity); @Transactional RequestEntity merge(RequestEntity requestEntity); @Transactional void remove(RequestEntity requestEntity); @Transactional void removeByPK(Long requestId); @RequiresSession List<Long> findAllRequestIds(int limit, boolean sortAscending, Long clusterId); }
RequestDAO { @RequiresSession public List<RequestEntity> findAll() { return daoUtils.selectAll(entityManagerProvider.get(), RequestEntity.class); }  @RequiresSession RequestEntity findByPK(Long requestId); @RequiresSession List<RequestEntity> findByPks(Collection<Long> requestIds); @RequiresSession List<RequestEntity> findByPks(Collection<Long> requestIds, boolean refreshHint); @RequiresSession List<RequestEntity> findAll(); @RequiresSession List<Long> findAllRequestIds(int limit, boolean ascending); @RequiresSession List<RequestResourceFilterEntity> findAllResourceFilters(); @RequiresSession boolean isAllTasksCompleted(long requestId); @RequiresSession Long getLastStageId(long requestId); @Transactional void updateStatus(long requestId, HostRoleStatus status, HostRoleStatus displayStatus); @Transactional void create(RequestEntity requestEntity); @Transactional RequestEntity merge(RequestEntity requestEntity); @Transactional void remove(RequestEntity requestEntity); @Transactional void removeByPK(Long requestId); @RequiresSession List<Long> findAllRequestIds(int limit, boolean sortAscending, Long clusterId);  }