for (Annotation[] annotationArr : annotations) {
Class<?> parameterType = parameterTypes[j++];
for (Annotation element : annotationArr) {
if (element instanceof Parameter) {
Parameter annotation = (Parameter) element;
FunctionImportParameter functionImportParameter = new FunctionImportParameter();
if (annotation.name().equals("")) {
throw ODataJPAModelException.throwException(ODataJPAModelException.FUNC_PARAM_NAME_EXP.addContent(method
.getDeclaringClass().getName(), method.getName()), null);
} else {
functionImportParameter.setName(annotation.name());
}
functionImportParameter.setType(JPATypeConvertor.convertToEdmSimpleType(parameterType, null));
functionImportParameter.setMode(annotation.mode().toString());
Facets facets = new Facets();
if (annotation.facets().maxLength() > 0) {
facets.setMaxLength(annotation.facets().maxLength());
}
if (annotation.facets().nullable() == false) {
facets.setNullable(false);
} else {
facets.setNullable(true);
}
if (annotation.facets().precision() > 0) {
facets.setPrecision(annotation.facets().precision());
}
if (annotation.facets().scale() >= 0) {
facets.setScale(annotation.facets().scale());
}
functionImportParameter.setFacets(facets);
mapping = new JPAEdmMappingImpl();
mapping.setJPAType(parameterType);