@Test public void testFindByClusterId() throws Exception { create(); testRequestEntity(requestDAO.findByClusterId(clusterId)); }
@RequiresSession public List<TopologyRequestEntity> findByClusterId(long clusterId) { TypedQuery<TopologyRequestEntity> query = entityManagerProvider.get() .createNamedQuery("TopologyRequestEntity.findByClusterId", TopologyRequestEntity.class); query.setParameter("clusterId", clusterId); return daoUtils.selectList(query); }
TopologyRequestDAO { @RequiresSession public List<TopologyRequestEntity> findByClusterId(long clusterId) { TypedQuery<TopologyRequestEntity> query = entityManagerProvider.get() .createNamedQuery("TopologyRequestEntity.findByClusterId", TopologyRequestEntity.class); query.setParameter("clusterId", clusterId); return daoUtils.selectList(query); } }
TopologyRequestDAO { @RequiresSession public List<TopologyRequestEntity> findByClusterId(long clusterId) { TypedQuery<TopologyRequestEntity> query = entityManagerProvider.get() .createNamedQuery("TopologyRequestEntity.findByClusterId", TopologyRequestEntity.class); query.setParameter("clusterId", clusterId); return daoUtils.selectList(query); }  }
TopologyRequestDAO { @RequiresSession public List<TopologyRequestEntity> findByClusterId(long clusterId) { TypedQuery<TopologyRequestEntity> query = entityManagerProvider.get() .createNamedQuery("TopologyRequestEntity.findByClusterId", TopologyRequestEntity.class); query.setParameter("clusterId", clusterId); return daoUtils.selectList(query); }  @RequiresSession TopologyRequestEntity findById(Long id); @RequiresSession List<TopologyRequestEntity> findByClusterId(long clusterId); @RequiresSession List<TopologyRequestEntity> findAll(); @Transactional void create(TopologyRequestEntity requestEntity); @Transactional TopologyRequestEntity merge(TopologyRequestEntity requestEntity); @Transactional void remove(TopologyRequestEntity requestEntity); @Transactional void removeByPK(Long requestId); @Transactional void removeAll(Long clusterId); }
TopologyRequestDAO { @RequiresSession public List<TopologyRequestEntity> findByClusterId(long clusterId) { TypedQuery<TopologyRequestEntity> query = entityManagerProvider.get() .createNamedQuery("TopologyRequestEntity.findByClusterId", TopologyRequestEntity.class); query.setParameter("clusterId", clusterId); return daoUtils.selectList(query); }  @RequiresSession TopologyRequestEntity findById(Long id); @RequiresSession List<TopologyRequestEntity> findByClusterId(long clusterId); @RequiresSession List<TopologyRequestEntity> findAll(); @Transactional void create(TopologyRequestEntity requestEntity); @Transactional TopologyRequestEntity merge(TopologyRequestEntity requestEntity); @Transactional void remove(TopologyRequestEntity requestEntity); @Transactional void removeByPK(Long requestId); @Transactional void removeAll(Long clusterId);  }