+ String annotation = returnModel.getAnnotation();
+ String refAttributes = returnModel.getRefattributes();
+ String subAttributes = returnModel.getSubattributes();
+ String modelAttributes = returnModel.getAttributes();
+
+ if (!Strings.isNullOrEmpty(annotation)) {
+ Map<String, String> rangeMap = Splitter.on(",").withKeyValueSeparator("=").split(annotation);
+ for (Entry<String, String> rangeMapEntry : rangeMap.entrySet()) {
+ if (rangeMapEntry.getValue().contains("range::")) {
+ String value = mapAttribute.get(rangeMapEntry.getKey().trim());
+ String[] tempString = rangeMapEntry.getValue().split("::")[1].split("-");
+ int startNum = Integer.parseInt(tempString[0]);
+ int endNum = Integer.parseInt(tempString[1]);
+ String returnString = "InvalidreturnModel Range:" + rangeMapEntry.getKey() + " must be between "
+ + startNum + " - " + endNum + ",";
+
+ if (value != null) {
+ if (PolicyUtils.isInteger(value.replace("\"", ""))) {
+ int result = Integer.parseInt(value.replace("\"", ""));
+ if (result < startNum || result > endNum) {
+ responseString.append(returnString);
+ valid = false;