@SuppressWarnings("ReturnOfCollectionOrArrayField") @JsonManagedReference("parent") @Override public LinkedList<TreeNode> getChildren() { if (children instanceof LinkedList) { return (LinkedList<TreeNode>) children; } else { return new LinkedList<>(children); } }
@JsonIgnore @JsonManagedReference("parent") public void setChildren(List<TreeNode> children) { if (children instanceof LinkedList) { this.children = children; } else { this.children = new LinkedList<>(children); } }
public AnnotationIntrospector.ReferenceProperty findReferenceType(AnnotatedMember paramAnnotatedMember) { JsonManagedReference localJsonManagedReference = (JsonManagedReference)paramAnnotatedMember.getAnnotation(JsonManagedReference.class); if (localJsonManagedReference != null) return AnnotationIntrospector.ReferenceProperty.managed(localJsonManagedReference.value()); JsonBackReference localJsonBackReference = (JsonBackReference)paramAnnotatedMember.getAnnotation(JsonBackReference.class); if (localJsonBackReference != null) return AnnotationIntrospector.ReferenceProperty.back(localJsonBackReference.value()); return null; }
public String findDeserializablePropertyName(AnnotatedField paramAnnotatedField) { JsonProperty localJsonProperty = (JsonProperty)paramAnnotatedField.getAnnotation(JsonProperty.class); if (localJsonProperty != null) return localJsonProperty.value(); if ((paramAnnotatedField.hasAnnotation(JsonDeserialize.class)) || (paramAnnotatedField.hasAnnotation(JsonView.class)) || (paramAnnotatedField.hasAnnotation(JsonBackReference.class)) || (paramAnnotatedField.hasAnnotation(JsonManagedReference.class))) return ""; return null; }
public String findSettablePropertyName(AnnotatedMethod paramAnnotatedMethod) { JsonProperty localJsonProperty = (JsonProperty)paramAnnotatedMethod.getAnnotation(JsonProperty.class); if (localJsonProperty != null) return localJsonProperty.value(); JsonSetter localJsonSetter = (JsonSetter)paramAnnotatedMethod.getAnnotation(JsonSetter.class); if (localJsonSetter != null) return localJsonSetter.value(); if ((paramAnnotatedMethod.hasAnnotation(JsonDeserialize.class)) || (paramAnnotatedMethod.hasAnnotation(JsonView.class)) || (paramAnnotatedMethod.hasAnnotation(JsonBackReference.class)) || (paramAnnotatedMethod.hasAnnotation(JsonManagedReference.class))) return ""; return null; }
/** * @return the jobEvents */ @JsonManagedReference("job-event") public List<JobEventEntity> getJobEvents() { return new ArrayList<>(this.jobEvents); }