com.sun.wbem.query
Class BinaryRelQueryExp
java.lang.Object
|
+--com.sun.wbem.query.QueryExp
|
+--com.sun.wbem.query.BinaryRelQueryExp
- public class BinaryRelQueryExp
- extends QueryExp
Class representing binary relations between non-boolean operands.
v1 relop v2, where
relop is <, >, <=, >=, ==, like, not like
- Since:
- WBEM 1.0
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
BinaryRelQueryExp
public BinaryRelQueryExp(int op,
ValueExp v1,
ValueExp v2)
- Constructor for binary relations.
- Parameters:
op
- Represents the relation between operands.v1
- The left valueExp. It is assumed that the left value is
always a attribute.v2
- The right valueExp. It is assumed that the right value is
a constant value expression like StringValueExp.
BinaryRelQueryExp
public BinaryRelQueryExp()
- Empty constructor.
getOperator
public int getOperator()
- Accessor for the relational operation
getLeftValue
public ValueExp getLeftValue()
- Accessor for left value
getRightValue
public ValueExp getRightValue()
- Accessor for right value
apply
public boolean apply(CIMElement obj)
throws CIMException
- returns true if the 'columns' of the input 'row' satisfy the binary
relation. The only supported input element is a CIMInstance. This
method extracts the attribute in CIMInstance associated with the
leftValue attribute and applies the relation operation with the
rightValue
- Overrides:
- apply in class QueryExp
- Parameters:
CIMElement
- - the input row. Only CIMInstance is supported.- Returns:
- boolean true if the input element satisfy the binary relation
false otherwise.
toString
public java.lang.String toString()
- Overrides:
- toString in class java.lang.Object