@Test public void testRemoveAll() throws Exception { create(); requestDAO.removeAll(clusterId); List<TopologyRequestEntity> requestEntities = requestDAO.findByClusterId(clusterId); Assert.assertEquals("All topology request entities associated with cluster should be removed !", 0, requestEntities.size()); }
@Transactional public void removeAll(Long clusterId) { List<TopologyRequestEntity> clusterTopologyRequests = findByClusterId(clusterId); for (TopologyRequestEntity topologyRequestEntity: clusterTopologyRequests) remove(topologyRequestEntity); }
TopologyRequestDAO { @Transactional public void removeAll(Long clusterId) { List<TopologyRequestEntity> clusterTopologyRequests = findByClusterId(clusterId); for (TopologyRequestEntity topologyRequestEntity: clusterTopologyRequests) remove(topologyRequestEntity); } }
TopologyRequestDAO { @Transactional public void removeAll(Long clusterId) { List<TopologyRequestEntity> clusterTopologyRequests = findByClusterId(clusterId); for (TopologyRequestEntity topologyRequestEntity: clusterTopologyRequests) remove(topologyRequestEntity); }  }
TopologyRequestDAO { @Transactional public void removeAll(Long clusterId) { List<TopologyRequestEntity> clusterTopologyRequests = findByClusterId(clusterId); for (TopologyRequestEntity topologyRequestEntity: clusterTopologyRequests) remove(topologyRequestEntity); }  @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 { @Transactional public void removeAll(Long clusterId) { List<TopologyRequestEntity> clusterTopologyRequests = findByClusterId(clusterId); for (TopologyRequestEntity topologyRequestEntity: clusterTopologyRequests) remove(topologyRequestEntity); }  @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);  }