public static CommonJavaObjectForEdmx convertFromActionsNfunctions(CommonJavaObjectForEdmx comModel,
CDXEdmProvider edmxProvider, Map<String, String> namespaceToServMap) {
CommonJavaObjectForEdmx updatedComModel = comModel;
try {
List<CsdlAction> actions = edmxProvider.getSchemas().get(0).getActions();
for (CsdlAction action : actions) {
if (action.getReturnType() != null && !action.getReturnType().getType().startsWith("Edm")) {
FullQualifiedName fqn = action.getReturnType().getTypeFQN();
updatedComModel = addCsdlComplexOrEntityToComModel(comModel, edmxProvider, fqn, namespaceToServMap);
}
}
List<CsdlFunction> functions = edmxProvider.getSchemas().get(0).getFunctions();
for (CsdlFunction function : functions) {
if (function.getReturnType() != null && function.getReturnType().getType().startsWith("Edm")) {
FullQualifiedName fqn = function.getReturnType().getTypeFQN();
updatedComModel = addCsdlComplexOrEntityToComModel(updatedComModel, edmxProvider, fqn,
namespaceToServMap);
}
}
} catch (ODataException e) {
PojoGenUtil.logDebug(log, "Could not parse Action/Function return type");
}
return updatedComModel;
}