[FEAT] add capability to support null queryOption to simplify API
This commit is contained in:
parent
f1c3b88a00
commit
9bad883866
@ -1,7 +1,6 @@
|
|||||||
package org.kar.archidata.dataAccess;
|
package org.kar.archidata.dataAccess;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.kar.archidata.dataAccess.options.AccessDeletedItems;
|
import org.kar.archidata.dataAccess.options.AccessDeletedItems;
|
||||||
@ -25,10 +24,16 @@ public class QueryOptions {
|
|||||||
if (elems == null || elems.length == 0) {
|
if (elems == null || elems.length == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Collections.addAll(this.options, elems);
|
for (final QueryOption elem : elems) {
|
||||||
|
add(elem);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void add(final QueryOption option) {
|
public void add(final QueryOption option) {
|
||||||
|
if (option == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.options.add(option);
|
this.options.add(option);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user