Class QueryImpl
- java.lang.Object
-
- org.drools.core.definitions.rule.impl.RuleImpl
-
- org.drools.core.definitions.rule.impl.QueryImpl
-
- All Implemented Interfaces:
Externalizable,Serializable,Wireable,Dialectable,org.kie.api.definition.KieDefinition,org.kie.api.definition.rule.Query,org.kie.api.definition.rule.Rule,org.kie.internal.definition.rule.InternalRule
public class QueryImpl extends RuleImpl implements org.kie.api.definition.rule.Query
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.drools.core.definitions.rule.impl.RuleImpl
RuleImpl.SafeEnabled, RuleImpl.SafeSalience
-
Nested classes/interfaces inherited from interface org.kie.api.definition.KieDefinition
org.kie.api.definition.KieDefinition.KnowledgeType
-
Nested classes/interfaces inherited from interface org.drools.core.rule.accessor.Wireable
Wireable.Immutable
-
-
Field Summary
-
Fields inherited from class org.drools.core.definitions.rule.impl.RuleImpl
activationListener, DEFAULT_CONSEQUENCE_NAME
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends Annotation>
Class<?>getAbductionClass(Function<Class<T>,T> annotationReader)Class<? extends Annotation>getAbductiveAnnotationClass()org.kie.api.definition.KieDefinition.KnowledgeTypegetKnowledgeType()Declaration[]getParameters()booleanisAbductive()booleanisQuery()booleanisReturnBound()booleanisValid()Override this as Queries will NEVER have a consequence, and it should not be taken into account when deciding if it is valid.booleanprocessAbduction(Activation resultLeftTuple, DroolsQuery dquery, Object[] objects, ReteEvaluator reteEvaluator)voidreadExternal(ObjectInput in)voidsetParameters(Declaration[] parameters)voidsetReturnType(ObjectType objectType, String[] params, String[] args, Declaration[] declarations)voidwriteExternal(ObjectOutput out)-
Methods inherited from class org.drools.core.definitions.rule.impl.RuleImpl
addChild, addMetaAttribute, addNamedConsequence, addPattern, addUsedQuery, collectDependingQueries, equals, findEnabledDeclarations, findSalienceDeclarations, getActivationGroup, getActivationListener, getAgendaGroup, getAutoFocus, getCalendars, getChildren, getConsequence, getConsequenceMetaData, getDateEffective, getDateExpires, getDeclaration, getDeclarations, getDependingQueries, getDialect, getEnabled, getFullyQualifiedName, getId, getLhs, getLoadOrder, getMetaData, getMetaData, getName, getNamedConsequence, getNamespace, getPackage, getPackageName, getParent, getRequiredDeclarationsForConsequence, getResource, getRuleFlowGroup, getRuleUnitClassName, getSalience, getSalienceValue, getTimer, getTransformedLhs, hasCalendars, hasChildren, hashCode, hasLogicalDependency, hasNamedConsequences, isAllMatches, isDataDriven, isEager, isEffective, isEnabled, isLockOnActive, isMainAgendaGroup, isNoLoop, isSalienceDynamic, isSemanticallyValid, removeChild, setActivationGroup, setActivationListener, setAgendaGroup, setAllMatches, setAutoFocus, setCalendars, setConsequence, setDataDriven, setDateEffective, setDateExpires, setDialect, setEager, setEnabled, setHasLogicalDependency, setLhs, setLoadOrder, setLockOnActive, setNoLoop, setPackage, setParent, setRequiredDeclarationsForConsequence, setResource, setRuleFlowGroup, setRuleUnitClass, setRuleUnitClassName, setSalience, setSemanticallyValid, setTimer, toRuleNameAndPathString, toString, wire
-
-
-
-
Constructor Detail
-
QueryImpl
public QueryImpl()
-
QueryImpl
public QueryImpl(String name)
-
-
Method Detail
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternalin interfaceExternalizable- Overrides:
writeExternalin classRuleImpl- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternalin interfaceExternalizable- Overrides:
readExternalin classRuleImpl- Throws:
IOExceptionClassNotFoundException
-
isValid
public boolean isValid()
Override this as Queries will NEVER have a consequence, and it should not be taken into account when deciding if it is valid.
-
setParameters
public void setParameters(Declaration[] parameters)
-
getParameters
public Declaration[] getParameters()
-
getKnowledgeType
public org.kie.api.definition.KieDefinition.KnowledgeType getKnowledgeType()
- Specified by:
getKnowledgeTypein interfaceorg.kie.api.definition.KieDefinition- Overrides:
getKnowledgeTypein classRuleImpl
-
isAbductive
public boolean isAbductive()
-
processAbduction
public boolean processAbduction(Activation resultLeftTuple, DroolsQuery dquery, Object[] objects, ReteEvaluator reteEvaluator)
-
isReturnBound
public boolean isReturnBound()
-
setReturnType
public void setReturnType(ObjectType objectType, String[] params, String[] args, Declaration[] declarations) throws NoSuchMethodException
- Throws:
NoSuchMethodException
-
getAbductiveAnnotationClass
public Class<? extends Annotation> getAbductiveAnnotationClass()
-
getAbductionClass
public <T extends Annotation> Class<?> getAbductionClass(Function<Class<T>,T> annotationReader)
-
-