class SearchIndexTypeDaoHelper {

    public SearchIndexTypeEntity getSearchIndexTypeEntity(String code) throws ObjectNotFoundException
    {
        SearchIndexTypeEntity searchIndexTypeEntity = searchIndexTypeDao.getSearchIndexTypeByCode(code);

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

        return searchIndexTypeEntity;
    }

}