org.rr0.im.service.function.classification
Class CategoryImpl


public class CategoryImpl
implements Category

A set of criteria that a Classifiable element may match or not.

See Also: Classification

Field Summary
 private CategoryDAOcategoryDAO
          Data Access Object for Category-related data.
 private Classificationclassification
          The Classification system this category belongs to.
 private Stringfilter
          The set of criteria a Classifiable must match to belong to this category,
expressed in JDO QL format.
 private Stringname
          The name of the category

Constructor Summary
CategoryImpl(Classification someClassification, String someName, String someFilter)
           

Method Summary
 booleanaccept(Classifiable someClassifiable)
          Check if an object is classified in this Category.
 booleanequals(Object o)
          Category equality is exclusively based on filter expression
to prevent adding two identical categories to the same function.
 StringgetName()
           
 inthashCode()
           

Field Detail

categoryDAO

private CategoryDAO categoryDAO
Data Access Object for Category-related data.

classification

private Classification classification
The Classification system this category belongs to.

filter

private String filter
The set of criteria a Classifiable must match to belong to this category,
expressed in JDO QL format.

name

private String name
The name of the category
Constructor Detail

CategoryImpl

public CategoryImpl(Classification someClassification, String someName, String someFilter)
Method Detail

accept

public boolean accept(Classifiable someClassifiable)
Check if an object is classified in this Category.
This is done by running the category's criteria againts the classifiable
or checking if the Classifiable has been manually forced to classify into this category
(even if it doesn't match the criteria).
Parameters:
someClassifiable A Classifiable object.
Returns: If the classifiable belongs to this category.
See Also:
Classifiable.getForcedCategory(org.rr0.im.service.function.classification.Classification)

equals

public boolean equals(Object o)
Category equality is exclusively based on filter expression
to prevent adding two identical categories to the same function.
Parameters:
o
Returns:

getName

public String getName()

hashCode

public int hashCode()

Association Links

to Class java.lang.String

The name of the category

to Class java.lang.String

The set of criteria a Classifiable must match to belong to this category,
expressed in JDO QL format.

to Class org.rr0.im.service.function.classification.Classification

The Classification system this category belongs to.

to Class org.rr0.im.integration.CategoryDAO

Data Access Object for Category-related data.