throw ODataJPAModelException.throwException(ODataJPAModelException.FUNC_RETURN_TYPE_EXP.addContent(method
.getDeclaringClass(), method.getName()), null);
}
switch (returnType) {
case ENTITY_TYPE:
EntityType edmEntityType = null;
if (multiplicity == Multiplicity.ONE) {
edmEntityType = jpaEdmEntityTypeView.searchEdmEntityType(methodReturnType.getSimpleName());
} else if (multiplicity == Multiplicity.MANY) {
edmEntityType = jpaEdmEntityTypeView.searchEdmEntityType(getReturnTypeSimpleName(method));
}
if (edmEntityType == null) {
throw ODataJPAModelException.throwException(ODataJPAModelException.FUNC_RETURN_TYPE_ENTITY_NOT_FOUND
.addContent(method.getDeclaringClass(), method.getName(), methodReturnType.getSimpleName()), null);
}
functionReturnType.setTypeName(JPAEdmNameBuilder.build(schemaView, edmEntityType.getName()));
break;
case SCALAR:
EdmSimpleTypeKind edmSimpleTypeKind = JPATypeConvertor.convertToEdmSimpleType(methodReturnType, null);
functionReturnType.setTypeName(edmSimpleTypeKind.getFullQualifiedName());