org.datamanager.constraint
Class AttributeStringMatchConstraint

java.lang.Object
  |
  +--org.datamanager.kernel.AbstractEntityConstraint
        |
        +--org.datamanager.constraint.AttributeStringMatchConstraint
All Implemented Interfaces:
Constraint, EntityConstraint, EntityValue, Serializable

public class AttributeStringMatchConstraint
extends AbstractEntityConstraint

Selects for Entities which have attributes of a specified name which match a specified string.

Author:
Matt Liggett
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.datamanager.kernel.AbstractEntityConstraint
DEBUG_ACCEPTS_MESSAGE
 
Fields inherited from interface org.datamanager.constraint.EntityConstraint
NONE
 
Constructor Summary
AttributeStringMatchConstraint(String attributeName, String matchValue)
          Creates a new AttributeStringMatchConstraint which matches Entities which have StringEntityValue attributes whose name is attributeName and whose value matches matchValue exactly.
 
Method Summary
protected  boolean describes(Entity entity)
          The method required by this class.
 
Methods inherited from class org.datamanager.kernel.AbstractEntityConstraint
accepts
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttributeStringMatchConstraint

public AttributeStringMatchConstraint(String attributeName,
                                      String matchValue)
Creates a new AttributeStringMatchConstraint which matches Entities which have StringEntityValue attributes whose name is attributeName and whose value matches matchValue exactly.

Method Detail

describes

protected boolean describes(Entity entity)
                     throws DataManagerException
Description copied from class: AbstractEntityConstraint
The method required by this class. This method has the exact same semantics as the interface EntityConstraint's accepts() method.

Specified by:
describes in class AbstractEntityConstraint
Parameters:
entity - An entity to check.
Returns:
Whether the entity is acceptable or not.
DataManagerException


See the Helium Website