use of org.killbill.billing.tenant.dao.TenantKVModelDao in project killbill by killbill.
the class DefaultTenantUserApi method searchTenantKeyValues.
@Override
public Map<String, List<String>> searchTenantKeyValues(String searchKey, TenantContext context) throws TenantApiException {
final InternalTenantContext internalContext = internalCallContextFactory.createInternalTenantContextWithoutAccountRecordId(context);
final List<TenantKVModelDao> daoResult = tenantDao.searchTenantKeyValues(searchKey, internalContext);
final Map<String, List<String>> result = new HashMap<String, List<String>>();
for (final TenantKVModelDao cur : daoResult) {
if (!result.containsKey(cur.getTenantKey())) {
result.put(cur.getTenantKey(), new ArrayList<String>());
}
result.get(cur.getTenantKey()).add(cur.getTenantValue());
}
return result;
}
Aggregations