listphysicalnetworks: Honouring keyword parameter (#4511)

This commit is contained in:
davidjumani 2020-12-11 13:14:41 +05:30 committed by GitHub
parent edd5f23e8b
commit 28c67d267b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -3068,6 +3068,10 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService, C
sc.addAnd("name", SearchCriteria.Op.LIKE, "%" + name + "%");
}
if (keyword != null) {
sc.addAnd("name", SearchCriteria.Op.LIKE, "%" + keyword + "%");
}
Pair<List<PhysicalNetworkVO>, Integer> result = _physicalNetworkDao.searchAndCount(sc, searchFilter);
return new Pair<List<? extends PhysicalNetwork>, Integer>(result.first(), result.second());
}