[FEAT] add capability to support null queryOption to simplify API

This commit is contained in:
Edouard DUPIN 2024-05-23 23:03:54 +02:00
parent f1c3b88a00
commit 9bad883866

View File

@ -1,7 +1,6 @@
package org.kar.archidata.dataAccess;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.kar.archidata.dataAccess.options.AccessDeletedItems;
@ -25,10 +24,16 @@ public class QueryOptions {
if (elems == null || elems.length == 0) {
return;
}
Collections.addAll(this.options, elems);
for (final QueryOption elem : elems) {
add(elem);
}
}
public void add(final QueryOption option) {
if (option == null) {
return;
}
this.options.add(option);
}