Package com.cloud.utils.db

Examples of com.cloud.utils.db.SearchCriteria


        return details;
    }

    @Override
    public void deleteDetails(long dcId) {
        SearchCriteria sc = DcSearch.create();
        sc.setParameters("dcId", dcId);

        List<DcDetailVO> results = search(sc, null);
        for (DcDetailVO result : results) {
            remove(result.getId());
        }
View Full Code Here


    }

    @Override
    public PoolVO findPool(String poolName) {
        SearchCriteria sc = PoolSearch.create();
        sc.setParameters("name", poolName);
        List<PoolVO> poolList = listBy(sc);

        return (poolList.size() > 0 ? poolList.get(0) : null);
    }
View Full Code Here

    @Override
    public List<LunVO> listLunsByVolId(Long volId) {
        Filter searchFilter = new Filter(LunVO.class, "id", Boolean.TRUE, Long.valueOf(0), Long.valueOf(10000));

        SearchCriteria sc = LunSearch.create();
        sc.setParameters("volumeId", volId);
        List<LunVO> lunList = listBy(sc, searchFilter);

        return lunList;
    }
View Full Code Here

        return lunList;
    }

    @Override
    public LunVO findByName(String name) {
        SearchCriteria sc = LunNameSearch.create();
        sc.setParameters("name", name);
        return findOneBy(sc);
    }
View Full Code Here

        return details;
    }
   
    @Override
    public void deleteDetails(long dcId) {
        SearchCriteria sc = DcSearch.create();
        sc.setParameters("dcId", dcId);
       
        List<DcDetailVO> results = search(sc, null);
        for (DcDetailVO result : results) {
          remove(result.getId());
        }
View Full Code Here

        return details;
    }
   
    @Override
    public void deleteDetails(long hostId) {
        SearchCriteria sc = HostSearch.create();
        sc.setParameters("hostId", hostId);
       
        List<DetailVO> results = search(sc, null);
        for (DetailVO result : results) {
          remove(result.getId());
        }
View Full Code Here

       
  }

  @Override
    public PoolVO findPool(String poolName) {
        SearchCriteria sc = PoolSearch.create();
        sc.setParameters("name", poolName);
        List<PoolVO> poolList = listBy(sc);
       
        return(poolList.size()>0?poolList.get(0):null);
    }
View Full Code Here

  @Override
    public List<LunVO> listLunsByVolId(Long volId) {
    Filter searchFilter = new Filter(LunVO.class, "id", Boolean.TRUE, Long.valueOf(0), Long.valueOf(10000));
   
        SearchCriteria sc = LunSearch.create();
        sc.setParameters("volumeId", volId);
        List<LunVO> lunList = listBy(sc,searchFilter);
       
        return lunList;
    }
View Full Code Here

    }


  @Override
    public LunVO findByName(String name) {
        SearchCriteria sc = LunNameSearch.create();
        sc.setParameters("name", name);
        return findOneBy(sc);
    }
View Full Code Here

        return details;
    }

    @Override
    public void deleteDetails(long hostId) {
        SearchCriteria sc = HostSearch.create();
        sc.setParameters("hostId", hostId);

        List<DetailVO> results = search(sc, null);
        for (DetailVO result : results) {
            remove(result.getId());
        }
View Full Code Here

TOP

Related Classes of com.cloud.utils.db.SearchCriteria

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.