info.magnolia.cms.core.search
Class QueryResultImpl

java.lang.Object
  extended by info.magnolia.cms.core.search.QueryResultImpl
All Implemented Interfaces:
QueryResult

Deprecated. Since 4.5.4 we are using JCR query API.

public class QueryResultImpl
extends Object
implements QueryResult

Wrapping a JCR QueryResult. This class will filter the result according to the user's ACLs. You can use getContent(String) to retrieve nodes of a certain type. If the node's type doesn't match the nearest matching ancestors is add instead. This allows to search in paragraph content while retrieving a list of pages.

Version:
$Id$

Field Summary
protected  Map<String,String> dirtyHandles
          Deprecated.  
protected  HierarchyManager hm
          Deprecated. TODO dlipp: Remove - it's not used internally.
protected  long maxResultSize
          Deprecated.  
protected  Map<String,Collection<Content>> objectStore
          Deprecated. caches all previously queried objects.
protected  javax.jcr.query.QueryResult result
          Deprecated. Unfiltered result object.
 
Constructor Summary
protected QueryResultImpl(javax.jcr.query.QueryResult result, HierarchyManager hm)
          Deprecated.  
protected QueryResultImpl(javax.jcr.query.QueryResult result, HierarchyManager hm, long maxResultSize)
          Deprecated.  
 
Method Summary
protected  void build(javax.jcr.Node node, String[] nodeType, Collection<Content> collection)
          Deprecated. Traverses the hierarchy from the current node to the root until the node's type matches.
protected  void build(String nodeType, Collection<Content> collection)
          Deprecated. Adds all found nodes of a certain type.
 Collection<Content> getContent()
          Deprecated. Gets a collection of Content objects for mgnl:content NodeType.
 Collection<Content> getContent(String nodeType)
          Deprecated. Gets a collection of Content objects for specified NodeType.
 javax.jcr.query.QueryResult getJcrResult()
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

result

protected javax.jcr.query.QueryResult result
Deprecated. 
Unfiltered result object.


objectStore

protected Map<String,Collection<Content>> objectStore
Deprecated. 
caches all previously queried objects.


hm

protected HierarchyManager hm
Deprecated. 
TODO dlipp: Remove - it's not used internally.


maxResultSize

protected final long maxResultSize
Deprecated. 

dirtyHandles

protected Map<String,String> dirtyHandles
Deprecated. 
Constructor Detail

QueryResultImpl

protected QueryResultImpl(javax.jcr.query.QueryResult result,
                          HierarchyManager hm)
Deprecated. 

QueryResultImpl

protected QueryResultImpl(javax.jcr.query.QueryResult result,
                          HierarchyManager hm,
                          long maxResultSize)
Deprecated. 
Method Detail

getJcrResult

public javax.jcr.query.QueryResult getJcrResult()
Deprecated. 

build

protected void build(String nodeType,
                     Collection<Content> collection)
              throws javax.jcr.RepositoryException
Deprecated. 
Adds all found nodes of a certain type. If the type doesn't match it will traverse the ancestors and add them instead.

Throws:
javax.jcr.RepositoryException

build

protected void build(javax.jcr.Node node,
                     String[] nodeType,
                     Collection<Content> collection)
              throws javax.jcr.RepositoryException
Deprecated. 
Traverses the hierarchy from the current node to the root until the node's type matches.

Throws:
javax.jcr.RepositoryException

getContent

public Collection<Content> getContent()
Deprecated. 
Description copied from interface: QueryResult
Gets a collection of Content objects for mgnl:content NodeType.

Specified by:
getContent in interface QueryResult

getContent

public Collection<Content> getContent(String nodeType)
Deprecated. 
Description copied from interface: QueryResult
Gets a collection of Content objects for specified NodeType.

Specified by:
getContent in interface QueryResult


Copyright © 2003-2012 Magnolia International Ltd.. All Rights Reserved.