Pr/id in as collection2 (#1034)

* ENH: Changed  idIn(List) to idIn(Collection)

* ADD: sanity checks in IdBinder & special case if ID-list is empty
This commit is contained in:
Roland Praml
2017-06-19 22:05:56 +12:00
committed by Rob Bygrave
parent c454e1f8a7
commit a1f95bf25e
10 changed files with 55 additions and 38 deletions
@@ -18,7 +18,6 @@ import io.ebeaninternal.api.SpiQuery;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.Map;
/**
@@ -448,11 +447,11 @@ public class DefaultExpressionFactory implements SpiExpressionFactory {
}
/**
* Id IN a list of id values.
* Id IN a collection of id values.
*/
@Override
public Expression idIn(List<?> idList) {
return new IdInExpression(idList);
public Expression idIn(Collection<?> idCollection) {
return new IdInExpression(idCollection);
}
/**