@SuppressWarnings({ "unchecked", "rawtypes" })
protected ControllerProxy<?, ?> getDynamicController(Class<?> keyType, Class<?> modelType, ModelMetadata model) {
ControllerProxy<?, ?> proxy = dynamicRestControllers.get(modelType);
if (proxy == null) {
DynamicRestController dynController = new DynamicRestController(model);
proxy = new ControllerProxyREST(dynController, model);
dynamicRestControllers.put(modelType, proxy);
}
return proxy;
}