org.alfresco.repo.webservice
Class AbstractQuery

java.lang.Object
  extended by org.alfresco.repo.webservice.AbstractQuery
All Implemented Interfaces:
java.io.Serializable, ServerQuery
Direct Known Subclasses:
AssociationQuery, ChildAssociationQuery, ParentAssociationQuery, SearchQuery, UserQuery

public abstract class AbstractQuery
extends java.lang.Object
implements ServerQuery

Abstract implementation of a QuerySession providing support for automatic id generation and provides support for paging through query results.

Before executing, all the services need to be set.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.alfresco.repo.webservice.ServerQuery
SYS_COL_ASSOC_NAME, SYS_COL_ASSOC_TYPE, SYS_COL_IS_PRIMARY, SYS_COL_NTH_SIBLING
 
Constructor Summary
AbstractQuery()
           
 
Method Summary
protected  org.alfresco.repo.webservice.types.ResultSetRowNode createResultSetRowNode(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.cmr.repository.NodeService nodeService)
          Create a result set row node object for the provided node reference
 java.lang.Object execute(org.alfresco.service.ServiceRegistry serviceRegistry, long maxResults)
          Override this method only if the query can limit the results without a post-query cut-off.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.alfresco.repo.webservice.ServerQuery
execute
 

Constructor Detail

AbstractQuery

public AbstractQuery()
Method Detail

execute

public java.lang.Object execute(org.alfresco.service.ServiceRegistry serviceRegistry,
                                long maxResults)
Override this method only if the query can limit the results without a post-query cut-off. Executes the query and return all results up to given maximum number. Note that this is not the same as the page size, but rather is a total upper limit to the number of results that can viewed.

Specified by:
execute in interface ServerQuery
maxResults - the total number of results to retrieve
Returns:
The full set of query results up to the maximum given. The results must be empty if there are no results.

createResultSetRowNode

protected org.alfresco.repo.webservice.types.ResultSetRowNode createResultSetRowNode(org.alfresco.service.cmr.repository.NodeRef nodeRef,
                                                                                     org.alfresco.service.cmr.repository.NodeService nodeService)
Create a result set row node object for the provided node reference

Parameters:
nodeRef - the node reference
nodeService - the node service
Returns:
the result set row node


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.