org.rhq.core.domain.search
Class SavedSearch

java.lang.Object
  extended by org.rhq.core.domain.search.SavedSearch
All Implemented Interfaces:
Serializable

public class SavedSearch
extends Object
implements Serializable

The data model for saved searches. Each users has his or her own set of saved searches, but inventory managers are allowed to "promote" their saved searches to GLOBAL status, which makes them available to all users under that installation of RHQ. There are two levels of pre-computed data within this structured. After the SavedSearch is created, the pattern will be translated into its JPQL equivalent and stored. If the SavedSearch is ever modified and saved, the JPQL will be re-computed. Periodically, the count-query version of the SavedSearch will be executed (using the stored JPQL), and the number of matching records will be stored. If this SavedSearch ever needs to be displayed on the user interface, it will by default retrieve this cached result count.

See Also:
Serialized Form

Constructor Summary
protected SavedSearch()
           
  SavedSearch(SearchSubsystem context, String name, String pattern, Subject subject)
           
 
Method Summary
 boolean equals(Object obj)
           
 String getDescription()
           
 Integer getId()
           
 long getLastComputeTime()
           
 String getName()
           
 String getPattern()
           
 Long getResultCount()
           
 SearchSubsystem getSearchSubsystem()
           
 Subject getSubject()
           
 int getSubjectId()
           
 int hashCode()
           
 boolean isGlobal()
           
 void setDescription(String description)
           
 void setGlobal(boolean global)
           
 void setId(Integer id)
           
 void setLastComputeTime(long lastComputeTime)
           
 void setName(String name)
           
 void setPattern(String pattern)
           
 void setResultCount(Long resultCount)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SavedSearch

protected SavedSearch()

SavedSearch

public SavedSearch(SearchSubsystem context,
                   String name,
                   String pattern,
                   Subject subject)
Method Detail

getId

public Integer getId()

setId

public void setId(Integer id)

getSearchSubsystem

public SearchSubsystem getSearchSubsystem()

getName

public String getName()

setName

public void setName(String name)

getDescription

public String getDescription()

setDescription

public void setDescription(String description)

getPattern

public String getPattern()

setPattern

public void setPattern(String pattern)

getLastComputeTime

public long getLastComputeTime()

setLastComputeTime

public void setLastComputeTime(long lastComputeTime)

getResultCount

public Long getResultCount()

setResultCount

public void setResultCount(Long resultCount)

getSubject

public Subject getSubject()

getSubjectId

public int getSubjectId()

isGlobal

public boolean isGlobal()

setGlobal

public void setGlobal(boolean global)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2008-2011 Red Hat, Inc.. All Rights Reserved.