@JsonApiToMany private List<MetaAttribute> elements;
return false; } else if (toManyAnnotation != null) { return toManyAnnotation.lazy(); } else if (toOneAnnotation != null) { return toOneAnnotation.lazy();
private static String getOppositeName(List<Annotation> annotations) { for (Annotation annotation : annotations) { if (annotation instanceof JsonApiToMany) { return StringUtils.emptyToNull(((JsonApiToMany) annotation).opposite()); } if (annotation instanceof JsonApiToOne) { return StringUtils.emptyToNull(((JsonApiToOne) annotation).opposite()); } if (annotation instanceof JsonApiRelation) { return StringUtils.emptyToNull(((JsonApiRelation) annotation).opposite()); } } return null; }
@JsonApiToMany(opposite = "superType") private Set<MetaDataObject> subTypes = new HashSet<>(); private Map<String, MetaAttribute> attrMap = null; @JsonApiToMany private List<MetaAttribute> attributes = null; @JsonApiToMany private List<MetaAttribute> declaredAttributes = null; private MetaPrimaryKey primaryKey; @JsonApiToMany private Set<MetaKey> declaredKeys = new HashSet<>(); @JsonApiToMany private Set<MetaInterface> interfaces = new HashSet<>();
private MetaElement parent; @JsonApiToMany(opposite = "parent") private List<MetaElement> children = new ArrayList<>();