Package org.drools.base.rule.constraint
Class XpathConstraint
java.lang.Object
org.drools.base.rule.MutableTypeConstraint<ContextEntry>
org.drools.base.rule.constraint.XpathConstraint
- All Implemented Interfaces:
Externalizable,Serializable,Cloneable,AlphaNodeFieldConstraint,BetaConstraint<ContextEntry>,Constraint,RuleComponent
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classNested classes/interfaces inherited from interface org.drools.base.rule.constraint.Constraint
Constraint.ConstraintType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Clones the constraintReturns all the declarations required by the given constraint implementation.Class<?>getType()Returns the type of the constraint, either ALPHA, BETA or UNKNOWNbooleanisAllowed(FactHandle handle, ValueResolver valueResolver) booleanisAllowedCachedLeft(ContextEntry context, FactHandle handle) booleanisAllowedCachedRight(BaseTuple tuple, ContextEntry context) booleanReturns true in case this constraint is a temporal constraintvoidvoidreplaceDeclaration(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.voidsetDeclaration(Declaration declaration) voidsetXpathStartDeclaration(Declaration xpathStartDeclaration) toString()voidMethods inherited from class org.drools.base.rule.MutableTypeConstraint
cloneIfInUse, setInUse, setTypeMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.drools.base.rule.constraint.Constraint
addPackageNames, equals, getListenedPropertyMask, getPackageNames, mergeEvaluationContext, registerEvaluationContext
-
Constructor Details
-
XpathConstraint
public XpathConstraint()
-
-
Method Details
-
addChunck
public XpathConstraint.XpathChunk addChunck(Class<?> clazz, String field, int index, boolean iterate, boolean lazy) -
getType
Description copied from interface:ConstraintReturns the type of the constraint, either ALPHA, BETA or UNKNOWN- Specified by:
getTypein interfaceConstraint- Overrides:
getTypein classMutableTypeConstraint<ContextEntry>- Returns:
-
getRequiredDeclarations
Description copied from interface:ConstraintReturns all the declarations required by the given constraint implementation.- 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. -
clone
Description copied from interface:ConstraintClones the constraint- Specified by:
clonein interfaceConstraint- Specified by:
clonein classMutableTypeConstraint<ContextEntry>- Returns:
-
isTemporal
public boolean isTemporal()Description copied from interface:ConstraintReturns true in case this constraint is a temporal constraint- Returns:
-
isAllowedCachedLeft
-
isAllowedCachedRight
-
createContext
-
isAllowed
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Overrides:
readExternalin classMutableTypeConstraint<ContextEntry>- Throws:
IOExceptionClassNotFoundException
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Overrides:
writeExternalin classMutableTypeConstraint<ContextEntry>- Throws:
IOException
-
getChunks
-
getResultClass
-
getDeclaration
-
setDeclaration
-
getReadAccessor
-
getXpathStartDeclaration
-
setXpathStartDeclaration
-
toString
-