class SearchIndexStatusDaoHelper {

    public SearchIndexStatusEntity getSearchIndexStatusEntity(String code) throws ObjectNotFoundException
    {
        SearchIndexStatusEntity searchIndexStatusEntity = searchIndexStatusDao.getSearchIndexStatusByCode(code);

        if (searchIndexStatusEntity == null)
        {
            throw new ObjectNotFoundException(String.format("Search index status with code \"%s\" doesn't exist.", code));
        }

        return searchIndexStatusEntity;
    }

}