org.drools.rule
Class QueryElement

java.lang.Object
  extended by org.drools.rule.ConditionalElement
      extended by org.drools.rule.QueryElement
All Implemented Interfaces:
Externalizable, Serializable, Cloneable, RuleConditionElement, RuleComponent

public class QueryElement
extends ConditionalElement
implements Externalizable

See Also:
Serialized Form

Constructor Summary
QueryElement()
           
QueryElement(Pattern resultPattern, String queryName, Object[] argTemplate, Declaration[] requiredDeclarations, int[] declIndexes, int[] variableIndexes, boolean openQuery)
           
 
Method Summary
 Object clone()
          Returns a clone from itself
 boolean equals(Object obj)
           
 Object[] getArgTemplate()
           
 int[] getDeclIndexes()
           
 Map getInnerDeclarations()
          Returns a Map of declarations that are visible inside this conditional element
 List getNestedElements()
          Returs a list of RuleConditionElement's that are nested inside the current element
 Map getOuterDeclarations()
          Returns a Map of declarations that are visible outside this conditional element.
 String getQueryName()
           
 Declaration[] getRequiredDeclarations()
           
 Pattern getResultPattern()
           
 int[] getVariableIndexes()
           
 int hashCode()
           
 boolean isOpenQuery()
           
 boolean isPatternScopeDelimiter()
          Returns true in case this RuleConditionElement delimits a pattern visibility scope.
 void readExternal(ObjectInput in)
           
 Declaration resolveDeclaration(String identifier)
          Resolves the given identifier in the current scope and returns the Declaration object for the declaration.
 void setVariableIndexes(int[] varIndexes)
           
 String toString()
           
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QueryElement

public QueryElement()

QueryElement

public QueryElement(Pattern resultPattern,
                    String queryName,
                    Object[] argTemplate,
                    Declaration[] requiredDeclarations,
                    int[] declIndexes,
                    int[] variableIndexes,
                    boolean openQuery)
Method Detail

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException

getQueryName

public String getQueryName()

getArgTemplate

public Object[] getArgTemplate()

getDeclIndexes

public int[] getDeclIndexes()

setVariableIndexes

public void setVariableIndexes(int[] varIndexes)

getVariableIndexes

public int[] getVariableIndexes()

getInnerDeclarations

public Map getInnerDeclarations()
Description copied from interface: RuleConditionElement
Returns a Map of declarations that are visible inside this conditional element

Specified by:
getInnerDeclarations in interface RuleConditionElement
Returns:

getOuterDeclarations

public Map getOuterDeclarations()
Description copied from interface: RuleConditionElement
Returns a Map of declarations that are visible outside this conditional element.

Specified by:
getOuterDeclarations in interface RuleConditionElement
Returns:

getNestedElements

public List getNestedElements()
Description copied from interface: RuleConditionElement
Returs a list of RuleConditionElement's that are nested inside the current element

Specified by:
getNestedElements in interface RuleConditionElement
Returns:

getResultPattern

public Pattern getResultPattern()

isPatternScopeDelimiter

public boolean isPatternScopeDelimiter()
Description copied from interface: RuleConditionElement
Returns 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:
isPatternScopeDelimiter in interface RuleConditionElement
Returns:

getRequiredDeclarations

public Declaration[] getRequiredDeclarations()

isOpenQuery

public boolean isOpenQuery()

resolveDeclaration

public Declaration resolveDeclaration(String identifier)
Description copied from interface: RuleConditionElement
Resolves 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:
resolveDeclaration in interface RuleConditionElement
Returns:

clone

public Object clone()
Description copied from interface: RuleConditionElement
Returns a clone from itself

Specified by:
clone in interface RuleConditionElement
Specified by:
clone in class ConditionalElement
Returns:

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


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