org.openprivacy.reptile.search.impl
Class PeerSearchProvider

java.lang.Object
  |
  +--org.openprivacy.reptile.search.AbstractSearchProvider
        |
        +--org.openprivacy.reptile.search.impl.DBSearchProvider
              |
              +--org.openprivacy.reptile.search.impl.PeerSearchProvider
All Implemented Interfaces:
SearchProvider

public class PeerSearchProvider
extends DBSearchProvider

Handles searching articles in the OM database article store.

Version:
$Id: PeerSearchProvider.java,v 1.1 2002/03/18 09:26:38 burton Exp $
Author:
Kevin A. Burton
See Also:
SearchProvider, AbstractSearchProvider

Field Summary
 
Fields inherited from class org.openprivacy.reptile.search.impl.DBSearchProvider
defaultSearchFields, defaultSortOrder
 
Fields inherited from interface org.openprivacy.reptile.search.SearchProvider
STATE_NEVER_SEARCHED, STATE_SEARCH_COMPLETE, STATE_SEARCH_IN_PROGRESS
 
Constructor Summary
PeerSearchProvider()
          Create a new PeerSearchProvider instance.
 
Method Summary
 void destroy()
           Called before garbage collection by the SearchProviderGCThread.
 void record(SearchRecord record)
           Get the given SearchRecord from this SearchProvider.
 
Methods inherited from class org.openprivacy.reptile.search.impl.DBSearchProvider
getResults, search
 
Methods inherited from class org.openprivacy.reptile.search.AbstractSearchProvider
assertSearchable, getHandle, getResultCount, getSearchCompletedTime, getSearchRequest, getSearchStartTime, getState, getState, getTimeCreated, isSearchable, setResultCount, setSearchCompletedTime, setSearchRequest, setSearchStartTime, setState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PeerSearchProvider

public PeerSearchProvider()
Create a new PeerSearchProvider instance.

Method Detail

record

public void record(SearchRecord record)
            throws java.lang.Exception
Description copied from interface: SearchProvider

Get the given SearchRecord from this SearchProvider.

It is important that all SearchProviders implement this method correctly.

The given implementation needs to fill in all necessary information into this SearchRecord, this includes the title, description, etc.

Note. This is basically a visitor pattern. Callers use a search provider and then fetch a record from the SearchProvider by index.

Throws:
java.lang.Exception - When an invalid SearchRecord index is used
See Also:
SearchProvider.record(org.openprivacy.reptile.search.SearchRecord)

destroy

public void destroy()
Description copied from interface: SearchProvider

Called before garbage collection by the SearchProviderGCThread. If your search provider needs to perform any garbage collection it should do so here.

If your SearchProvider has executed an asynchronous query, it should abort this before returning.

See Also:
SearchProvider.destroy()