com.endeca.infront.cartridge.model
Class SuggestedSearch

java.lang.Object
  extended by com.endeca.infront.cartridge.model.Action
      extended by com.endeca.infront.cartridge.model.NavigationAction
          extended by com.endeca.infront.cartridge.model.SuggestedSearch

public class SuggestedSearch
extends NavigationAction

SuggestedSearch is the model for a view of suggested search terms a.k.a, "did you mean?".


Constructor Summary
SuggestedSearch()
          Default constructor.
SuggestedSearch(String navigationState, String label, boolean autoPhrased, boolean spellCorrected)
          Constructs a suggested search with the given navigation state, label, auto phrase and spell correction.
SuggestedSearch(String navigationState, String label, boolean autoPhrased, boolean spellCorrected, long count)
          Constructs a suggested search with the given navigation state, label, auto phrase, spell correction and count.
 
Method Summary
 Long getCount()
          Gets the number of records that will be returned if this suggested search is applied.
 boolean isAutoPhrased()
           
 boolean isSpellCorrected()
           
 void setAutoPhrased(boolean autoPhrased)
          Sets the auto-phrased flag.
 void setCount(Long count)
          Sets the number of records that will be returned if this suggested search is applied.
 void setSpellCorrected(boolean spellCorrected)
          Sets the spell correction flag.
 
Methods inherited from class com.endeca.infront.cartridge.model.NavigationAction
getNavigationState, setNavigationState
 
Methods inherited from class com.endeca.infront.cartridge.model.Action
getContentPath, getLabel, getSiteRootPath, setContentPath, setLabel, setSiteRootPath
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SuggestedSearch

public SuggestedSearch()
Default constructor.


SuggestedSearch

public SuggestedSearch(String navigationState,
                       String label,
                       boolean autoPhrased,
                       boolean spellCorrected,
                       long count)
Constructs a suggested search with the given navigation state, label, auto phrase, spell correction and count.

Parameters:
navigationState - a navigation state
label - the label for the navigation action
autoPhrased - true if the term was adjusted to a phrase
spellCorrected - true if the term was spell corrected
count - the number of records that will be returned if this suggested search is applied

SuggestedSearch

public SuggestedSearch(String navigationState,
                       String label,
                       boolean autoPhrased,
                       boolean spellCorrected)
Constructs a suggested search with the given navigation state, label, auto phrase and spell correction.

Parameters:
navigationState - a navigation state
label - the label for the navigation action
autoPhrased - true if the term was adjusted to a phrase
spellCorrected - true if the term was spell corrected
Method Detail

isSpellCorrected

public boolean isSpellCorrected()
Returns:
True if the search was spell corrected.

setSpellCorrected

public void setSpellCorrected(boolean spellCorrected)
Sets the spell correction flag.

Parameters:
spellCorrected - true if the terms were spell corrected

isAutoPhrased

public boolean isAutoPhrased()
Returns:
True if the terms were auto-phrased.

setAutoPhrased

public void setAutoPhrased(boolean autoPhrased)
Sets the auto-phrased flag.

Parameters:
autoPhrased - true if the terms were auto-phrased

getCount

public Long getCount()
Gets the number of records that will be returned if this suggested search is applied. This can be null, for example, when aggregate records are used (a rollupKey is specified on MdexResource).

Returns:
The number of results that will be returned if the suggested search is applied.

setCount

public void setCount(Long count)
Sets the number of records that will be returned if this suggested search is applied.

Parameters:
count - the refinement count


Copyright © 2012, Oracle and/or its affiliates. All rights reserved.