pulse - the web application framework Get pulse at SourceForge.net. Fast, secure and Free Open Source software downloads Ohloh project report for pulse-java

org.torweg.pulse.util.search
Class SearchFailure

java.lang.Object
  extended by org.torweg.pulse.util.search.SearchFailure
All Implemented Interfaces:
java.io.Serializable

@Entity
public class SearchFailure
extends java.lang.Object
implements java.io.Serializable

an entity representing a fruitless search.

Version:
$Revision: 1415 $
Author:
Thomas Weber
See Also:
Serialized Form

Constructor Summary
protected SearchFailure()
          Deprecated. 
  SearchFailure(java.util.Locale loc, java.lang.String query)
          creates a new SearchFailure for the given locale and query.
 
Method Summary
 void addRecurrence()
          adds another recurrence of the search being the base of the failure.
 java.lang.String getId()
           
 double getImportance()
          returns the importance (recurrence / 2) of the failure for ordering.
 long getLastRecurrence()
          returns the timestamp of the last recurrence of the search being the base of the failure.
 java.util.Locale getLocale()
          returns the locale of the failure.
 long getRecurrences()
          returns the number of recurrences of the search being the base of the failure.
 java.lang.String getSearchQuery()
          returns the search query of the search being the base of the failure.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchFailure

@Deprecated
protected SearchFailure()
Deprecated. 

used by HibernateTM.


SearchFailure

public SearchFailure(java.util.Locale loc,
                     java.lang.String query)
creates a new SearchFailure for the given locale and query.

Parameters:
loc - the locale of the search
query - the search query (limited to 80 characters)
Method Detail

getId

public final java.lang.String getId()
Returns:
returns the id.

getLocale

public final java.util.Locale getLocale()
returns the locale of the failure.

Returns:
the locale

getLastRecurrence

public final long getLastRecurrence()
returns the timestamp of the last recurrence of the search being the base of the failure.

Returns:
the timestamp of the last recurrence

getRecurrences

public final long getRecurrences()
returns the number of recurrences of the search being the base of the failure.

Returns:
the number of recurrences

getSearchQuery

public final java.lang.String getSearchQuery()
returns the search query of the search being the base of the failure.

Returns:
the query

addRecurrence

public final void addRecurrence()
adds another recurrence of the search being the base of the failure.


getImportance

public final double getImportance()
returns the importance (recurrence / 2) of the failure for ordering.

Higher values mean greater importance.

Returns:
the importance