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

java.lang.Object
  |
  +--pl.edu.pjwstk.yaod.yaql.engine.queryresulttypes.QueryResult
        |
        +--pl.edu.pjwstk.yaod.yaql.engine.queryresulttypes.SingleValue
              |
              +--pl.edu.pjwstk.yaod.yaql.engine.queryresulttypes.AtomicValue
                    |
                    +--pl.edu.pjwstk.yaod.yaql.engine.queryresulttypes.BooleanValue

public class BooleanValue
extends AtomicValue

The BooleanValue class represents the boolean values.

Author:
Jakub Trzetrzelewski, jakub_trzetrzelewski@yahoo.com

Constructor Summary
BooleanValue(boolean value)
          Creates a new boolean value initialized with specified value.
BooleanValue(java.lang.Boolean value)
          Creates a new boolean value initialized with specified value.
 
Method Summary
 boolean booleanValue()
          Returns the boolean value as a boolean value.
 java.lang.String getTypeAsString()
          Returns a name of the result (QueryResult) type.
 java.lang.Boolean getValue()
          Returns the value of a boolean value.
 java.lang.String getValueAsString()
          Returns the boolean value as a string value.
 BooleanValue operatorCOMPARE(QueryResult r)
          Method responsible for binary compare operation.
 QueryResult operatorCONDITION(QueryResult l, QueryResult r)
          Method responsible for ternary condition operation.
 BooleanValue operatorCONJUNCTION(QueryResult r)
          Method responsible for binary conjunction operation.
 QueryResult operatorDESCENDING()
          Method responsible for unary descending operation.
 BooleanValue operatorDISJUNCTION(QueryResult r)
          Method responsible for binary disjunction operation.
 BooleanValue operatorEQUAL(QueryResult r)
          Method responsible for binary equal operation.
 BooleanValue operatorNEGATION()
          Method responsible for unary negation operation.
 BooleanValue operatorNOTEQUAL(QueryResult r)
          Method responsible for binary not equal operation.
 QueryResult operatorPLUS(QueryResult r)
          Method responsible for binary plus operation.
 StringValue operatorTOSTRING()
          Method responsible for unary tostring operation.
 java.lang.String stringValue()
          Returns the boolean value as a string value.
 
Methods inherited from class pl.edu.pjwstk.yaod.yaql.engine.queryresulttypes.AtomicValue
operatorDEREFERENCE, operatorFULLDEREFERENCE, operatorMIXEDDEREFERENCE, operatorPRINT, operatorSPECIALDEREFERENCE, operatorXMLPRINT, show
 
Methods inherited from class pl.edu.pjwstk.yaod.yaql.engine.queryresulttypes.SingleValue
getNextResultAt, getNumberOfResults, operatorAS, operatorASCENDING, operatorBAG, operatorCOMMA, operatorCOUNT, operatorEXISTS, operatorGROUPAS, operatorINCLUSION, operatorSEQUENCE, operatorSTRUCT, operatorTOSINGLE, operatorUNION, operatorUNIQUE
 
Methods inherited from class pl.edu.pjwstk.yaod.yaql.engine.queryresulttypes.QueryResult
getLongestTypeAsSpacesString, getPreparedTypeAsString, nested, operatorABSOLUTEVALUE, operatorASSIGN, operatorAVERAGE, operatorCOSINE, operatorCREATE, operatorCREATE, operatorCREATELOCAL, operatorCREATELOCAL, operatorCREATEPERMANENT, operatorCREATEPERMANENT, operatorDELETE, operatorDIFFERENCE, operatorDIVIDE, operatorDIVIDEASSIGN, operatorEXPONENT, operatorGREATER, operatorGREATEREQUAL, operatorINSERT, operatorINSERTINTO, operatorINTERSECTION, operatorLOGARITHM, operatorLOWER, operatorLOWEREQUAL, operatorMAXIMUM, operatorMINIMUM, operatorMINUS, operatorMINUS, operatorMINUSASSIGN, operatorMODULO, operatorMODULOASSIGN, operatorPLUS, operatorPLUSASSIGN, operatorPOWER, operatorPREDECREMENT, operatorPREINCREMENT, operatorPRINT, operatorRANGE, operatorRANGE, operatorRENAMETO, operatorSIGNUM, operatorSINE, operatorSQUAREROOT, operatorSUM, operatorSYMMETRICDIFFERENCE, operatorTIMES, operatorTIMESASSIGN, operatorTOBAG, operatorTODOUBLE, operatorTOINTEGER, operatorTOSEQUENCE, operatorTOSTRUCT, operatorUPDATETO, operatorXMLPRINT, show
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BooleanValue

public BooleanValue(java.lang.Boolean value)
Creates a new boolean value initialized with specified value.
Parameters:
value - the initializing value.

BooleanValue

public BooleanValue(boolean value)
Creates a new boolean value initialized with specified value.
Parameters:
value - the initializing value.
Method Detail

getTypeAsString

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

getValueAsString

public java.lang.String getValueAsString()
Returns the boolean value as a string value.
Overrides:
getValueAsString in class AtomicValue
Returns:
the result type as string.

getValue

public java.lang.Boolean getValue()
Returns the value of a boolean value.
Returns:
the value of a boolean value.

booleanValue

public boolean booleanValue()
Returns the boolean value as a boolean value.
Returns:
the boolean value as a boolean value.

stringValue

public java.lang.String stringValue()
Returns the boolean value as a string value.
Returns:
the boolean value as a string value.

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

operatorTOSTRING

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

operatorNEGATION

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

operatorPLUS

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

operatorEQUAL

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

operatorNOTEQUAL

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

operatorDISJUNCTION

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

operatorCONJUNCTION

public BooleanValue operatorCONJUNCTION(QueryResult r)
                                 throws TypeMismatchException
Method responsible for binary conjunction operation.
Overrides:
operatorCONJUNCTION in class QueryResult
Parameters:
r - the right operand of the binary conjunction operator.
Returns:
the result of the binary conjunction 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

operatorCONDITION

public QueryResult operatorCONDITION(QueryResult l,
                                     QueryResult r)
                              throws TypeMismatchException
Method responsible for ternary condition operation.
Overrides:
operatorCONDITION in class QueryResult
Parameters:
m - the middle operand of the ternary condition operator.
r - the right operand of the ternary condition operator.
Returns:
the result of the ternary condition operation.
Throws:
TypeMismatchException - if type mismatch occurs.
See Also:
QueryResult