package io.ebeaninternal.server.expression;
import io.ebeaninternal.api.SpiNamedParam;
import java.util.Collection;
import java.util.List;
class NamedParamHelp {
static Object value(Object val) {
if (val instanceof SpiNamedParam) {
return ((SpiNamedParam) val).getValue();
}
return val;
}
static String valueAsString(Object val) {
Object value = value(val);
return (value == null) ? null : value.toString();
}
public static void valueAdd(List<Object> values, Object sourceValue) {
Object value = value(sourceValue);
if (value instanceof Collection) {
values.addAll((Collection<?>) value);
} else {
values.add(value);
}
}
}