Package org.refcodes.criteria
Class AbstractCriteriaNode
- java.lang.Object
-
- org.refcodes.criteria.AbstractCriteria
-
- org.refcodes.criteria.AbstractCriteriaNode
-
- All Implemented Interfaces:
Criteria,CriteriaNode,org.refcodes.mixin.NameAccessor
public abstract class AbstractCriteriaNode extends AbstractCriteria implements CriteriaNode
Base class with the baseCriteriaNodefunctionality provided forCriteriaNodeimplementations.- Version:
- $Id: $Id
- Author:
- steiner
-
-
Constructor Summary
Constructors Constructor Description AbstractCriteriaNode(java.lang.String aName)Constructs aCriteriaNodewith the given name.AbstractCriteriaNode(java.lang.String aName, Criteria... aChildren)Constructs aCriteriaNodewith the given name and the providedCriteriachildren.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddChild(Criteria aChild)Adds a childCriteriato theCriteriaNode.java.util.List<Criteria>getChildren()Returns the list of childCriteriainstances contained in theCriteriaNode.-
Methods inherited from class org.refcodes.criteria.AbstractCriteria
getName
-
-
-
-
Constructor Detail
-
AbstractCriteriaNode
public AbstractCriteriaNode(java.lang.String aName)
Constructs aCriteriaNodewith the given name.- Parameters:
aName- The name of theCriteriaNode.
-
AbstractCriteriaNode
public AbstractCriteriaNode(java.lang.String aName, Criteria... aChildren)Constructs aCriteriaNodewith the given name and the providedCriteriachildren.- Parameters:
aName- The name of theCriteriaNode.aChildren- TheCriteriachildren to be contained in theCriteriaNode.
-
-
Method Detail
-
addChild
public void addChild(Criteria aChild) throws java.lang.IllegalStateException, java.lang.IllegalArgumentException
Adds a childCriteriato theCriteriaNode. In case a specializedCriteriaNodeapplies constraints on the number or type ofCriteriawhich may be added, an according exception may be thrown. For example theSingleCriteriaNodeapplies constraints on this method.- Specified by:
addChildin interfaceCriteriaNode- Parameters:
aChild- The childCriteriato be added.- Throws:
java.lang.IllegalStateException- In case constraints in terms of state are violated, implementation depended.java.lang.IllegalArgumentException- In case constraints in terms of argument are violated, implementation depended.
-
getChildren
public java.util.List<Criteria> getChildren()
Returns the list of childCriteriainstances contained in theCriteriaNode.- Specified by:
getChildrenin interfaceCriteriaNode- Returns:
- The
Criteriainstances contained in theCriteriaNode.
-
-