Spring Data Solr

org.springframework.data.solr.core.query.result
Class HighlightEntry<T>

java.lang.Object
  extended by org.springframework.data.solr.core.query.result.HighlightEntry<T>

public class HighlightEntry<T>
extends Object

Highlight result entry holding reference to domain object ({@link #getEntity()) as well as the highlights

Author:
Christoph Strobl

Nested Class Summary
static class HighlightEntry.Highlight
          Highlight holds reference to the field highlighting was applied to, as well as the snipplets
 
Constructor Summary
HighlightEntry(T entity)
           
 
Method Summary
 void addSnipplets(Field field, List<String> snipplets)
           
 void addSnipplets(String fieldname, List<String> snipplets)
           
 T getEntity()
          Get the entity the highlights are associated to
 List<HighlightEntry.Highlight> getHighlights()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HighlightEntry

public HighlightEntry(T entity)
Parameters:
entity - must not be null
Method Detail

getEntity

public T getEntity()
Get the entity the highlights are associated to

Returns:

getHighlights

public List<HighlightEntry.Highlight> getHighlights()
Returns:
empty collection if none available

addSnipplets

public void addSnipplets(Field field,
                         List<String> snipplets)
Parameters:
field -
snipplets -

addSnipplets

public void addSnipplets(String fieldname,
                         List<String> snipplets)
Parameters:
fieldname -
snipplets -

Spring Data Solr

Copyright © 2011-2014-2014 Pivotal. All Rights Reserved.