org.alfresco.repo.search.results
Class ResultSetSPIWrapper

java.lang.Object
  extended by org.alfresco.repo.search.results.ResultSetSPIWrapper
All Implemented Interfaces:
java.lang.Iterable, ResultSet, ResultSetSPI

public class ResultSetSPIWrapper
extends java.lang.Object
implements ResultSet

Wrap an SPI result set with the basic interface


Constructor Summary
ResultSetSPIWrapper(ResultSetSPI wrapped)
          Create a wrapped result set
 
Method Summary
 void close()
          Close the result set and release any resources held/ The result set is bound to the transaction and will auto close at the end of the transaction.
 ChildAssociationRef getChildAssocRef(int n)
          Get the child assoc ref for a particular row.
 java.util.List getChildAssocRefs()
          Get a list of all the child associations in the results set.
 NodeRef getNodeRef(int n)
          Get the id of the node at the given index (if there is only one selector or no selector)
 java.util.List getNodeRefs()
          Get a list of all the node refs in the result set (if there is only one selector or no selector)
 ResultSetMetaData getResultSetMetaData()
          Get the meta data for the results set.
 ResultSetRow getRow(int i)
          Get a row from the result set by row index, starting at 0.
 float getScore(int n)
          Get the score for the node at the given position (if there is only one selector or no selector)
 int getStart()
          Get the start point for this results set in the overall set of rows that match the query - this will be equal to the skip count set when executing the query, and zero if this is not set.
 boolean hasMore()
          Was this result set curtailed - are there more pages to the result set?
 java.util.Iterator iterator()
           
 int length()
          Get the number of rows in this result set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResultSetSPIWrapper

public ResultSetSPIWrapper(ResultSetSPI wrapped)
Create a wrapped result set

Parameters:
wrapped -
Method Detail

close

public void close()
Description copied from interface: ResultSetSPI
Close the result set and release any resources held/ The result set is bound to the transaction and will auto close at the end of the transaction.

Specified by:
close in interface ResultSetSPI

getChildAssocRef

public ChildAssociationRef getChildAssocRef(int n)
Description copied from interface: ResultSetSPI
Get the child assoc ref for a particular row. (if there is only one selectoror no selector)

Specified by:
getChildAssocRef in interface ResultSetSPI
Parameters:
n - zero-based index
Returns:
the child assoc ref for the row if there is only one selector or no selector

getChildAssocRefs

public java.util.List getChildAssocRefs()
Description copied from interface: ResultSetSPI
Get a list of all the child associations in the results set. (if there is only one selectoror no selector)

Specified by:
getChildAssocRefs in interface ResultSetSPI
Returns:
the child assoc refs if there is only one selector or no selector *

getNodeRef

public NodeRef getNodeRef(int n)
Description copied from interface: ResultSetSPI
Get the id of the node at the given index (if there is only one selector or no selector)

Specified by:
getNodeRef in interface ResultSetSPI
Parameters:
n - zero-based index
Returns:
return the the node ref for the row if there is only one selector

getNodeRefs

public java.util.List getNodeRefs()
Description copied from interface: ResultSetSPI
Get a list of all the node refs in the result set (if there is only one selector or no selector)

Specified by:
getNodeRefs in interface ResultSetSPI
Returns:
the node refs if there is only one selector or no selector *

getResultSetMetaData

public ResultSetMetaData getResultSetMetaData()
Description copied from interface: ResultSetSPI
Get the meta data for the results set.

Specified by:
getResultSetMetaData in interface ResultSetSPI
Returns:
the metadata

getRow

public ResultSetRow getRow(int i)
Description copied from interface: ResultSetSPI
Get a row from the result set by row index, starting at 0.

Specified by:
getRow in interface ResultSetSPI
Parameters:
i - zero-based index
Returns:
return the row

getScore

public float getScore(int n)
Description copied from interface: ResultSetSPI
Get the score for the node at the given position (if there is only one selector or no selector)

Specified by:
getScore in interface ResultSetSPI
Parameters:
n - zero-based index
Returns:
return the score for the row if there is only one selector

getStart

public int getStart()
Description copied from interface: ResultSetSPI
Get the start point for this results set in the overall set of rows that match the query - this will be equal to the skip count set when executing the query, and zero if this is not set.

Specified by:
getStart in interface ResultSetSPI
Returns:
the position of the first result in the overall result set

hasMore

public boolean hasMore()
Description copied from interface: ResultSetSPI
Was this result set curtailed - are there more pages to the result set?

Specified by:
hasMore in interface ResultSetSPI
Returns:
true if there are more pages in the result set

length

public int length()
Description copied from interface: ResultSetSPI
Get the number of rows in this result set. This will be less than or equal to the maximum number of rows requested or the full length of the results set if no restriction on length are specified. If a skip count is given, the length represents the number of results after the skip count and does not include the items skipped.

Specified by:
length in interface ResultSetSPI
Returns:
the number of results. -1 means unknown and can be returned for lazy evaluations of permissions when the actual size is not known and evaluated upon request.

iterator

public java.util.Iterator iterator()
Specified by:
iterator in interface java.lang.Iterable


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