java.lang.Object
org.refcodes.criteria.AbstractCriteria
org.refcodes.criteria.AbstractCriteriaNode
- All Implemented Interfaces:
Criteria
,CriteriaNode
,org.refcodes.mixin.AliasAccessor
,org.refcodes.mixin.Schemable
- Direct Known Subclasses:
AndCriteria
,IntersectWithCriteria
,NotCriteria
,OrCriteria
Base class with the base functionality provided for
CriteriaNode
implementations.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.refcodes.mixin.AliasAccessor
org.refcodes.mixin.AliasAccessor.AliasBuilder<B extends org.refcodes.mixin.AliasAccessor.AliasBuilder<B>>, org.refcodes.mixin.AliasAccessor.AliasMutator, org.refcodes.mixin.AliasAccessor.AliasProperty
-
Field Summary
-
Constructor Summary
ConstructorDescriptionAbstractCriteriaNode
(String aAlias) Constructs aCriteriaNode
with the given name.AbstractCriteriaNode
(String aAlias, List<Criteria> aChildren) Constructs aCriteriaNode
with the given name and the backing(!)AbstractCriteriaNode
(String aAlias, Criteria... aChildren) Constructs aCriteriaNode
with the given name and the providedCriteria
children. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a childCriteria
to theCriteriaNode
.Returns the list of childCriteria
instances contained in theCriteriaNode
.Creates aCriteriaSchema
for aCriteriaNode
sub-class with the instance's type and alias as well as the provided description.Methods inherited from class org.refcodes.criteria.AbstractCriteria
getAlias
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.refcodes.mixin.AliasAccessor
getAlias
-
Field Details
-
_children
-
-
Constructor Details
-
AbstractCriteriaNode
Constructs aCriteriaNode
with the given name.- Parameters:
aAlias
- The name of theCriteriaNode
.
-
AbstractCriteriaNode
Constructs aCriteriaNode
with the given name and the providedCriteria
children.- Parameters:
aAlias
- The name of theCriteriaNode
.aChildren
- TheCriteria
children to be contained in theCriteriaNode
.
-
AbstractCriteriaNode
Constructs aCriteriaNode
with the given name and the backing(!)List
of theCriteria
children to be provided: ThegetChildren()
method will return the backingList
as given, so you may provide an unmodifiableList
if needed!- Parameters:
aAlias
- The name of theCriteriaNode
.aChildren
- The backing(!)List
of theCriteria
children to be used by theCriteriaNode
.
-
-
Method Details
-
addChild
Adds a childCriteria
to theCriteriaNode
. In case a https://www.metacodes.proizedCriteriaNode
applies constraints on the number or type ofCriteria
which may be added, an according exception may be thrown. For example a singleCriteriaNode
may apply constraints on this method.- Specified by:
addChild
in interfaceCriteriaNode
- Parameters:
aChild
- The childCriteria
to be added.
-
getChildren
Returns the list of childCriteria
instances contained in theCriteriaNode
.- Specified by:
getChildren
in interfaceCriteriaNode
- Returns:
- The
Criteria
instances contained in theCriteriaNode
.
-
toSchema
Creates aCriteriaSchema
for aCriteriaNode
sub-class with the instance's type and alias as well as the provided description.- Parameters:
aDescription
- The description to use for theSchema
instance.- Returns:
- The according
Schema
instance.
-