Drools :: Compiler 6.2.0.Final

org.drools.compiler.lang.descr
Class ConnectiveDescr

java.lang.Object
  extended by org.drools.compiler.lang.descr.BaseDescr
      extended by org.drools.compiler.lang.descr.RestrictionDescr
          extended by org.drools.compiler.lang.descr.ConnectiveDescr
All Implemented Interfaces:
Externalizable, Serializable, org.drools.core.rule.Namespaceable

public class ConnectiveDescr
extends RestrictionDescr

This is used to connect restrictions together for a single field eg: age < 40 & > 30

See Also:
Serialized Form

Nested Class Summary
static class ConnectiveDescr.RestrictionConnectiveType
          The connective types that can be used for a restriction
 
Field Summary
static ConnectiveDescr.RestrictionConnectiveType AND
           
static ConnectiveDescr.RestrictionConnectiveType OR
           
 
Constructor Summary
ConnectiveDescr()
           
ConnectiveDescr(ConnectiveDescr.RestrictionConnectiveType connective)
           
 
Method Summary
 void add(ConnectiveDescr restriction)
           
 void add(String restriction)
           
 void buildExpression(StringBuilder sb)
           
 ConnectiveDescr.RestrictionConnectiveType getConnective()
           
 String getPrefix()
           
 List<Object> getRestrictions()
           
 boolean isParen()
           
 void readExternal(ObjectInput in)
           
 void setParen(boolean paren)
           
 void setPrefix(String prefix)
           
 String toString()
           
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class org.drools.compiler.lang.descr.BaseDescr
copyLocation, getColumn, getEndCharacter, getEndColumn, getEndLine, getLine, getNamespace, getResource, getStartCharacter, getText, positionAsString, setEndCharacter, setEndLocation, setLocation, setNamespace, setResource, setStartCharacter, setText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

AND

public static final ConnectiveDescr.RestrictionConnectiveType AND

OR

public static final ConnectiveDescr.RestrictionConnectiveType OR
Constructor Detail

ConnectiveDescr

public ConnectiveDescr()

ConnectiveDescr

public ConnectiveDescr(ConnectiveDescr.RestrictionConnectiveType connective)
Method Detail

readExternal

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

writeExternal

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

getConnective

public ConnectiveDescr.RestrictionConnectiveType getConnective()

isParen

public boolean isParen()

setParen

public void setParen(boolean paren)

getPrefix

public String getPrefix()

setPrefix

public void setPrefix(String prefix)

add

public void add(ConnectiveDescr restriction)

add

public void add(String restriction)

getRestrictions

public List<Object> getRestrictions()

buildExpression

public void buildExpression(StringBuilder sb)

toString

public String toString()
Overrides:
toString in class Object

Drools :: Compiler 6.2.0.Final

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