org.apache.jackrabbit.api.jsr283.query
Interface Row

All Superinterfaces:
Row

public interface Row
extends Row

Row...


Method Summary
 Node getNode()
          Returns the Node corresponding to this Row.
 Node getNode(String selectorName)
          Returns the Node corresponding to this Row and the specified selector.
 String getPath()
          Equivalent to Row.getNode().getPath().
 String getPath(String selectorName)
          Equivalent to Row.getNode(selectorName).getPath().
 double getScore()
          Returns the full text search score for this row associated with the default selector.
 double getScore(String selectorName)
          Returns the full text search score for this row associated with the specified selector.
 
Methods inherited from interface javax.jcr.query.Row
getValue, getValues
 

Method Detail

getNode

Node getNode()
             throws RepositoryException
Returns the Node corresponding to this Row.

A RepositoryException is thrown if this Row contains values from more than one node. This will be the case when more than one selector is included among the columns specified for the query.

Returns:
a Node
Throws:
RepositoryException - if this query has more than one selector (and therefore, this Row corresponds to more than one Node) or if another error occurs.
Since:
JCR 2.0

getNode

Node getNode(String selectorName)
             throws RepositoryException
Returns the Node corresponding to this Row and the specified selector. If this Row is from a result involving outer joins, it may have no Node corresponding to the specified selector. In such a case this method returns null.

Parameters:
selectorName - a String
Returns:
a Node
Throws:
RepositoryException - if selectorName is not the alias of a selector in this query or if another error occurs.
Since:
JCR 2.0

getPath

String getPath()
               throws RepositoryException
Equivalent to Row.getNode().getPath(). However, some implementations may be able gain efficiency by not resolving the actual Node.

Returns:
a String
Throws:
RepositoryException - if this query has more than one selector (and therefore, this Row corresponds to more than one Node) or if another error occurs.
Since:
JCR 2.0

getPath

String getPath(String selectorName)
               throws RepositoryException
Equivalent to Row.getNode(selectorName).getPath(). However, some implementations may be able gain efficiency by not resolving the actual Node. If this Row is from a result involving outer joins, it may have no Node corresponding to the specified selector. In such a case this method returns null.

Parameters:
selectorName - a String
Returns:
a String
Throws:
RepositoryException - if selectorName is not the alias of a selector in this query or if another error occurs.
Since:
JCR 2.0

getScore

double getScore()
                throws RepositoryException
Returns the full text search score for this row associated with the default selector. This corresponds to the score of a particular node.

If no FullTextSearchScore AQM object is associated with the default selector this method will still return a value. However, in that case the returned value may not be meaningful or may simply reflect the minimum possible relevance level (for example, in some systems this might be a score of 0).

Note, in JCR-SQL2 a FullTextSearchScore AQM object is represented by a SCORE() function. In JCR-JQOM it is represented by a Java object of type javax.jcr.query.qom.FullTextSearchScore.

Returns:
a double
Throws:
RepositoryException - if this query has more than one selector (and therefore, this Row corresponds to more than one Node) or if another error occurs.
Since:
JCR 2.0

getScore

double getScore(String selectorName)
                throws RepositoryException
Returns the full text search score for this row associated with the specified selector. This corresponds to the score of a particular node.

If no FullTextSearchScore AQM object is associated with the selector selectorName this method will still return a value. However, in that case the returned value may not be meaningful or may simply reflect the minimum possible relevance level (for example, in some systems this might be a score of 0).

Note, in JCR-SQL2 a FullTextSearchScore AQM object is represented by a SCORE() function. In JCR-JQOM it is represented by a Java object of type javax.jcr.query.qom.FullTextSearchScore.

If this Row is from a result involving outer joins, it may have no Node corresponding to the specified selector. In such a case this method returns an implementation selected value, as it would if there were no FullTextSearchScore associated with the selector.

Parameters:
selectorName - a String
Returns:
a double
Throws:
RepositoryException - if selectorName is not the alias of a selector in this query or if another error occurs.
Since:
JCR 2.0


Copyright © 2004-2009 The Apache Software Foundation. All Rights Reserved.