Project

General

Profile

« Previous | Next » 

Revision b227bf36

Added by Ben Clark over 15 years ago

Minor problems discovered whilst refactoring CATE:
Corrections to User / Group / Authority impl
Changes due to upgrade of hibernate-search

View differences:

cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/dao/taxon/ITaxonDao.java
24 24
import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
25 25
import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
26 26
import eu.etaxonomy.cdm.persistence.dao.common.IIdentifiableDao;
27
import eu.etaxonomy.cdm.persistence.dao.common.ISearchableDao;
27 28
import eu.etaxonomy.cdm.persistence.dao.common.ITitledDao;
28 29
import eu.etaxonomy.cdm.persistence.fetch.CdmFetch;
29 30

  
......
31 32
 * @author a.mueller
32 33
 *
33 34
 */
34
public interface ITaxonDao extends IIdentifiableDao<TaxonBase>, ITitledDao<TaxonBase> {
35
public interface ITaxonDao extends IIdentifiableDao<TaxonBase>, ITitledDao<TaxonBase>, ISearchableDao<TaxonBase> {
35 36
	
36 37
	/**
37 38
	 * Returns a count of TaxonBase instances (or Taxon instances, if accepted == true, or Synonym instance, if accepted == false) 
......
245 246
	 * @return a list of TaxonBase instances
246 247
	 */
247 248
	public List<TaxonBase> findTaxaByName(Boolean accepted, String uninomial, String infragenericEpithet, String specificEpithet, String infraspecificEpithet, Rank rank, Integer pageSize, Integer pageNumber);
248

  
249
	/**
250
	 * Suggest a query that will return hits based upon an existing lucene query string (that is presumably misspelt and returns no hits)
251
	 * Used to implement "did you mean?"-type functionality using the lucene spellchecker.
252
	 * 
253
	 * @param string Query string to check
254
	 * @return a suggested query string that will return hits or null if no such alternative spelling can be found.
255
	 */
256
	public String suggestQuery(String string);
257
	
258
	/**
259
	 * Removes all TaxonBase entities from the index
260
	 */
261
	public void purgeIndex();
262

  
263
	/**
264
	 * Index all TaxonBase entities currenly in the database (useful in concert with purgeIndex() to (re-)create
265
	 * indexes or in the  case of corrupt indexes / mismatch between 
266
	 * the database and the free-text indices) 
267
	 */
268
	public void rebuildIndex();
269
	
270
	/**
271
	 * Calls optimize on the relevant index (useful periodically to increase response times on the free-text search)
272
	 */
273
	public void optimizeIndex();
274 249
}

Also available in: Unified diff