Drools :: Core 6.1.0.Beta1

org.drools.core.spi
Interface Constraint

All Superinterfaces:
Cloneable, Externalizable, RuleComponent, Serializable
All Known Subinterfaces:
AlphaNodeFieldConstraint, BetaNodeFieldConstraint, IndexableConstraint, IntervalProviderConstraint
All Known Implementing Classes:
AbstractCompositeConstraint, EvaluatorConstraint, InstanceEqualsConstraint, InstanceNotEqualsConstraint, MutableTypeConstraint, MvelConstraint, PredicateConstraint, QueryNameConstraint, TupleStartEqualsConstraint

public interface Constraint
extends RuleComponent, Externalizable, Cloneable


Nested Class Summary
static class Constraint.ConstraintType
          An enum for Constraint Types
 
Method Summary
 Constraint clone()
          Clones the constraint
 Declaration[] getRequiredDeclarations()
          Returns all the declarations required by the given constraint implementation.
 Constraint.ConstraintType getType()
          Returns the type of the constraint, either ALPHA, BETA or UNKNOWN
 boolean isTemporal()
          Returns true in case this constraint is a temporal constraint
 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.
 
Methods inherited from interface java.io.Externalizable
readExternal, writeExternal
 

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:

Drools :: Core 6.1.0.Beta1

Copyright © 2001-2014 JBoss by Red Hat. All Rights Reserved.