Package org.drools.base.rule.constraint
Class QueryNameConstraint
java.lang.Object
org.drools.base.rule.constraint.QueryNameConstraint
- All Implemented Interfaces:
Externalizable,Serializable,Cloneable,AcceptsReadAccessor,AlphaNodeFieldConstraint,Constraint,IndexableConstraint,RuleComponent
public class QueryNameConstraint
extends Object
implements AlphaNodeFieldConstraint, IndexableConstraint, AcceptsReadAccessor, Externalizable
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.drools.base.rule.constraint.Constraint
Constraint.ConstraintType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Clones the constraintClone this constraints only if it is already used by a different node, otherwise returns thisbooleangetField()Returns all the declarations required by the given constraint implementation.getType()Returns the type of the constraint, either ALPHA, BETA or UNKNOWNinthashCode()booleanisAllowed(FactHandle handle, ValueResolver valueResolver) booleanisIndexable(int nodeType, KieBaseConfiguration config) booleanReturns true in case this constraint is a temporal constraintbooleanvoidvoidreplaceDeclaration(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.voidsetReadAccessor(ReadAccessor readAccessor) toString()voidMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.drools.base.rule.constraint.Constraint
addPackageNames, equals, getListenedPropertyMask, getPackageNames, mergeEvaluationContext, registerEvaluationContextMethods inherited from interface org.drools.base.rule.IndexableConstraint
unsetUnification
-
Constructor Details
-
QueryNameConstraint
public QueryNameConstraint() -
QueryNameConstraint
-
-
Method Details
-
isAllowed
- Specified by:
isAllowedin interfaceAlphaNodeFieldConstraint
-
isUnification
public boolean isUnification()- Specified by:
isUnificationin interfaceIndexableConstraint
-
isIndexable
- Specified by:
isIndexablein interfaceIndexableConstraint
-
getConstraintType
- Specified by:
getConstraintTypein interfaceIndexableConstraint
-
getField
- Specified by:
getFieldin interfaceIndexableConstraint
-
getFieldIndex
- Specified by:
getFieldIndexin interfaceIndexableConstraint
-
getFieldExtractor
- Specified by:
getFieldExtractorin interfaceIndexableConstraint
-
setReadAccessor
- Specified by:
setReadAccessorin interfaceAcceptsReadAccessor
-
getRightIndexExtractor
- Specified by:
getRightIndexExtractorin interfaceIndexableConstraint
-
getLeftIndexExtractor
- Specified by:
getLeftIndexExtractorin interfaceIndexableConstraint
-
getRequiredDeclarations
Description copied from interface:ConstraintReturns all the declarations required by the given constraint implementation.- Specified by:
getRequiredDeclarationsin interfaceConstraint- Returns:
-
replaceDeclaration
Description copied from interface:ConstraintWhen 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.- Specified by:
replaceDeclarationin interfaceConstraint
-
clone
Description copied from interface:ConstraintClones the constraint- Specified by:
clonein interfaceConstraint- Overrides:
clonein classObject- Returns:
-
getQueryName
-
getType
Description copied from interface:ConstraintReturns the type of the constraint, either ALPHA, BETA or UNKNOWN- Specified by:
getTypein interfaceConstraint- Returns:
-
isTemporal
public boolean isTemporal()Description copied from interface:ConstraintReturns true in case this constraint is a temporal constraint- Specified by:
isTemporalin interfaceConstraint- Returns:
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
cloneIfInUse
Description copied from interface:AlphaNodeFieldConstraintClone this constraints only if it is already used by a different node, otherwise returns this- Specified by:
cloneIfInUsein interfaceAlphaNodeFieldConstraint
-
hashCode
public int hashCode() -
equals
-
toString
-