Package org.drools.core.rule.constraint
Interface Constraint
-
- All Superinterfaces:
java.lang.Cloneable,java.io.Externalizable,RuleComponent,java.io.Serializable
- All Known Subinterfaces:
AlphaNodeFieldConstraint,BetaNodeFieldConstraint,IndexableConstraint,IntervalProviderConstraint
- All Known Implementing Classes:
InstanceNotEqualsConstraint,MutableTypeConstraint,NegConstraint,PredicateConstraint,QueryNameConstraint,TupleStartEqualsConstraint,XpathConstraint
public interface Constraint extends RuleComponent, java.io.Externalizable, java.lang.Cloneable
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classConstraint.ConstraintTypeAn enum for Constraint Types
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidaddPackageNames(java.util.Collection<java.lang.String> otherPkgs)Constraintclone()Clones the constraintdefault booleanequals(java.lang.Object object, RuleBase kbase)default BitMaskgetListenedPropertyMask(ObjectType objectType, java.util.List<java.lang.String> settableProperties)default java.util.Collection<java.lang.String>getPackageNames()Declaration[]getRequiredDeclarations()Returns all the declarations required by the given constraint implementation.Constraint.ConstraintTypegetType()Returns the type of the constraint, either ALPHA, BETA or UNKNOWNbooleanisTemporal()Returns true in case this constraint is a temporal constraintdefault voidmergeEvaluationContext(Constraint other)default voidregisterEvaluationContext(BuildContext buildContext)voidreplaceDeclaration(Declaration oldDecl, Declaration newDecl)When a rule contains multiple logical branches, i.e., makes use of 'OR' CE, it is required to clone patterns and declarations for each logical branch.
-
-
-
Method Detail
-
getRequiredDeclarations
Declaration[] getRequiredDeclarations()
Returns all the declarations required by the given constraint implementation.- Returns:
-
replaceDeclaration
void replaceDeclaration(Declaration oldDecl, Declaration newDecl)
When a rule contains multiple logical branches, i.e., makes use of 'OR' CE, it is required to clone patterns and declarations for each logical branch. Since this is done at ReteOO build type, when constraints were already created, eventually some constraints need to update their references to the declarations.- Parameters:
oldDecl-newDecl-
-
clone
Constraint clone()
Clones the constraint- Returns:
-
getType
Constraint.ConstraintType getType()
Returns the type of the constraint, either ALPHA, BETA or UNKNOWN- Returns:
-
isTemporal
boolean isTemporal()
Returns true in case this constraint is a temporal constraint- Returns:
-
getListenedPropertyMask
default BitMask getListenedPropertyMask(ObjectType objectType, java.util.List<java.lang.String> settableProperties)
-
equals
default boolean equals(java.lang.Object object, RuleBase kbase)
-
registerEvaluationContext
default void registerEvaluationContext(BuildContext buildContext)
-
mergeEvaluationContext
default void mergeEvaluationContext(Constraint other)
-
getPackageNames
default java.util.Collection<java.lang.String> getPackageNames()
-
addPackageNames
default void addPackageNames(java.util.Collection<java.lang.String> otherPkgs)
-
-