Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * #%L
   * Wikitty :: api
   * %%
   * Copyright (C) 2009 - 2010 CodeLutin, Benjamin Poussin
   * %%
   * This program is free software: you can redistribute it and/or modify
   * it under the terms of the GNU Lesser General Public License as 
   * published by the Free Software Foundation, either version 3 of the 
  * License, or (at your option) any later version.
  * 
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Lesser Public License for more details.
  * 
  * You should have received a copy of the GNU General Lesser Public 
  * License along with this program.  If not, see
  * <http://www.gnu.org/licenses/lgpl-3.0.html>.
  * #L%
  */
 
 package org.nuiton.wikitty.storage;
 
 import java.util.Map;
WikittySearchEngine is used to abstract search engine used in WikittyService.

Author(s):
poussin
Version:
$Revision$ Last update: $Date$ by : $Author$
 
 public interface WikittySearchEngine {

    
Remove all data in index
 
     public void clear(WikittyTransaction transaction);

    
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
 
     public void store(WikittyTransaction transaction,
             Collection<Wikittywikittiesboolean force);

    
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:
org.nuiton.wikitty.WikittyException
 
     public void delete(WikittyTransaction transaction,
             Collection<StringidListthrows WikittyException;

    
 
     @Deprecated
     public PagedResult<StringfindAllByCriteria(WikittyTransaction transactionCriteria criteria);
    
    
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. Or TODO (map? array?)

Parameters:
transaction
queries
Returns:
id of wikitties
Since:
3.3
 
             WikittyTransaction transactionWikittyQuery queries);

    
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

Deprecated:
since 3.3 use
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:
org.nuiton.wikitty.WikittyException if wikittyId is not WikittyTreeNode
    @Deprecated
            String wikittyIdint depthboolean countCriteria 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:
  • 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

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:
org.nuiton.wikitty.WikittyException if wikittyId is not WikittyTreeNode
Since:
3.3
            String wikittyIdint depthboolean countWikittyQuery filter);
New to GrepCode? Check out our FAQ X