use of org.mifos.framework.components.audit.persistence.LegacyAuditLookupValuesDao in project head by mifos.
the class AuditConfiguration method callMethodToCreateValueMap.
//FIXME I use reflect for invoking methods of Dao (Not type safe)
private Map<String, String> callMethodToCreateValueMap(String methodName, Short localeId) throws SystemException {
valueMap = new HashMap<String, String>();
Method[] methods = LegacyAuditLookupValuesDao.class.getMethods();
for (Method method : methods) {
if (method.getName().equalsIgnoreCase(methodName)) {
try {
LegacyAuditLookupValuesDao legacyAuditLookupValuesDao = ApplicationContextProvider.getBean(LegacyAuditLookupValuesDao.class);
valueMap = (Map<String, String>) method.invoke(legacyAuditLookupValuesDao, new Object[] { localeId });
} catch (Exception e) {
throw new SystemException(e);
}
}
}
return valueMap;
}
Aggregations