@SuppressWarnings("unchecked")
Collection<BusinessObject> kvs = (Collection<BusinessObject>) getBusinessObjectService().findAll(scopedClass);
// to be configured via xml using blankOption
/*keyValues.add(new ConcreteKeyValue("", ""));*/
for (BusinessObject bo : kvs ) {
ScopedKeyValue kv = (ScopedKeyValue)bo;
if (kv.getScope().isEmpty()) {
keyValues.add(new ConcreteKeyValue(kv.getKey(), kv.getValue()));
} else {
for (Scope scope: kv.getScope()) {
if (StringUtils.equals(qualifiedMatterClassName, scope.getQualifiedClassName())) {
keyValues.add(new ConcreteKeyValue(kv.getKey(), kv.getValue()));
break;
}
}
}
}