/** * Check the mappedBy attributes for properties on this descriptor. * <p> * This will read join information defined on the 'owning/other' side of the * relationship. It also does some extra work for unidirectional * relationships. * </p> */ private void checkMappedBy(DeployBeanInfo<?> info, List<DeployBeanPropertyAssocOne<?>> primaryKeyJoinCheck) { for (DeployBeanPropertyAssocOne<?> oneProp : info.getDescriptor().propertiesAssocOne()) { if (!oneProp.isTransient()) { if (oneProp.getMappedBy() != null) { checkMappedByOneToOne(oneProp); } else if (oneProp.isPrimaryKeyJoin()) { primaryKeyJoinCheck.add(oneProp); } } } for (DeployBeanPropertyAssocMany<?> manyProp : info.getDescriptor().propertiesAssocMany()) { if (!manyProp.isTransient()) { if (manyProp.isManyToMany()) { checkMappedByManyToMany(manyProp); } else { checkMappedByOneToMany(info, manyProp); } } } }
/** * Check the mappedBy attributes for properties on this descriptor. * <p> * This will read join information defined on the 'owning/other' side of the * relationship. It also does some extra work for unidirectional * relationships. * </p> */ private void checkMappedBy(DeployBeanInfo<?> info, List<DeployBeanPropertyAssocOne<?>> primaryKeyJoinCheck) { for (DeployBeanPropertyAssocOne<?> oneProp : info.getDescriptor().propertiesAssocOne()) { if (!oneProp.isTransient()) { if (oneProp.getMappedBy() != null) { checkMappedByOneToOne(oneProp); } else if (oneProp.isPrimaryKeyJoin()) { primaryKeyJoinCheck.add(oneProp); } } } for (DeployBeanPropertyAssocMany<?> manyProp : info.getDescriptor().propertiesAssocMany()) { if (!manyProp.isTransient()) { if (manyProp.isManyToMany()) { checkMappedByManyToMany(manyProp); } else { checkMappedByOneToMany(info, manyProp); } } } }