Added findByPodId(Long podId) to HostDao and HostDaoImpl.

This commit is contained in:
Boris Schrijver 2015-09-16 22:13:10 +02:00
parent 1525ac0791
commit 0648cb9804
2 changed files with 10 additions and 0 deletions

View File

@ -45,6 +45,8 @@ public interface VolumeDao extends GenericDao<VolumeVO, Long>, StateDao<Volume.S
List<VolumeVO> findByInstanceIdDestroyed(long vmId);
List<VolumeVO> findByPod(long podId);
List<VolumeVO> findByAccountAndPod(long accountId, long podId);
List<VolumeVO> findByTemplateAndZone(long templateId, long zoneId);

View File

@ -189,6 +189,14 @@ public class VolumeDaoImpl extends GenericDaoBase<VolumeVO, Long> implements Vol
return listBy(sc);
}
@Override
public List<VolumeVO> findByPod(long podId) {
SearchCriteria<VolumeVO> sc = AllFieldsSearch.create();
sc.setParameters("pod", podId);
return listBy(sc);
}
@Override
public List<VolumeVO> findByAccountAndPod(long accountId, long podId) {
SearchCriteria<VolumeVO> sc = AllFieldsSearch.create();