mirror of https://github.com/apache/cloudstack.git
CS-15590 : Conditions are corrected to be similar to other search wrapper usecases
This commit is contained in:
parent
c826fa295b
commit
c755172a3a
|
|
@ -45,6 +45,7 @@ public class ListConditionsCmd extends BaseListAccountResourcesCmd {
|
|||
@Parameter(name = ApiConstants.ID, type = CommandType.LONG, required = false, description = "ID of the Condition.")
|
||||
private Long id;
|
||||
|
||||
@IdentityMapper(entityTableName = "counter")
|
||||
@Parameter(name = ApiConstants.COUNTER_ID, type = CommandType.LONG, required = false, description = "Counter-id of the condition.")
|
||||
private Long counterId;
|
||||
|
||||
|
|
|
|||
|
|
@ -1038,11 +1038,11 @@ public class AutoScaleManagerImpl<Type> implements AutoScaleService, Manager {
|
|||
SearchCriteria<ConditionVO> sc = searchWrapper.buildSearchCriteria();
|
||||
|
||||
if (id != null) {
|
||||
sc.addAnd("id", SearchCriteria.Op.EQ, id);
|
||||
sc.setParameters("id", id);
|
||||
}
|
||||
|
||||
if (counterId != null) {
|
||||
sc.addAnd("counterId", SearchCriteria.Op.EQ, counterId);
|
||||
sc.setParameters("counterId", counterId);
|
||||
}
|
||||
|
||||
return searchWrapper.search();
|
||||
|
|
|
|||
Loading…
Reference in New Issue