mirror of https://github.com/apache/cloudstack.git
Added findByDc(long dcId) to VolumeDao and VolumeDaoImpl.
This commit is contained in:
parent
12fc2b4c26
commit
0df3357cac
|
|
@ -47,6 +47,8 @@ public interface VolumeDao extends GenericDao<VolumeVO, Long>, StateDao<Volume.S
|
|||
|
||||
List<VolumeVO> findByPod(long podId);
|
||||
|
||||
List<VolumeVO> findByDc(long dcId);
|
||||
|
||||
List<VolumeVO> findByAccountAndPod(long accountId, long podId);
|
||||
|
||||
List<VolumeVO> findByTemplateAndZone(long templateId, long zoneId);
|
||||
|
|
|
|||
|
|
@ -197,6 +197,14 @@ public class VolumeDaoImpl extends GenericDaoBase<VolumeVO, Long> implements Vol
|
|||
return listBy(sc);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<VolumeVO> findByDc(long dcId) {
|
||||
SearchCriteria<VolumeVO> sc = AllFieldsSearch.create();
|
||||
sc.setParameters("data_center_id", dcId);
|
||||
|
||||
return listBy(sc);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<VolumeVO> findByAccountAndPod(long accountId, long podId) {
|
||||
SearchCriteria<VolumeVO> sc = AllFieldsSearch.create();
|
||||
|
|
|
|||
Loading…
Reference in New Issue