private boolean isChildUnit(String childNumber, String parentNumber) { UnitService unitService = KcServiceLocator.getService(UnitService.class); Unit childUnit = unitService.getUnit(childNumber); Unit parentUnit = unitService.getUnit(parentNumber); return childUnit == null || parentUnit == null ? false : childUnit.isParentUnit(parentUnit); }