de.uplanet.lucy.server.newsagent
Class NotExpiredFilter

java.lang.Object
  extended by de.uplanet.lucy.server.newsagent.AbstractFilter
      extended by de.uplanet.lucy.server.newsagent.NotExpiredFilter
All Implemented Interfaces:
IFilter

@Scriptable
public final class NotExpiredFilter
extends AbstractFilter

Filters messages that have not expired yet.

Version:
$Revision: 72022 $

Constructor Summary
NotExpiredFilter()
           
 
Method Summary
 void filter(java.util.List<Message> p_from, java.util.List<Message> p_to)
          Do the filtering, operating on array lists.
 boolean needsSqlPostProcessing()
          Indicates if post-processing is needed after SQL retrieval.
 boolean pass(Message p_message)
          Decide if the given message passes the filter.
 void setCurrentDate(java.sql.Timestamp p_dtNow)
           
 void setIgnoreVisitedMessages(boolean p_bIgnoreVisitedMessages)
           
 java.lang.String sqlQuery()
          Provide a SQL search query.
 
Methods inherited from class de.uplanet.lucy.server.newsagent.AbstractFilter
forConnection, forUser
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NotExpiredFilter

public NotExpiredFilter()
Method Detail

setIgnoreVisitedMessages

public void setIgnoreVisitedMessages(boolean p_bIgnoreVisitedMessages)
Parameters:
p_bIgnoreVisitedMessages - Flag that indicates if visited messages are to be ignored (default is true).

setCurrentDate

public void setCurrentDate(java.sql.Timestamp p_dtNow)
Parameters:
p_dtNow - The value for the current date and time.

sqlQuery

public java.lang.String sqlQuery()
Description copied from interface: IFilter
Provide a SQL search query.

Returns:
A SQL query, or null if the filter cannot be applied at database level.

needsSqlPostProcessing

public boolean needsSqlPostProcessing()
Description copied from interface: IFilter
Indicates if post-processing is needed after SQL retrieval.

Returns:
Always false.
See Also:
IFilter.needsSqlPostProcessing()

pass

public boolean pass(Message p_message)
Description copied from interface: IFilter
Decide if the given message passes the filter.

Parameters:
p_message - The message to be filtered.
Returns:
true if the message passes the filter, false otherwise.

filter

public void filter(java.util.List<Message> p_from,
                   java.util.List<Message> p_to)
Description copied from interface: IFilter
Do the filtering, operating on array lists.

Specified by:
filter in interface IFilter
Overrides:
filter in class AbstractFilter
Parameters:
p_from - Collection of messages to be filtered.
p_to - The filtered collection.


Last updated: 2011-08-11 10-04
Copyright © 2000-2011 United Planet. All Rights Reserved.