net.sf.mpxj
Class Filter

java.lang.Object
  extended by net.sf.mpxj.Filter

public class Filter
extends Object

This class represents a filter which may be applied to a task or resource view.


Constructor Summary
Filter()
           
 
Method Summary
 boolean evaluate(FieldContainer container, Map<GenericCriteriaPrompt,Object> promptValues)
          Evaluates the filter, returns true if the supplied Task or Resource instance matches the filter criteria.
 GenericCriteria getCriteria()
          Retrieve the criteria used to define this filter.
 Integer getID()
          Retrieves the filter's unique ID.
 String getName()
          Retrieves the filter's name.
 List<GenericCriteriaPrompt> getPrompts()
          Retrieves the prompts required to supply parameters to this filter.
 boolean getShowRelatedSummaryRows()
          Retrieves the "show related summary rows" flag.
 boolean isResourceFilter()
          Retrieves a flag indicating if this is a resource filter.
 boolean isTaskFilter()
          Retrieves a flag indicating if this is a task filter.
 void setCriteria(GenericCriteria criteria)
          Sets the criteria associted with this filter.
 void setID(Integer id)
          Sets the filter's unique ID.
 void setIsResourceFilter(boolean flag)
          Sets the flag indicating if this is a resource filter.
 void setIsTaskFilter(boolean flag)
          Sets the flag indicating if this is a task filter.
 void setName(String name)
          Sets the filter's name.
 void setPrompts(List<GenericCriteriaPrompt> prompts)
          Sets the prompts to supply the parameters required by this filter.
 void setShowRelatedSummaryRows(boolean showRelatedSummaryRows)
          Sets the "show related summary rows" flag.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Filter

public Filter()
Method Detail

setID

public void setID(Integer id)
Sets the filter's unique ID.

Parameters:
id - unique ID

getID

public Integer getID()
Retrieves the filter's unique ID.

Returns:
unique ID

setName

public void setName(String name)
Sets the filter's name.

Parameters:
name - filter name

getName

public String getName()
Retrieves the filter's name.

Returns:
filter name

setShowRelatedSummaryRows

public void setShowRelatedSummaryRows(boolean showRelatedSummaryRows)
Sets the "show related summary rows" flag.

Parameters:
showRelatedSummaryRows - boolean flag

getShowRelatedSummaryRows

public boolean getShowRelatedSummaryRows()
Retrieves the "show related summary rows" flag.

Returns:
boolean flag

setCriteria

public void setCriteria(GenericCriteria criteria)
Sets the criteria associted with this filter.

Parameters:
criteria - filter criteria

getCriteria

public GenericCriteria getCriteria()
Retrieve the criteria used to define this filter.

Returns:
list of filter criteria

isTaskFilter

public boolean isTaskFilter()
Retrieves a flag indicating if this is a task filter.

Returns:
boolean flag

setIsTaskFilter

public void setIsTaskFilter(boolean flag)
Sets the flag indicating if this is a task filter.

Parameters:
flag - task filter flag

isResourceFilter

public boolean isResourceFilter()
Retrieves a flag indicating if this is a resource filter.

Returns:
boolean flag

setIsResourceFilter

public void setIsResourceFilter(boolean flag)
Sets the flag indicating if this is a resource filter.

Parameters:
flag - resource filter flag

evaluate

public boolean evaluate(FieldContainer container,
                        Map<GenericCriteriaPrompt,Object> promptValues)
Evaluates the filter, returns true if the supplied Task or Resource instance matches the filter criteria.

Parameters:
container - Task or Resource instance
promptValues - respose to prompts
Returns:
boolean flag

setPrompts

public void setPrompts(List<GenericCriteriaPrompt> prompts)
Sets the prompts to supply the parameters required by this filter.

Parameters:
prompts - filter prompts

getPrompts

public List<GenericCriteriaPrompt> getPrompts()
Retrieves the prompts required to supply parameters to this filter.

Returns:
filter prompts

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2012. All Rights Reserved.