Package org.drools.compiler.lang.descr
Class ConnectiveDescr
- java.lang.Object
-
- org.drools.compiler.lang.descr.BaseDescr
-
- org.drools.compiler.lang.descr.RestrictionDescr
-
- 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
Nested Classes Modifier and Type Class Description static classConnectiveDescr.RestrictionConnectiveTypeThe connective types that can be used for a restriction
-
Field Summary
Fields Modifier and Type Field Description static ConnectiveDescr.RestrictionConnectiveTypeANDstatic ConnectiveDescr.RestrictionConnectiveTypeOR
-
Constructor Summary
Constructors Constructor Description ConnectiveDescr()ConnectiveDescr(ConnectiveDescr.RestrictionConnectiveType connective)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(String restriction)voidadd(ConnectiveDescr restriction)voidbuildExpression(StringBuilder sb)ConnectiveDescr.RestrictionConnectiveTypegetConnective()StringgetPrefix()List<Object>getRestrictions()booleanisParen()voidreadExternal(ObjectInput in)voidsetParen(boolean paren)voidsetPrefix(String prefix)StringtoString()voidwriteExternal(ObjectOutput out)-
Methods inherited from class org.drools.compiler.lang.descr.BaseDescr
accept, copyLocation, getColumn, getEndCharacter, getEndColumn, getEndLine, getLine, getNamespace, getResource, getStartCharacter, getText, isNegated, negate, positionAsString, replaceVariable, setEndCharacter, setEndLocation, setLocation, setNamespace, setResource, setStartCharacter, setText
-
-
-
-
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:
readExternalin interfaceExternalizable- Overrides:
readExternalin classBaseDescr- Throws:
IOExceptionClassNotFoundException
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternalin interfaceExternalizable- Overrides:
writeExternalin classBaseDescr- 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)
-
buildExpression
public void buildExpression(StringBuilder sb)
-
-