List<AutoScalePolicyConditionMapVO> autoScalePolicyConditionMapList = _autoScalePolicyConditionMapDao.listByAll(autoScalePolicy.getId(), null);
List<LbCondition> lbConditions = new ArrayList<LbCondition>();
for (AutoScalePolicyConditionMapVO autoScalePolicyConditionMap : autoScalePolicyConditionMapList) {
Condition condition = _conditionDao.findById(autoScalePolicyConditionMap.getConditionId());
Counter counter = _counterDao.findById(condition.getCounterid());
lbConditions.add(new LbCondition(counter, condition));
}
autoScalePolicies.add(new LbAutoScalePolicy(autoScalePolicy, lbConditions));
}
AutoScaleVmProfile autoScaleVmProfile = _autoScaleVmProfileDao.findById(vmGroup.getProfileId());
Long autoscaleUserId = autoScaleVmProfile.getAutoScaleUserId();