|
com.im.df.api 5.9 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.im.df.api.dml.DFOperator
com.im.df.api.dml.Operators.SimpleLogicalOperator
public static class Operators.SimpleLogicalOperator
Class for AND/OR operators
| Constructor Summary | |
|---|---|
Operators.SimpleLogicalOperator(String displayName)
|
|
| Method Summary | |
|---|---|
Class<? extends DFFieldDataTypeCapability> |
getReturnType(List<DFTerm> operands)
Compute the return type of the term. |
String |
getToStringPart(List<DFTerm> operands,
int index)
If there is only a single operand, then return no operator, otherwise operands are connected with logical operator name |
boolean |
isFieldAcceptableAsOperand(DFField field)
This is just an utility method which must be implemented by subclasses. |
Object[] |
parseOperands(DFField field,
String operands)
|
void |
validate(DFDataTree dataTree,
List<DFTerm> operands,
Map<String,Object> options,
TermErrors errors)
Validate the operands in context of this operator. |
| Methods inherited from class com.im.df.api.dml.DFOperator |
|---|
correctNumberOfOperands, getDisplayName, getDisplayNameInExpression, getMaxOperands, getMinOperands, toString, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Operators.SimpleLogicalOperator(String displayName)
| Method Detail |
|---|
public void validate(DFDataTree dataTree,
List<DFTerm> operands,
Map<String,Object> options,
TermErrors errors)
DFOperatorDFTerm.validate(com.im.df.api.ddl.DFDataTree).
validate in class DFOperatordataTree - The datatree where this operator will be usedoperands - The list of operandsoptions - Options of this query term (DFTermExpression.getOptions()errors - The errors object which contains the result of the validationpublic Class<? extends DFFieldDataTypeCapability> getReturnType(List<DFTerm> operands)
DFOperator
getReturnType in class DFOperatoroperands - The operands for the computation of return type. The result can be different for
different set of operands.
DFFieldDataTypeCapability or nullpublic boolean isFieldAcceptableAsOperand(DFField field)
DFOperatorFor example some operator takes two operands of different types (text, integer,...), but both must be of the same type. In this case this method returns true for all text, integer etc. fields, but if you use combination of [text, integer] as operands, it will be invalid.
isFieldAcceptableAsOperand in class DFOperatorfield - The field to be tested
public String getToStringPart(List<DFTerm> operands,
int index)
getToStringPart in class DFOperatoroperands - The list of all operandsindex - The index of String [0..operands.size()]
DFOperator.toString(java.util.List) method.
public Object[] parseOperands(DFField field,
String operands)
throws IllegalArgumentException
parseOperands in class DFOperatorIllegalArgumentException
|
com.im.df.api 5.9 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||