class LocationDaoImpl implements LocationDao {

  public SearchDTO addSortBy(SearchDTO searchDtO) {
    if (MapUtils.isNotEmpty(searchDtO.getAdditionalProperties())
        && searchDtO.getAdditionalProperties().containsKey(JsonKey.FILTERS)
        && searchDtO.getAdditionalProperties().get(JsonKey.FILTERS) instanceof Map
        && ((Map<String, Object>) searchDtO.getAdditionalProperties().get(JsonKey.FILTERS))
            .containsKey(JsonKey.TYPE)) {
      if (MapUtils.isEmpty(searchDtO.getSortBy())) {
        ProjectLogger.log(
            "LocationDaoImpl:search:addSortBy added sort type name attribute.",
            LoggerEnum.INFO.name());
        searchDtO.getSortBy().put(JsonKey.NAME, DEFAULT_SORT_BY);
      }
    }

    return searchDtO;
  }

}