org.nuiton.wikitty.storage
Class WikittySearchEngineInMemory
java.lang.Object
org.nuiton.wikitty.storage.WikittySearchEngineInMemory
- All Implemented Interfaces:
- WikittySearchEngine
public class WikittySearchEngineInMemory
- extends Object
- implements WikittySearchEngine
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
wikittyStorage
protected WikittyStorageInMemory wikittyStorage
WikittySearchEngineInMemory
public WikittySearchEngineInMemory(WikittyStorageInMemory wikittyStorage)
clear
public void clear(WikittyTransaction transaction)
- Description copied from interface:
WikittySearchEngine
- Remove all data in index
- Specified by:
clear in interface WikittySearchEngine
store
public void store(WikittyTransaction transaction,
Collection<Wikitty> wikitties,
boolean force)
- Description copied from interface:
WikittySearchEngine
- Store wikitty in storage
Tree are reindexed if necessary.
- Specified by:
store in interface WikittySearchEngine
force - if true, force indexation of wikitty, otherwize only dirty
or new wikitties are indexed
delete
public void delete(WikittyTransaction transaction,
Collection<String> idList)
throws WikittyException
- Description copied from interface:
WikittySearchEngine
- Delete all object with idList argument. If id is not valid or don't exist.
Tree are reindexed if necessary.
- Specified by:
delete in interface WikittySearchEngine
idList - list of ids to delete
- Throws:
WikittyException
checkRestriction
public boolean checkRestriction(Restriction restriction,
Wikitty w)
findAllByCriteria
public PagedResult<String> findAllByCriteria(WikittyTransaction transaction,
Criteria criteria)
- Specified by:
findAllByCriteria in interface WikittySearchEngine
findAllChildrenCount
public TreeNodeResult<String> findAllChildrenCount(WikittyTransaction transaction,
String wikittyId,
int depth,
boolean count,
Criteria filter)
- Description copied from interface:
WikittySearchEngine
- 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:
- w Node (4)
- child1 (3)
- child2 (4)
- child3 (2)
- subchild1 (1)
- subchild2 (5)
- child4 (3)
- child5 (7)
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
- Specified by:
findAllChildrenCount in interface WikittySearchEngine
wikittyId - root node to begindepth - depth of node returned, -1 to retrieve all child levelcount - if true return count of attachmentfilter - filter on attachment count
- Returns:
- Tree start with wikittyId as root
Copyright © 2009-2011 CodeLutin. All Rights Reserved.