/** * Method setUuid. * @param uuid String */ @JSON(include = false) public void setUuid(final String uuid) { this.uuid = uuid; }
public Boolean isAnnotated() { Method rm= getReadMethod(); if (rm != null) { if (rm.isAnnotationPresent(JSON.class)) { return rm.getAnnotation(JSON.class).include(); } } else if (property != null) { if (property.isAnnotationPresent(JSON.class)) { return property.getAnnotation(JSON.class).include(); } } return null; }
public boolean isIncluded(Field field) { PathExpression expression= matches(pathExpressions); if (expression != null) { return expression.isIncluded(); } if (field.isAnnotationPresent(JSON.class)) { return field.getAnnotation(JSON.class).include(); } if (serializationType == SerializationType.SHALLOW) { Class type= field.getType(); return !(type.isArray() || Iterable.class.isAssignableFrom(type)); } else { return true; } }
/** * Method getActive. * @return Boolean */ @JSON(include = false) public final Boolean getActive() { return this.active; }
/** * Method getUuid. * @return String */ @JSON(include = false) public String getUuid() { return this.uuid; } }
/** * Method getId. * @return String */ @JSON(include = false) public final String getId() { return this.id; }
/** * Method getVersion. * @return Integer */ @JSON(include = false) public final Integer getVersion() { return this.version; }
@JSON(include = true) public List<NamePair> pairs() { return pairs; }
@JSON public List<HealthFacility> getHealthFacilities() { return healthFacilities; }
@JSON public List<Community> getCommunities() { Collections.sort(communities, new Comparator<Community>() { public int compare(Community o1, Community o2) { return o1.getName().compareTo(o2.getName()); } }); return communities; }
@JSON public List<Region> getRegions(){ List<Region> regions = new ArrayList<Region>(); for (MotechLocation motechLocation : getChildLocations()) { regions.add((Region) motechLocation); } return regions; }
@JSON(include = false) public String contentType() { return headers.contentType(); }
@JSON public List<District> getDistricts(){ List<District> districts = new ArrayList<District>(); for (MotechLocation motechLocation : getChildLocations()) { districts.add((District) motechLocation); } return districts; } }
@JSON public List<SubDistrict> getSubDistricts() { List<SubDistrict> subDistricts = new ArrayList<SubDistrict>(); for (MotechLocation motechLocation : getChildLocations()) { subDistricts.add((SubDistrict) motechLocation); } return subDistricts; }
/** * Method getUpdatedDate. * @return Date */ @JSON(include = false) @JsonIgnore public final Date getUpdatedDate() { return this.updatedDate; }