class EntityCrawlerService {

  public Cycle getCycleOfUnit(OkrUnit departmentToCheck) {
    if (departmentToCheck instanceof OkrCompany) {
      return this.getCycleOfCompany((OkrCompany) departmentToCheck);
    } else {
      return this.getCycleOfUnit(((OkrChildUnit) departmentToCheck).getParentOkrUnit());
    }
  }

}