@@ -586,6 +586,7 @@ public Pair<List<? extends Site2SiteCustomerGateway>, Integer> searchForCustomer
586586 boolean listAll = cmd .listAll ();
587587 long startIndex = cmd .getStartIndex ();
588588 long pageSizeVal = cmd .getPageSizeVal ();
589+ String keyword = cmd .getKeyword ();
589590
590591 Account caller = CallContext .current ().getCallingAccount ();
591592 List <Long > permittedAccounts = new ArrayList <Long >();
@@ -602,12 +603,17 @@ public Pair<List<? extends Site2SiteCustomerGateway>, Integer> searchForCustomer
602603 _accountMgr .buildACLSearchBuilder (sb , domainId , isRecursive , permittedAccounts , listProjectResourcesCriteria );
603604
604605 sb .and ("id" , sb .entity ().getId (), SearchCriteria .Op .EQ );
606+ sb .and ("name" , sb .entity ().getName (), SearchCriteria .Op .LIKE );
605607
606608 SearchCriteria <Site2SiteCustomerGatewayVO > sc = sb .create ();
607609 _accountMgr .buildACLSearchCriteria (sc , domainId , isRecursive , permittedAccounts , listProjectResourcesCriteria );
608610
609611 if (id != null ) {
610- sc .addAnd ("id" , SearchCriteria .Op .EQ , id );
612+ sc .setParameters ("id" , id );
613+ }
614+ if (keyword != null && !keyword .isEmpty ())
615+ {
616+ sc .setParameters ("name" , "%" + keyword + "%" );
611617 }
612618
613619 Pair <List <Site2SiteCustomerGatewayVO >, Integer > result = _customerGatewayDao .searchAndCount (sc , searchFilter );
0 commit comments