pl.edu.pjwstk.yaod.yaql.engine.queryresulttypes
Class SingleValue

java.lang.Object
  |
  +--pl.edu.pjwstk.yaod.yaql.engine.queryresulttypes.QueryResult
        |
        +--pl.edu.pjwstk.yaod.yaql.engine.queryresulttypes.SingleValue
Direct Known Subclasses:
AtomicValue, BinderValue, IdentifierValue

public abstract class SingleValue
extends QueryResult

The SingleValue class represents the main class of available single results (binders, identifiers and atomic values).

Author:
Jakub Trzetrzelewski, jakub_trzetrzelewski@yahoo.com

Constructor Summary
SingleValue()
           
 
Method Summary
 QueryResult getNextResultAt(int i)
          Method used during evaluation of non algebraic operators.
 int getNumberOfResults()
          Method used during evaluation of non algebraic operators.
 QueryResult operatorAS(QueryResult r)
          Method responsible for unary group as operation.
 QueryResult operatorASCENDING()
          Method responsible for unary ascending operation.
 QueryResult operatorBAG()
          Method responsible for unary bag operation.
 QueryResult operatorCOMMA(QueryResult r)
          Method responsible for binary comma operation.
 IntegerValue operatorCOUNT()
          Method responsible for unary count operation.
 BooleanValue operatorEXISTS()
          Method responsible for unary exists operation.
 BinderValue operatorGROUPAS(QueryResult r)
          Method responsible for unary as operation.
 BooleanValue operatorINCLUSION(QueryResult r)
          Method responsible for binary inclusion operation.
 QueryResult operatorSEQUENCE()
          Method responsible for unary sequence operation.
 QueryResult operatorSTRUCT()
          Method responsible for unary struct operation.
 QueryResult operatorTOSINGLE()
          Method responsible for unary tosingle operation.
 QueryResult operatorUNION(QueryResult r)
          Method responsible for binary union operation.
 QueryResult operatorUNIQUE()
          Method responsible for unary unique operation.
 
Methods inherited from class pl.edu.pjwstk.yaod.yaql.engine.queryresulttypes.QueryResult
getLongestTypeAsSpacesString, getPreparedTypeAsString, getTypeAsString, nested, operatorABSOLUTEVALUE, operatorASSIGN, operatorAVERAGE, operatorCOMPARE, operatorCONDITION, operatorCONJUNCTION, operatorCOSINE, operatorCREATE, operatorCREATE, operatorCREATELOCAL, operatorCREATELOCAL, operatorCREATEPERMANENT, operatorCREATEPERMANENT, operatorDELETE, operatorDEREFERENCE, operatorDESCENDING, operatorDIFFERENCE, operatorDISJUNCTION, operatorDIVIDE, operatorDIVIDEASSIGN, operatorEQUAL, operatorEXPONENT, operatorFULLDEREFERENCE, operatorGREATER, operatorGREATEREQUAL, operatorINSERT, operatorINSERTINTO, operatorINTERSECTION, operatorLOGARITHM, operatorLOWER, operatorLOWEREQUAL, operatorMAXIMUM, operatorMINIMUM, operatorMINUS, operatorMINUS, operatorMINUSASSIGN, operatorMIXEDDEREFERENCE, operatorMODULO, operatorMODULOASSIGN, operatorNEGATION, operatorNOTEQUAL, operatorPLUS, operatorPLUS, operatorPLUSASSIGN, operatorPOWER, operatorPREDECREMENT, operatorPREINCREMENT, operatorPRINT, operatorPRINT, operatorRANGE, operatorRANGE, operatorRENAMETO, operatorSIGNUM, operatorSINE, operatorSPECIALDEREFERENCE, operatorSQUAREROOT, operatorSUM, operatorSYMMETRICDIFFERENCE, operatorTIMES, operatorTIMESASSIGN, operatorTOBAG, operatorTODOUBLE, operatorTOINTEGER, operatorTOSEQUENCE, operatorTOSTRING, operatorTOSTRUCT, operatorUPDATETO, operatorXMLPRINT, operatorXMLPRINT, show, show
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingleValue

public SingleValue()
Method Detail

getNumberOfResults

public int getNumberOfResults()
Method used during evaluation of non algebraic operators. It returns 1 for all single results (identifiers, binders and atomic values).
Overrides:
getNumberOfResults in class QueryResult
Returns:
1 always.

getNextResultAt

public QueryResult getNextResultAt(int i)
Method used during evaluation of non algebraic operators. It returns this for all single results, despite of the value of argument i.
Overrides:
getNextResultAt in class QueryResult
Parameters:
i - in single values it is ignored.
Returns:
this always.
See Also:
QueryResult

operatorTOSINGLE

