@@ -40,7 +40,7 @@ public Map<String, Object> getParams() {
4040 public Class <T > getClazz () {
4141 return clazz ;
4242 }
43-
43+
4444 public SearchQueryBuilder <T > appendList (List <String > list , String columnName ) {
4545 String paramName = paramFilter (columnName );
4646 if (list != null && !list .isEmpty ()) {
@@ -156,6 +156,21 @@ public SearchQueryBuilder<T> appendNumberRange(BigDecimal min, BigDecimal max, S
156156 return this ;
157157 }
158158
159+ public SearchQueryBuilder <T > appendPersonNamesList (List <String > list , String columnFirst , String columnMiddle , String columnLast ) {
160+ if (list != null && !list .isEmpty ()) {
161+ this .params .put ("namesList" , list );
162+ this .query += "AND (" + entityPrefix (columnFirst ) + " in :namesList " ;
163+ this .query += "OR " + entityPrefix (columnMiddle ) + " in :namesList " ;
164+ this .query += "OR " + entityPrefix (columnLast ) + " in :namesList " ;
165+ this .query += "OR concat(" + entityPrefix (columnFirst ) + ", ' ', " + entityPrefix (columnMiddle ) + ") in :namesList " ;
166+ this .query += "OR concat(" + entityPrefix (columnFirst ) + ", ' ', " + entityPrefix (columnLast ) + ") in :namesList " ;
167+ this .query += "OR concat(" + entityPrefix (columnMiddle ) + ", ' ', " + entityPrefix (columnLast ) + ") in :namesList " ;
168+ this .query += "OR concat(" + entityPrefix (columnFirst ) + ", ' ', " + entityPrefix (columnMiddle ) + ", ' ', " + entityPrefix (columnLast ) + ") in :namesList " ;
169+ this .query += ") " ;
170+ }
171+ return this ;
172+ }
173+
159174 public SearchQueryBuilder <T > appendGeoJSONArea (GeoJSONSearchArea area ) {
160175 // if (single != null && !single.isEmpty()) {
161176 // this.query += "AND " + entityPrefix(columnName) + " = :" + columnName + " ";
0 commit comments