public class QueryNameConstraint extends Object implements AlphaNodeFieldConstraint, IndexableConstraint, AcceptsReadAccessor, Externalizable
Constraint.ConstraintType
Constructor and Description |
---|
QueryNameConstraint() |
QueryNameConstraint(InternalReadAccessor readAccessor,
String queryName) |
Modifier and Type | Method and Description |
---|---|
Constraint |
clone()
Clones the constraint
|
QueryNameConstraint |
cloneIfInUse()
Clone this constraints only if it is already used by a different node, otherwise returns this
|
ContextEntry |
createContextEntry() |
boolean |
equals(Object obj) |
IndexUtil.ConstraintType |
getConstraintType() |
FieldValue |
getField() |
InternalReadAccessor |
getFieldExtractor() |
AbstractHashTable.FieldIndex |
getFieldIndex() |
String |
getQueryName() |
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
|
int |
hashCode() |
boolean |
isAllowed(InternalFactHandle handle,
InternalWorkingMemory workingMemory,
ContextEntry context) |
boolean |
isIndexable(short nodeType) |
boolean |
isTemporal()
Returns true in case this constraint is a temporal constraint
|
boolean |
isUnification() |
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.
|
void |
setReadAccessor(InternalReadAccessor readAccessor) |
String |
toString() |
void |
writeExternal(ObjectOutput out) |
public QueryNameConstraint()
public QueryNameConstraint(InternalReadAccessor readAccessor, String queryName)
public ContextEntry createContextEntry()
createContextEntry
in interface AlphaNodeFieldConstraint
public boolean isAllowed(InternalFactHandle handle, InternalWorkingMemory workingMemory, ContextEntry context)
isAllowed
in interface AlphaNodeFieldConstraint
public boolean isUnification()
isUnification
in interface IndexableConstraint
public boolean isIndexable(short nodeType)
isIndexable
in interface IndexableConstraint
public IndexUtil.ConstraintType getConstraintType()
getConstraintType
in interface IndexableConstraint
public FieldValue getField()
getField
in interface IndexableConstraint
public AbstractHashTable.FieldIndex getFieldIndex()
getFieldIndex
in interface IndexableConstraint
public InternalReadAccessor getFieldExtractor()
getFieldExtractor
in interface IndexableConstraint
public void setReadAccessor(InternalReadAccessor readAccessor)
setReadAccessor
in interface AcceptsReadAccessor
public Declaration[] getRequiredDeclarations()
Constraint
getRequiredDeclarations
in interface Constraint
public void replaceDeclaration(Declaration oldDecl, Declaration newDecl)
Constraint
replaceDeclaration
in interface Constraint
public Constraint clone()
Constraint
clone
in interface Constraint
clone
in class Object
public String getQueryName()
public Constraint.ConstraintType getType()
Constraint
getType
in interface Constraint
public boolean isTemporal()
Constraint
isTemporal
in interface Constraint
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public QueryNameConstraint cloneIfInUse()
AlphaNodeFieldConstraint
cloneIfInUse
in interface AlphaNodeFieldConstraint
Copyright © 2001–2015 JBoss by Red Hat. All rights reserved.