org.nuiton.wikitty.storage
Interface WikittySearchEngine

All Known Implementing Classes:
WikittySearchEngineInMemory

public interface WikittySearchEngine

WikittySearchEngine is used to abstract search engine used in WikittyService.

Version:
$Revision: 699 $ Last update: $Date: 2011-01-31 13:13:07 +0100 (lun., 31 janv. 2011) $ by : $Author: bpoussin $
Author:
poussin

Method Summary
 void clear(WikittyTransaction transaction)
          Remove all data in index
 void delete(WikittyTransaction transaction, Collection<String> idList)
          Delete all object with idList argument.
 PagedResult<String> findAllByCriteria(WikittyTransaction transaction, Criteria criteria)
           
 TreeNodeResult<String> findAllChildrenCount(WikittyTransaction transaction, String wikittyId, int depth, boolean count, Criteria filter)
          Find all children ids with attachment count for a node wikitty.
 void store(WikittyTransaction transaction, Collection<Wikitty> wikitties, boolean force)
          Store wikitty in storage Tree are reindexed if necessary.
 

Method Detail

clear

void clear(WikittyTransaction transaction)
Remove all data in index


store

void store(WikittyTransaction transaction,
           Collection<Wikitty> wikitties,
           boolean force)
Store wikitty in storage Tree are reindexed if necessary.

Parameters:
force - if true, force indexation of wikitty, otherwize only dirty or new wikitties are indexed

delete

void delete(WikittyTransaction transaction,
            Collection<String> idList)
            throws WikittyException
Delete all object with idList argument. If id is not valid or don't exist. Tree are reindexed if necessary.

Parameters:
idList - list of ids to delete
Throws:
WikittyException

findAllByCriteria

PagedResult<String> findAllByCriteria(WikittyTransaction transaction,
                                      Criteria criteria)

findAllChildrenCount

TreeNodeResult<String> findAllChildrenCount(WikittyTransaction transaction,
                                            String wikittyId,
                                            int depth,
                                            boolean count,
                                            Criteria filter)
Find all children ids with attachment count for a node wikitty. If same attachment found many time in subtree this attachment is count only once. If we have: return count for: child1(3), child2(4), child3(8), child4(3), child5(7) and for the child3 count we have count of subchild1 and subchild2 in Node and subchild are returned according to depth

Parameters:
transaction -
wikittyId - root node to begin
depth - depth of node returned, -1 to retrieve all child level
count - if true return count of attachment
filter - filter on attachment count
Returns:
Tree start with wikittyId as root
Throws:
WikittyException - if wikittyId is not WikittyTreeNode


Copyright © 2009-2011 CodeLutin. All Rights Reserved.