Package org.drools.base.rule
Class QueryElement
java.lang.Object
org.drools.base.rule.ConditionalElement
org.drools.base.rule.QueryElement
- All Implemented Interfaces:
Externalizable,Serializable,Cloneable,RuleComponent,RuleConditionElement
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionQueryElement(Pattern resultPattern, String queryName, QueryArgument[] arguments, int[] variableIndexes, Declaration[] requiredDeclarations, boolean openQuery, boolean abductive) -
Method Summary
Modifier and TypeMethodDescriptionclone()Returns a clone from itselfbooleanReturns a Map of declarations that are visible inside this conditional elementList<? extends RuleConditionElement>Returs a list of RuleConditionElement's that are nested inside the current elementReturns a Map of declarations that are visible outside this conditional element.int[]inthashCode()booleanbooleanbooleanReturns true in case this RuleConditionElement delimits a pattern visibility scope.voidresolveDeclaration(String identifier) Resolves the given identifier in the current scope and returns the Declaration object for the declaration.voidsetVariableIndexes(int[] variableIndexes) toString()void
-
Constructor Details
-
QueryElement
public QueryElement() -
QueryElement
public QueryElement(Pattern resultPattern, String queryName, QueryArgument[] arguments, int[] variableIndexes, Declaration[] requiredDeclarations, boolean openQuery, boolean abductive)
-
-
Method Details
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
getVariableIndexes
public int[] getVariableIndexes() -
setVariableIndexes
public void setVariableIndexes(int[] variableIndexes) -
getQueryName
-
getArguments
-
getInnerDeclarations
Description copied from interface:RuleConditionElementReturns a Map of declarations that are visible inside this conditional element- Specified by:
getInnerDeclarationsin interfaceRuleConditionElement- Returns:
-
getOuterDeclarations
Description copied from interface:RuleConditionElementReturns a Map of declarations that are visible outside this conditional element.- Specified by:
getOuterDeclarationsin interfaceRuleConditionElement- Returns:
-
getNestedElements
Description copied from interface:RuleConditionElementReturs a list of RuleConditionElement's that are nested inside the current element- Specified by:
getNestedElementsin interfaceRuleConditionElement- Returns:
-
getResultPattern
-
isPatternScopeDelimiter
public boolean isPatternScopeDelimiter()Description copied from interface:RuleConditionElementReturns true in case this RuleConditionElement delimits a pattern visibility scope. For instance, AND CE is not a scope delimiter, while NOT CE is a scope delimiter- Specified by:
isPatternScopeDelimiterin interfaceRuleConditionElement- Returns:
-
getRequiredDeclarations
-
isOpenQuery
public boolean isOpenQuery() -
isAbductive
public boolean isAbductive() -
resolveDeclaration
Description copied from interface:RuleConditionElementResolves the given identifier in the current scope and returns the Declaration object for the declaration. Returns null if identifier can not be resolved.- Specified by:
resolveDeclarationin interfaceRuleConditionElement- Returns:
-
clone
Description copied from interface:RuleConditionElementReturns a clone from itself- Specified by:
clonein interfaceRuleConditionElement- Specified by:
clonein classConditionalElement- Returns:
-
toString
-
hashCode
public int hashCode() -
equals
-