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: 1271 $ Last update: $Date: 2011-12-31 15:06:23 +0100 (sam, 31 déc 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)
          Deprecated. since 3.3 use findAllByCriteria(org.nuiton.wikitty.services.WikittyTransaction, org.nuiton.wikitty.search.Criteria)
 WikittyQueryResult<String> findAllByQuery(WikittyTransaction transaction, WikittyQuery queries)
          Find all values that satisfy queries constraint.
 TreeNodeResult<String> findAllChildrenCount(WikittyTransaction transaction, String wikittyId, int depth, boolean count, Criteria filter)
          Deprecated. since 3.3 use findAllChildrenCount(org.nuiton.wikitty.services.WikittyTransaction, java.lang.String, int, boolean, org.nuiton.wikitty.query.WikittyQuery)
 WikittyQueryResultTreeNode<String> findAllChildrenCount(WikittyTransaction transaction, String wikittyId, int depth, boolean count, WikittyQuery 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

@Deprecated
PagedResult<String> findAllByCriteria(WikittyTransaction transaction,
                                                 Criteria criteria)
Deprecated. since 3.3 use findAllByCriteria(org.nuiton.wikitty.services.WikittyTransaction, org.nuiton.wikitty.search.Criteria)


findAllByQuery

WikittyQueryResult<String> findAllByQuery(WikittyTransaction transaction,
                                          WikittyQuery queries)
Find all values that satisfy queries constraint. Values is Wikitty's id if there is no Select condition, otherwize is String that represent field value and can be String representation of Wikitty, Date, Boolean, Numeric, Binary, String

Parameters:
transaction -
queries -
Returns:
id of wikitties
Since:
3.3

findAllChildrenCount

@Deprecated
TreeNodeResult<String> findAllChildrenCount(WikittyTransaction transaction,
                                                       String wikittyId,
                                                       int depth,
                                                       boolean count,
                                                       Criteria filter)
Deprecated. since 3.3 use findAllChildrenCount(org.nuiton.wikitty.services.WikittyTransaction, java.lang.String, int, boolean, org.nuiton.wikitty.query.WikittyQuery)

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

findAllChildrenCount

WikittyQueryResultTreeNode<String> findAllChildrenCount(WikittyTransaction transaction,
                                                        String wikittyId,
                                                        int depth,
                                                        boolean count,
                                                        WikittyQuery 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
Since:
3.3


Copyright © 2009-2012 CodeLutin. All Rights Reserved.