/** Recursive search for child by id. */ protected ProgressStatusBase findById(String id) { if (id == null || id.isEmpty()) { return null; } if (id.equals(getId())) { return this; } for (ChildProgressStatus child : getChildProgressStatuses()) { ProgressStatusBase result = child.getProgressStatus().findById(id); if (result != null) { return result; } } return null; }
/** Recursive search for child by id. */ protected ProgressStatusBase findById(String id) { if (id == null || id.isEmpty()) { return null; } if (id.equals(getId())) { return this; } for (ChildProgressStatus child : getChildProgressStatuses()) { ProgressStatusBase result = child.getProgressStatus().findById(id); if (result != null) { return result; } } return null; }