net.tinyos.tinydb
Class SelExpr

java.lang.Object
  |
  +--net.tinyos.tinydb.SelExpr
All Implemented Interfaces:
QueryExpr

public class SelExpr
extends java.lang.Object
implements QueryExpr

SelExpr represents a selection expression; selection expressions are of the form: WHERE (field fieldOp fieldConst) OP value Where field is a field in the query, value is an integral value, and op is a SelOp.


Constructor Summary
SelExpr(short field, net.tinyos.tinydb.SelOp op, short value)
           
SelExpr(short field, java.lang.String fieldOp, short fieldConst, net.tinyos.tinydb.SelOp op, short value)
           
 
Method Summary
 short getField()
          Return the id of the field this expression applies to
 short getFieldConst()
          Return the constant that is used in the arithmetic expression that will be performed on the field.
 short getFieldOp()
          Return the arithmetic operation that is used in the arithmetic expression that will be performed to the field.
 byte getSelOpCode()
           
 short getValue()
           
 boolean isAgg()
          Return true if this expression is an aggregator
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SelExpr

public SelExpr(short field,
               net.tinyos.tinydb.SelOp op,
               short value)

SelExpr

public SelExpr(short field,
               java.lang.String fieldOp,
               short fieldConst,
               net.tinyos.tinydb.SelOp op,
               short value)
Method Detail

isAgg

public boolean isAgg()
Description copied from interface: QueryExpr
Return true if this expression is an aggregator

Specified by:
isAgg in interface QueryExpr

getField

public short getField()
Description copied from interface: QueryExpr
Return the id of the field this expression applies to

Specified by:
getField in interface QueryExpr

getValue

public short getValue()

getFieldConst

public short getFieldConst()
Description copied from interface: QueryExpr
Return the constant that is used in the arithmetic expression that will be performed on the field.

Specified by:
getFieldConst in interface QueryExpr

getFieldOp

public short getFieldOp()
Description copied from interface: QueryExpr
Return the arithmetic operation that is used in the arithmetic expression that will be performed to the field.

Specified by:
getFieldOp in interface QueryExpr

getSelOpCode

public byte getSelOpCode()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object