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

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.StringValue

public class StringValue
extends AtomicValue

The StringValue class represents the string values.

Author:
Jakub Trzetrzelewski, jakub_trzetrzelewski@yahoo.com

Constructor Summary
StringValue(java.lang.String value)
          Creates a new string initialized with specified value.
 
Method Summary
 java.lang.String getTypeAsString()
          Returns a name of the result (QueryResult) type.
 java.lang.String getValue()
          Returns the value of the string value.
 java.lang.String getValueAsString()
          Returns the string value as a string value.
 BooleanValue operatorCOMPARE(QueryResult r)
          Method responsible for binary compare operation.
 QueryResult operatorDESCENDING()
          Method responsible for unary descending operation.
 BooleanValue operatorEQUAL(QueryResult r)
          Method responsible for binary equal operation.
 BooleanValue operatorNOTEQUAL(QueryResult r)
          Method responsible for binary not equal operation.
 QueryResult operatorPLUS(QueryResult r)
          Method responsible for binary plus operation, in this case - string concatenation.
 StringValue operatorTOSTRING()
          Method responsible for unary tostring operation.
 java.lang.String stringValue()
          Returns the string 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, operatorCONDITION, operatorCONJUNCTION, operatorCOSINE, operatorCREATE, operatorCREATE, operatorCREATELOCAL, operatorCREATELOCAL, operatorCREATEPERMANENT, operatorCREATEPERMANENT, operatorDELETE, operatorDIFFERENCE, operatorDISJUNCTION, operatorDIVIDE, operatorDIVIDEASSIGN, operatorEXPONENT, operatorGREATER, operatorGREATEREQUAL, operatorINSERT, operatorINSERTINTO, operatorINTERSECTION, operatorLOGARITHM, operatorLOWER, operatorLOWEREQUAL, operatorMAXIMUM, operatorMINIMUM, operatorMINUS, operatorMINUS, operatorMINUSASSIGN, operatorMODULO, operatorMODULOASSIGN, operatorNEGATION, 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

StringValue

public StringValue(java.lang.String value)
Creates a new string 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 string result type name.
See Also:
QueryResult

getValueAsString

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

getValue

public java.lang.String getValue()
Returns the value of the string value.
Returns:
the value of the string value.

stringValue

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

operatorDESCENDING

public QueryResult operatorDESCENDING()
                               throws TypeMismatchException
Method responsible for unary descending operation.
Overrides:
operatorDESCENDING in class QueryResult
Parameters:
r - the right operand of the unary descending operator.
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
Parameters:
r - the right operand of the unary tostring operator.
Returns:
the result of the unary tostring operation.
Throws:
TypeMismatchException - if type mismatch occurs.

operatorPLUS

public QueryResult operatorPLUS(QueryResult r)
                         throws TypeMismatchException
Method responsible for binary plus operation, in this case - string concatenation.
Overrides:
operatorPLUS in class QueryResult
Parameters:
r - the right operand of the binary plus operator.
Returns:
concatenated string.
Throws:
TypeMismatchException - if type mismatch occurs.
See Also:
QueryResult, BooleanValue, IntegerValue, DoubleValue

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, BooleanValue

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, BooleanValue

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