org.alfresco.repo.search
Class AbstractResultSetRow

java.lang.Object
  extended by org.alfresco.repo.search.AbstractResultSetRow
All Implemented Interfaces:
ResultSetRow
Direct Known Subclasses:
ChildAssocRefResultSetRow, DetachedResultSetRow, LuceneResultSetRow, SortedResultSetRow

public abstract class AbstractResultSetRow
extends java.lang.Object
implements ResultSetRow

Common support for a row in a result set


Field Summary
protected  java.util.Map properties
          The direct properties of the current node Used by those implementations that can cache the whole set.
 
Constructor Summary
AbstractResultSetRow(ResultSet resultSet, int index)
          The row needs the result set and the index for lookup.
 
Method Summary
 ChildAssociationRef getChildAssocRef()
           
protected  java.util.Map getDirectProperties()
           
 int getIndex()
          Get the index of this result set in the result set If you want the overall position in paged reults you have to add the skipCount fo the result set.
 NodeRef getNodeRef()
          The reference to the node that equates to this row in the result set
 QName getQName()
           
 ResultSet getResultSet()
          Get the containing result set
 float getScore()
          Get the score for this row in the result set
 java.io.Serializable getValue(QName qname)
          Get a node property value by name
 java.io.Serializable getValue(java.lang.String columnName)
          Get the data for a single column
 java.util.Map getValues()
          Get the values of all available node properties.
protected  void setProperties(java.util.Map byQname)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.alfresco.service.cmr.search.ResultSetRow
getNodeRef, getNodeRefs, getScore, getScores
 

Field Detail

properties

protected java.util.Map properties
The direct properties of the current node Used by those implementations that can cache the whole set.

Constructor Detail

AbstractResultSetRow

public AbstractResultSetRow(ResultSet resultSet,
                            int index)
The row needs the result set and the index for lookup.

Parameters:
resultSet -
index -
Method Detail

getResultSet

public ResultSet getResultSet()
Description copied from interface: ResultSetRow
Get the containing result set

Specified by:
getResultSet in interface ResultSetRow
Returns:
Returns the containing resultset

getIndex

public int getIndex()
Description copied from interface: ResultSetRow
Get the index of this result set in the result set If you want the overall position in paged reults you have to add the skipCount fo the result set.

Specified by:
getIndex in interface ResultSetRow
Returns:

getNodeRef

public NodeRef getNodeRef()
Description copied from interface: ResultSetRow
The reference to the node that equates to this row in the result set

Specified by:
getNodeRef in interface ResultSetRow
Returns:
Returns the reference to the node that makes this result

getQName

public QName getQName()
Specified by:
getQName in interface ResultSetRow
Returns:
Returns the name of the child association leading down to the node represented by this row

getChildAssocRef

public ChildAssociationRef getChildAssocRef()
Specified by:
getChildAssocRef in interface ResultSetRow
Returns:
Returns the child assoc ref for this row

getScore

public float getScore()
Description copied from interface: ResultSetRow
Get the score for this row in the result set

Specified by:
getScore in interface ResultSetRow
Returns:
Returns the score for this row in the resultset

getValues

public java.util.Map getValues()
Description copied from interface: ResultSetRow
Get the values of all available node properties. These are only properties that were stored in the query results and can vary depending on the query language that was used.

Specified by:
getValues in interface ResultSetRow
Returns:
Returns all the available node properties

getValue

public java.io.Serializable getValue(java.lang.String columnName)
Description copied from interface: ResultSetRow
Get the data for a single column

Specified by:
getValue in interface ResultSetRow
Returns:
the value

getDirectProperties

protected java.util.Map getDirectProperties()

setProperties

protected void setProperties(java.util.Map byQname)

getValue

public java.io.Serializable getValue(QName qname)
Description copied from interface: ResultSetRow
Get a node property value by name

Specified by:
getValue in interface ResultSetRow
Parameters:
qname - the property name
Returns:
Returns the node property for the given name


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