MPXJ: Microsoft Project Exchange

net.sf.mpxj
Class Filter

Package class diagram package Filter
java.lang.Object
  extended by net.sf.mpxj.Filter

public class Filter
extends java.lang.Object

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


Constructor Summary
Filter()
           
 
Method Summary
 void addCriteria(FilterCriteria criteria)
          Adds a criteria expression to the filter.
 boolean evaluate(FieldContainer container)
          Evaluates the filter, returns true if the supplied Task or Resource instance matches the filter criteria.
 java.util.List<FilterCriteria> getCriteria()
          Retrieve the criteria used to define this filter.
 java.lang.Integer getID()
          Retrieves the filter's unique ID.
 java.lang.String getName()
          Retrieves the filter's name.
 boolean getPromptTextSet()
          Retrieves a flag indicating if prompt text has been set for any of the criteria associated with the 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 setID(java.lang.Integer id)
          Sets the filter's unique ID.
 void setName(java.lang.String name)
          Sets the filter's name.
 void setShowRelatedSummaryRows(boolean showRelatedSummaryRows)
          Sets the "show related summary rows" flag.
 java.lang.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(java.lang.Integer id)
Sets the filter's unique ID.

Parameters:
id - unique ID

getID

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

Returns:
unique ID

setName

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

Parameters:
name - filter name

getName

public java.lang.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

addCriteria

public void addCriteria(FilterCriteria criteria)
Adds a criteria expression to the filter.

Parameters:
criteria - criteria expression

getCriteria

public java.util.List<FilterCriteria> 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

isResourceFilter

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

Returns:
boolean flag

evaluate

public boolean evaluate(FieldContainer container)
Evaluates the filter, returns true if the supplied Task or Resource instance matches the filter criteria.

Parameters:
container - Task or Resource instance
Returns:
boolean flag

getPromptTextSet

public boolean getPromptTextSet()
Retrieves a flag indicating if prompt text has been set for any of the criteria associated with the filter. This saves having to test each criteria item individually if no prompts are present.

Returns:
boolean flag

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object


Copyright © 2000-2009 Packwood Software. All Rights Reserved.