edu.northwestern.at.monk.model
Class WorkPartCriterion

java.lang.Object
  extended by edu.northwestern.at.monk.model.SearchCriterion
      extended by edu.northwestern.at.monk.model.CoreObjectCriterion
          extended by edu.northwestern.at.monk.model.WorkPartCriterion

public class WorkPartCriterion
extends CoreObjectCriterion

A work part search criterion.

See Also:
MONK Datastore Overview, Licensing Agreement

Constructor Summary
WorkPartCriterion(java.util.Collection<?> values)
          Creates a new work part search criterion.
WorkPartCriterion(java.lang.String... tags)
          Creates a new work part search criterion.
WorkPartCriterion(WorkPart... workParts)
          Creates a new work part search criterion.
 
Method Summary
 java.lang.String getTag()
          Gets the tag.
 java.util.Collection<java.lang.String> getTags()
          Gets the tags.
 WorkPart getWorkPart()
          Gets the work part.
 java.util.Collection<WorkPart> getWorkParts()
          Gets the work parts.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WorkPartCriterion

public WorkPartCriterion(java.lang.String... tags)
                  throws ModelException
Creates a new work part search criterion.

Parameters:
tags - Tags.
Throws:
ModelException -
No such work part tag: tag

WorkPartCriterion

public WorkPartCriterion(WorkPart... workParts)
                  throws ModelException
Creates a new work part search criterion.

Parameters:
workParts - Work parts.
Throws:
ModelException -
Should never be thrown.

WorkPartCriterion

public WorkPartCriterion(java.util.Collection<?> values)
                  throws ModelException
Creates a new work part search criterion.

Parameters:
values - Collection of tags and/or work parts.
Throws:
ModelException -
No such work part tag: tag
Collection element neither String nor WorkPart.
Method Detail

getWorkParts

public java.util.Collection<WorkPart> getWorkParts()
Gets the work parts.

Returns:
Collection of work parts, or null if none.

getWorkPart

public WorkPart getWorkPart()
Gets the work part.

Returns:
Work part, or null if none or more than one.

getTags

public java.util.Collection<java.lang.String> getTags()
Gets the tags.

Returns:
The tags, or null if none.

getTag

public java.lang.String getTag()
Gets the tag.

Returns:
Tag, or null if none or more than one.