View Javadoc

1   package com.atlassian.bonnie.search;
2   
3   import com.atlassian.bonnie.Handle;
4   import com.atlassian.bonnie.Searchable;
5   import org.apache.lucene.document.Document;
6   
7   /**
8    * Creates a Lucene {@link Document} from the supplied {@link org.apache.lucene.search.Searchable}.
9    */
10  public interface DocumentBuilder
11  {
12  	/**
13  	 * @param searchable
14  	 * @return a Lucene {@link Document} from the supplied {@link org.apache.lucene.search.Searchable}.
15  	 */
16  	Document getDocument(Searchable searchable);
17  
18  	/**
19  	 * @return A {@link com.atlassian.bonnie.Handle} by which the {@link com.atlassian.bonnie.AnyTypeObjectDao} (for example) can resolve any persistent object
20  	 * @see com.atlassian.bonnie.Handle
21  	 */
22  	Handle getHandle(Object obj);
23  }