public DataCenterIpAddressDaoImpl() { super(); AllFieldsSearch = createSearchBuilder(); AllFieldsSearch.and("ip", AllFieldsSearch.entity().getIpAddress(), SearchCriteria.Op.EQ); AllFieldsSearch.and("dc", AllFieldsSearch.entity().getDataCenterId(), SearchCriteria.Op.EQ); AllFieldsSearch.done(); AllIpCount = createSearchBuilder(Integer.class); AllIpCount.select(null, Func.COUNT, AllIpCount.entity().getId()); AllIpCount.and("pod", AllIpCount.entity().getPodId(), SearchCriteria.Op.EQ); AllIpCount.done(); AllIpCountForDc = createSearchBuilder(Integer.class); AllIpCountForDc.select(null, Func.COUNT, AllIpCountForDc.entity().getId()); AllIpCountForDc.and("data_center_id", AllIpCountForDc.entity().getPodId(), SearchCriteria.Op.EQ); AllIpCountForDc.done(); AllAllocatedIpCount = createSearchBuilder(Integer.class); AllAllocatedIpCount.select(null, Func.COUNT, AllAllocatedIpCount.entity().getId()); AllAllocatedIpCount.and("pod", AllAllocatedIpCount.entity().getPodId(), SearchCriteria.Op.EQ); AllAllocatedIpCount.done(); AllAllocatedIpCountForDc = createSearchBuilder(Integer.class); AllAllocatedIpCountForDc.select(null, Func.COUNT, AllAllocatedIpCountForDc.entity().getId()); AllAllocatedIpCountForDc.and("data_center_id", AllAllocatedIpCountForDc.entity().getDataCenterId(), SearchCriteria.Op.EQ);