org.datamanager.constraint
Class NameContainsConstraint

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

public class NameContainsConstraint
extends AbstractEntityConstraint

Check to see if the name of an Entity contains a given String.

Author:
Benjamin Keil
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
NameContainsConstraint(String partialName)
          Create a new NameContainsConstraint that matches the given String.
 
Method Summary
protected  boolean describes(Entity defendant)
          Check to see if the name of the given Entity contains the String given to the constructor of this constraint.
 
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

NameContainsConstraint

public NameContainsConstraint(String partialName)
Create a new NameContainsConstraint that matches the given String.

Parameters:
partialName - A String to find in the name of an Entity.
Method Detail

describes

protected boolean describes(Entity defendant)
                     throws DataManagerException
Check to see if the name of the given Entity contains the String given to the constructor of this constraint.

Specified by:
describes in class AbstractEntityConstraint
Parameters:
defendant - An Entity to check.
Returns:
Whether the name of the Entity contains the string given in the constructor.
DataManagerException


See the Helium Website