collection.addAll((Collection<?>) entity.portList());
}
if (object instanceof CompositeEntity) {
CompositeEntity entity = (CompositeEntity) object;
if (includeEntities) {
collection.addAll((Collection<?>) entity.entityList());
}
if (includeRelations) {
collection.addAll((Collection<?>) entity.relationList());
}
}