|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.drools.rule.MutableTypeConstraint
org.drools.rule.AbstractCompositeConstraint
public abstract class AbstractCompositeConstraint
A superclass for all composite constraints, like "OR" and "AND"
| Nested Class Summary | |
|---|---|
protected static class |
AbstractCompositeConstraint.MultiFieldConstraintContextEntry
A context entry for composite restrictions |
| Nested classes/interfaces inherited from interface org.drools.spi.Constraint |
|---|
Constraint.ConstraintType |
| Field Summary | |
|---|---|
protected AlphaNodeFieldConstraint[] |
alphaConstraints
|
protected BetaNodeFieldConstraint[] |
betaConstraints
|
protected Declaration[] |
requiredDeclarations
|
| Constructor Summary | |
|---|---|
AbstractCompositeConstraint()
|
|
| Method Summary | |
|---|---|
void |
addAlphaConstraint(AlphaNodeFieldConstraint constraint)
Adds an alpha constraint to the multi field OR constraint |
void |
addBetaConstraint(BetaNodeFieldConstraint constraint)
Adds a beta constraint to this multi field OR constraint |
void |
addConstraint(Constraint constraint)
Adds a constraint too all lists it belongs to by checking for its type |
abstract Object |
clone()
Clones the constraint |
ContextEntry |
createContextEntry()
|
boolean |
equals(Object object)
|
AlphaNodeFieldConstraint[] |
getAlphaConstraints()
|
BetaNodeFieldConstraint[] |
getBetaConstraints()
|
Declaration[] |
getRequiredDeclarations()
Returns all the declarations required by the given constraint implementation. |
int |
hashCode()
|
boolean |
isTemporal()
Returns true in case this constraint is a temporal constraint |
void |
readExternal(ObjectInput in)
|
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. |
protected void |
updateRequiredDeclarations(Constraint constraint)
Updades the cached required declaration array |
void |
writeExternal(ObjectOutput out)
|
| Methods inherited from class org.drools.rule.MutableTypeConstraint |
|---|
getType, setType |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.drools.spi.AlphaNodeFieldConstraint |
|---|
isAllowed |
| Methods inherited from interface org.drools.spi.BetaNodeFieldConstraint |
|---|
isAllowedCachedLeft, isAllowedCachedRight |
| Field Detail |
|---|
protected AlphaNodeFieldConstraint[] alphaConstraints
protected BetaNodeFieldConstraint[] betaConstraints
protected Declaration[] requiredDeclarations
| Constructor Detail |
|---|
public AbstractCompositeConstraint()
| Method Detail |
|---|
public void readExternal(ObjectInput in)
throws IOException,
ClassNotFoundException
readExternal in interface ExternalizablereadExternal in class MutableTypeConstraintIOException
ClassNotFoundException
public void writeExternal(ObjectOutput out)
throws IOException
writeExternal in interface ExternalizablewriteExternal in class MutableTypeConstraintIOExceptionpublic AlphaNodeFieldConstraint[] getAlphaConstraints()
public BetaNodeFieldConstraint[] getBetaConstraints()
public boolean isTemporal()
Constraint
public void addAlphaConstraint(AlphaNodeFieldConstraint constraint)
constraint - public void addBetaConstraint(BetaNodeFieldConstraint constraint)
constraint - public void addConstraint(Constraint constraint)
constraint - protected void updateRequiredDeclarations(Constraint constraint)
constraint - public Declaration[] getRequiredDeclarations()
public void replaceDeclaration(Declaration oldDecl,
Declaration newDecl)
public ContextEntry createContextEntry()
public int hashCode()
hashCode in class Objectpublic boolean equals(Object object)
equals in class Objectpublic abstract Object clone()
Constraint
clone in interface Constraintclone in class MutableTypeConstraint
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||