MPXJ: Microsoft Project Exchange

net.sf.mpxj
Class FilterCriteria

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

public final class FilterCriteria
extends GenericCriteria

This class represents the criteria used to determine if a row is filtered from a view.


Constructor Summary
FilterCriteria(ProjectFile projectFile)
          Constructor.
 
Method Summary
 boolean evaluate(FieldContainer container)
          Called to evaluate whether a row on a task or resource view should be filtered.
 FilterCriteriaLogicType getCriteriaLogic()
          Retrieves the "logical and" flag.
 java.lang.String getPromptText(int index)
          This method retrieves the given item of prompt text.
 boolean getPromptTextSet()
          Retrieves a flag indicating if prompt text has been set for this criteria.
 void setCriteriaLogic(FilterCriteriaLogicType logicalAnd)
          Flag indicating if a logical AND operator is used to join the following filter criteria (true) or a logical OR (false).
 void setPromptText(int index, java.lang.String text)
          Sets an item of prompt text.
 java.lang.String toString()
          
 
Methods inherited from class net.sf.mpxj.GenericCriteria
evaluateCriteria, getField, getOperator, getValue, setField, setOperator, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FilterCriteria

public FilterCriteria(ProjectFile projectFile)
Constructor.

Parameters:
projectFile - parent project file
Method Detail

evaluate

public boolean evaluate(FieldContainer container)
Called to evaluate whether a row on a task or resource view should be filtered. Returns false if the row should be filtered out.

Parameters:
container - task or resource data container
Returns:
boolean flag

setCriteriaLogic

public void setCriteriaLogic(FilterCriteriaLogicType logicalAnd)
Flag indicating if a logical AND operator is used to join the following filter criteria (true) or a logical OR (false).

Parameters:
logicalAnd - boolean flag

getCriteriaLogic

public FilterCriteriaLogicType getCriteriaLogic()
Retrieves the "logical and" flag.

Returns:
boolean flag

getPromptText

public java.lang.String getPromptText(int index)
This method retrieves the given item of prompt text.

Parameters:
index - text index, either 0 or 1
Returns:
prompt text

setPromptText

public void setPromptText(int index,
                          java.lang.String text)
Sets an item of prompt text. Note that calling this method sets a flag indicating that the criteria has prompt text associated with it.

Parameters:
index - text index, either 0 or 1
text - prompt text

getPromptTextSet

public boolean getPromptTextSet()
Retrieves a flag indicating if prompt text has been set for this criteria. This saves having to test both items of prompt text individually.

Returns:
boolean flag

toString

public java.lang.String toString()

Overrides:
toString in class GenericCriteria


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