protected void computeRelationships(MetaBean beanInfo, Map<String, MetaBean> cached) { for (MetaProperty prop : beanInfo.getProperties()) { String beanRef = (String) prop.getFeature(REF_BEAN_ID); if (beanRef != null) { prop.setMetaBean(cached.get(beanRef)); } } }
@Override protected void computeRelatedMetaBean(MetaProperty prop, String beanRef) { if (beanRef != null) { prop.setMetaBean(findForId(beanRef)); } else { super.computeRelatedMetaBean(prop, beanRef); } } }
/** * Compute a single related {@link MetaBean}. * * @param prop meta property * @param beanRef bean reference */ protected void computeRelatedMetaBean(MetaProperty prop, String beanRef) { Class<?> beanType = prop.getFeature(REF_BEAN_TYPE); if (beanType == null) { if (prop.getFeature(REF_CASCADE) != null) { // dynamic type resolution: prop.setMetaBean(new DynamicMetaBean(this)); } } else { prop.setMetaBean(findForClass(beanType)); } }