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

java.lang.Object
  |
  +--pl.edu.pjwstk.yaod.yaql.engine.queryresulttypes.QueryResult
        |
        +--pl.edu.pjwstk.yaod.yaql.engine.queryresulttypes.ComplexValue
              |
              +--pl.edu.pjwstk.yaod.yaql.engine.queryresulttypes.BagValue

public class BagValue
extends ComplexValue

The BagValue class represents the bag collections.

Author:
Jakub Trzetrzelewski, jakub_trzetrzelewski@yahoo.com

Fields inherited from class pl.edu.pjwstk.yaod.yaql.engine.queryresulttypes.ComplexValue
results
 
Constructor Summary
BagValue()
          Creates a new empty bag collection.
BagValue(QueryResult r)
          Creates a new bag collection initialized with the r.
BagValue(QueryResult r1, QueryResult r2)
          Creates a new bag collection initialized with the r1 and r2.
BagValue(java.util.Vector v)
          Creates a new bag collection initialized with the v.
 
Method Summary
 java.lang.String getTypeAsString()
          Returns a name of the result (QueryResult) type.
 QueryResult operatorAS(QueryResult r)
          Method responsible for unary as operation.
 QueryResult operatorBAG()
          Method responsible for unary bag operation.
 QueryResult operatorCOMMA(QueryResult r)
          Method responsible for binary comma operation.
 BooleanValue operatorCOMPARE(QueryResult r)
          Method responsible for binary compare operation.
 QueryResult operatorDESCENDING()
          Method responsible for unary descending operation.
 QueryResult operatorDIFFERENCE(QueryResult r)
          Method responsible for binary difference operation.
 BooleanValue operatorINCLUSION(QueryResult r)
          Method responsible for binary inclusion operation.
 QueryResult operatorINTERSECTION(QueryResult r)
          Method responsible for binary intersection operation.
 QueryResult operatorSEQUENCE()
          Method responsible for unary sequence operation.
 QueryResult operatorSTRUCT()
          Method responsible for unary struct operation.
 QueryResult operatorSYMMETRICDIFFERENCE(QueryResult r)
          Method responsible for binary symmetric difference 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.ComplexValue
addBag, addResult, addSequence, addStruct, getFirstResult, getNextResultAt, getNumberOfResults, getResultAt, getResults, getSize, isEmpty, operatorASCENDING, operatorAVERAGE, operatorCOUNT, operatorCREATE, operatorCREATE, operatorCREATELOCAL, operatorCREATELOCAL, operatorCREATEPERMANENT, operatorCREATEPERMANENT, operatorDELETE, operatorDEREFERENCE, operatorEXISTS, operatorFULLDEREFERENCE, operatorGROUPAS, operatorINSERTINTO, operatorMAXIMUM, operatorMINIMUM, operatorMIXEDDEREFERENCE, operatorPRINT, operatorRENAMETO, operatorSPECIALDEREFERENCE, operatorSUM, operatorTOBAG, operatorTOSEQUENCE, operatorTOSINGLE, operatorTOSTRUCT, operatorUPDATETO, operatorXMLPRINT, setResultAt, show
 
Methods inherited from class pl.edu.pjwstk.yaod.yaql.engine.queryresulttypes.QueryResult
getLongestTypeAsSpacesString, getPreparedTypeAsString, nested, operatorABSOLUTEVALUE, operatorASSIGN, operatorCONDITION, operatorCONJUNCTION, operatorCOSINE, operatorDISJUNCTION, operatorDIVIDE, operatorDIVIDEASSIGN, operatorEQUAL, operatorEXPONENT, operatorGREATER, operatorGREATEREQUAL, operatorINSERT, operatorLOGARITHM, operatorLOWER, operatorLOWEREQUAL, operatorMINUS, operatorMINUS, operatorMINUSASSIGN, operatorMODULO, operatorMODULOASSIGN, operatorNEGATION, operatorNOTEQUAL, operatorPLUS, operatorPLUS, operatorPLUSASSIGN, operatorPOWER, operatorPREDECREMENT, operatorPREINCREMENT, operatorPRINT, operatorRANGE, operatorRANGE, operatorSIGNUM, operatorSINE, operatorSQUAREROOT, operatorTIMES, operatorTIMESASSIGN, operatorTODOUBLE, operatorTOINTEGER, operatorTOSTRING, operatorXMLPRINT, show
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BagValue

public BagValue()
Creates a new empty bag collection.

BagValue

public BagValue(java.util.Vector v)
Creates a new bag collection initialized with the v.
Parameters:
v - vector of elements.

BagValue

public BagValue(QueryResult r)
Creates a new bag collection initialized with the r.
Parameters:
r - any result.
See Also:
QueryResult

BagValue

public BagValue(QueryResult r1,
                QueryResult r2)
Creates a new bag collection initialized with the r1 and r2.
Parameters:
r1 - any result.
r2 - any result.
See Also:
QueryResult
Method Detail

getTypeAsString

public java.lang.String getTypeAsString()
Returns a name of the result (QueryResult) type.
Overrides:
getTypeAsString in class QueryResult
Returns:
a binder type name.
See Also:
QueryResult

operatorSTRUCT

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

operatorBAG

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

operatorSEQUENCE

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

operatorUNIQUE

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

operatorDESCENDING

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

operatorAS

public QueryResult operatorAS(QueryResult r)
                       throws TypeMismatchException
Method responsible for unary as operation.
Overrides:
operatorAS 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

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, SingleValue, StructValue

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, SequenceValue, SingleValue, StructValue

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

operatorINTERSECTION

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

operatorDIFFERENCE

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

operatorSYMMETRICDIFFERENCE

public QueryResult operatorSYMMETRICDIFFERENCE(QueryResult r)
                                        throws TypeMismatchException
Method responsible for binary symmetric difference operation.
Overrides:
operatorSYMMETRICDIFFERENCE in class QueryResult
Parameters:
r - the right operand of the binary symmetric difference operator.
Returns:
the result of the binary symmetric difference operation.
Throws:
TypeMismatchException - if type mismatch occurs.
See Also:
QueryResult

operatorCOMPARE

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