public QueryResult operatorTOSINGLE()
                             throws TypeMismatchException
Method responsible for unary tosingle operation.
Overrides:
operatorTOSINGLE in class QueryResult
Returns:
the result of the unary as operation.
Throws:
TypeMismatchException - if type mismatch occurs.
See Also:
QueryResult

operatorEXISTS

public BooleanValue operatorEXISTS()
                            throws TypeMismatchException
Method responsible for unary exists operation.
Overrides:
operatorEXISTS in class QueryResult
Returns:
the result of the unary as operation.
Throws:
TypeMismatchException - if type mismatch occurs.
See Also:
BooleanValue

operatorCOUNT

public IntegerValue operatorCOUNT()
                           throws TypeMismatchException
Method responsible for unary count operation.
Overrides:
operatorCOUNT in class QueryResult
Returns:
the result of the unary count operation.
Throws:
TypeMismatchException - if type mismatch occurs.
See Also:
IntegerValue

operatorBAG

public QueryResult operatorBAG()
                        throws TypeMismatchException
Method responsible for unary bag operation.
Overrides:
operatorBAG in class QueryResult
Returns:
the result of the unary as operation.
Throws:
TypeMismatchException - if type mismatch occurs.
See Also:
QueryResult, BagValue

operatorSTRUCT

public QueryResult operatorSTRUCT()
                           throws TypeMismatchException
Method responsible for unary struct operation.
Overrides:
operatorSTRUCT in class QueryResult
Returns:
the result of the unary as operation.
Throws:
TypeMismatchException - if type mismatch occurs.
See Also:
QueryResult, StructValue

operatorSEQUENCE

public QueryResult operatorSEQUENCE()
                             throws TypeMismatchException
Method responsible for unary sequence operation.
Overrides:
operatorSEQUENCE in class QueryResult
Returns:
the result of the unary as operation.
Throws:
TypeMismatchException - if type mismatch occurs.
See Also:
QueryResult, SequenceValue

operatorUNIQUE

public QueryResult operatorUNIQUE()
                           throws TypeMismatchException
Method responsible for unary unique operation.
Overrides:
operatorUNIQUE in class QueryResult
Returns:
the result of the unary as operation.
Throws:
TypeMismatchException - if type mismatch occurs.
See Also:
QueryResult

operatorASCENDING

public QueryResult operatorASCENDING()
                              throws TypeMismatchException
Method responsible for unary ascending operation.
Overrides:
operatorASCENDING in class QueryResult
Returns:
the result of the unary as operation.
Throws:
TypeMismatchException - if type mismatch occurs.
See Also:
QueryResult

operatorGROUPAS

public BinderValue operatorGROUPAS(QueryResult r)
                            throws TypeMismatchException
Method responsible for unary as operation.
Overrides:
operatorGROUPAS in class QueryResult
Parameters:
r - the right operand of the unary as operator.
Returns:
the result of the unary as operation.
Throws:
TypeMismatchException - if type mismatch occurs.
See Also:
QueryResult, BinderValue, StringValue

operatorAS

public QueryResult operatorAS(QueryResult r)
                       throws TypeMismatchException
Method responsible for unary group as operation.
Overrides:
operatorAS in class QueryResult
Parameters:
r - the right operand of the unary group as operator.
Returns:
the result of the unary group as operation.
Throws:
TypeMismatchException - if type mismatch occurs.
See Also:
QueryResult, BinderValue, StringValue

operatorUNION

public QueryResult operatorUNION(QueryResult r)
                          throws TypeMismatchException
Method responsible for binary union operation.
Overrides:
operatorUNION in class QueryResult
Parameters:
r - the right operand of the binary union operator.
Returns:
the result of the binary union operation.
Throws:
TypeMismatchException - if type mismatch occurs.
See Also:
QueryResult, IntegerValue, StructValue, BagValue

operatorCOMMA

public QueryResult operatorCOMMA(QueryResult r)
                          throws TypeMismatchException
Method responsible for binary comma operation.
Overrides:
operatorCOMMA in class QueryResult
Parameters:
r - the right operand of the binary comma operator.
Returns:
the result of the binary comma operation.
Throws:
TypeMismatchException - if type mismatch occurs.
See Also:
QueryResult, SequenceValue, StructValue, BagValue

operatorINCLUSION

public BooleanValue operatorINCLUSION(QueryResult r)
                               throws TypeMismatchException
Method responsible for binary inclusion operation.
Overrides:
operatorINCLUSION in class QueryResult
Parameters:
r - the right operand of the binary inclusion operator.
Returns:
the result of the binary inclusion operation.
Throws:
TypeMismatchException - if type mismatch occurs.
See Also:
QueryResult, BooleanValue, SequenceValue, BagValue