private static void addAllEntityDescriptorsRecursively(List<EntityDescriptorType> resultList, EntitiesDescriptorType entitiesDescriptorType) { List<Object> entities = entitiesDescriptorType.getEntityDescriptor(); for (Object o : entities) { if (o instanceof EntitiesDescriptorType) { addAllEntityDescriptorsRecursively(resultList, (EntitiesDescriptorType) o); } else if (o instanceof EntityDescriptorType) { resultList.add((EntityDescriptorType) o); } else { throw new IllegalArgumentException("Wrong type: " + o.getClass()); } } } }
private static void addAllEntityDescriptorsRecursively(List<EntityDescriptorType> resultList, EntitiesDescriptorType entitiesDescriptorType) { List<Object> entities = entitiesDescriptorType.getEntityDescriptor(); for (Object o : entities) { if (o instanceof EntitiesDescriptorType) { addAllEntityDescriptorsRecursively(resultList, (EntitiesDescriptorType) o); } else if (o instanceof EntityDescriptorType) { resultList.add((EntityDescriptorType) o); } else { throw new IllegalArgumentException("Wrong type: " + o.getClass()); } } } }
private static void addAllEntityDescriptorsRecursively(List<EntityDescriptorType> resultList, EntitiesDescriptorType entitiesDescriptorType) { List<Object> entities = entitiesDescriptorType.getEntityDescriptor(); for (Object o : entities) { if (o instanceof EntitiesDescriptorType) { addAllEntityDescriptorsRecursively(resultList, (EntitiesDescriptorType) o); } else if (o instanceof EntityDescriptorType) { resultList.add((EntityDescriptorType) o); } else { throw new IllegalArgumentException("Wrong type: " + o.getClass()); } } } }
if (metadataProvider.isMultiple()) { EntitiesDescriptorType metadatas = (EntitiesDescriptorType) metadataProvider.getMetaData(); addAllEntityDescriptorsRecursively(resultList, metadatas); } else { EntityDescriptorType metadata = (EntityDescriptorType) metadataProvider.getMetaData();
if (metadataProvider.isMultiple()) { EntitiesDescriptorType metadatas = (EntitiesDescriptorType) metadataProvider.getMetaData(); addAllEntityDescriptorsRecursively(resultList, metadatas); } else { EntityDescriptorType metadata = (EntityDescriptorType) metadataProvider.getMetaData();
if (metadataProvider.isMultiple()) { EntitiesDescriptorType metadatas = (EntitiesDescriptorType) metadataProvider.getMetaData(); addAllEntityDescriptorsRecursively(resultList, metadatas); } else { EntityDescriptorType metadata = (EntityDescriptorType) metadataProvider.getMetaData();