org.compass.core
Interface CompassHit

All Superinterfaces:
Serializable
All Known Implementing Classes:
DefaultCompassHit

public interface CompassHit
extends Serializable

Wrapper that provides a lazily loaded hit from CompassHitsOperations.

Author:
kimchy

Method Summary
 String alias()
          Same as getAlias().
 Object data()
          Same as getData() just shorter.
 String getAlias()
          Returns the alias value of the hit.
 Object getData()
          Returns the object for this hit.
 CompassHighlightedText getHighlightedText()
          Returns a cached highlighted text the maps to the hit.
 Resource getResource()
          Returns the Resource for this hit.
 float getScore()
          Returns the score for this hit.
 CompassHighlightedText highlightedText()
          Same as getHighlightedText().
 Resource resource()
          Same as getResource().
 float score()
          Same as getScore().
 

Method Detail

getAlias

String getAlias()
                throws CompassException
Returns the alias value of the hit.

Returns:
The alias.
Throws:
CompassException

alias

String alias()
             throws CompassException
Same as getAlias().

Throws:
CompassException

getData

Object getData()
               throws CompassException
Returns the object for this hit.

Returns:
The object data of the hit.
Throws:
CompassException
See Also:
CompassHitsOperations.data(int)

data

Object data()
            throws CompassException
Same as getData() just shorter.

Throws:
CompassException

getResource

Resource getResource()
                     throws CompassException
Returns the Resource for this hit.

Returns:
The Resource of the hit.
Throws:
CompassException
See Also:
CompassHitsOperations.resource(int)

resource

Resource resource()
                  throws CompassException
Same as getResource().

Throws:
CompassException

getScore

float getScore()
               throws CompassException
Returns the score for this hit.

Returns:
The score of the hit.
Throws:
CompassException
See Also:
CompassHitsOperations.score(int)

score

float score()
            throws CompassException
Same as getScore().

Throws:
CompassException

getHighlightedText

CompassHighlightedText getHighlightedText()
                                          throws CompassException
Returns a cached highlighted text the maps to the hit.

Highlighted text is automatically cached when using CompassHighlighter using CompassHits.highlighter(int).

Returns:
The cached highlighted hits
Throws:
CompassException

highlightedText

CompassHighlightedText highlightedText()
                                       throws CompassException
Same as getHighlightedText().

Throws:
CompassException


Copyright (c) 2004-2009 The Compass Project.