class SearchIndexDaoHelper {

    public SearchIndexEntity getSearchIndexEntity(SearchIndexKey searchIndexKey) throws ObjectNotFoundException
    {
        SearchIndexEntity searchIndexEntity = searchIndexDao.getSearchIndexByKey(searchIndexKey);

        if (searchIndexEntity == null)
        {
            throw new ObjectNotFoundException(String.format("Search index with name \"%s\" doesn't exist.", searchIndexKey.getSearchIndexName()));
        }

        return searchIndexEntity;
    }

}