Quadcap Embeddable Database

com.quadcap.sql.types.ValueString Class Reference

Inheritance diagram for com.quadcap.sql.types.ValueString:

com.quadcap.sql.types.Value Externalizable ExternalizeProxy Externable List of all members.

Detailed Description

A String value.

Used to hold CHAR or VARCHAR types.

Author:
Stan Bailes

Definition at line 64 of file ValueString.java.

Public Member Functions

 ValueString ()
 Default constructor.

 ValueString (boolean quoted, String val)
 Explicit constructor (from parser).

 ValueString (String val)
 Construct a ValueString to wrap a String value.

String stringValue ()
 Return the string value of this object.

String toString ()
 Return the string value of this object ;-).

Value unop (int op) throws ValueException
 String unary ops.

Value binop (int op, Value l) throws ValueException
 Multiple dispatch.

Value binop (int op, ValueDate r) throws ValueException
 String op Date.

Value binop (int op, ValueTime r) throws ValueException
 String op Time.

Value binop (int op, ValueTimestamp r) throws ValueException
 String op Timestamp.

Value binop (int op, ValueNull r) throws ValueException
 String op NULL.

Value binop (int op, ValuePattern r) throws ValueException
 String op Pattern.

Value binop (int op, ValueString r) throws ValueException
 String op String.

void readExternal (ObjectInput in) throws IOException, ClassNotFoundException
 Read me from a stream.

void writeExternal (ObjectOutput out) throws IOException
 Write me to a stream.

Object readObject (ObjectInput in) throws IOException, ClassNotFoundException
 Externable: readObject.

void writeObject (ObjectOutput out, Object object) throws IOException
 Externable: writeObject.

Object asJavaObject ()
 Return as Java object.

void fromJavaObject (Object obj)
 Copy from Java object.

InputStream getBinaryStream ()
 Return binary stream to access string bytes.

Reader getCharacterStream ()
 Return character reader to access string chars.

Value convert (TypeTinyInt type) throws ValueException
 Convert to TinyInt.

Value convert (TypeSmallInt type) throws ValueException
 Convert to SmallInt.

Value convert (TypeInt type) throws ValueException
 Convert to Int.

Value convert (TypeBigInt type) throws ValueException
 Convert to BigInt.

Value convert (TypeDecimal type) throws ValueException
 Convert to Decimal.

Value convert (TypeReal type) throws ValueException
 Convert to Real/Double/Float.

Value convert (TypeChar type) throws ValueException
 Convert to Char.

Value convert (TypeVarChar type) throws ValueException
 Convert to VarChar.

Value convert (TypeDate type) throws ValueException
 Convert to Date.

Value convert (TypeTime type) throws ValueException
 Convert to Time.

Value convert (TypeTimestamp type) throws ValueException
 Convert to Timestamp.

Value convert (TypeInterval type) throws ValueException
 Convert to Interval.

Value convert (TypeClob type) throws ValueException
 Convert to Clob.

Type getType ()
 Return my type.

void serializeKey (KeyStream out) throws IOException
 Serialize as key.

Extern getExtern ()
void setExtern (Extern extern)

Static Public Member Functions

Value binop_convert (int op, ValueString l, Value r) throws ValueException
 Ops on other values Coerced to Strings.

Value binop (int op, ValueString l, ValueString r) throws ValueException

Static Package Functions

final int compareStrings (final String a, final String b)
 Case sensitive/insensitve comparsion.


Package Attributes

String val
 Extern = null
 My class's Extern object.


Static Package Attributes

ExternProxyString proxy = new ExternProxyString()


Constructor & Destructor Documentation

com.quadcap.sql.types.ValueString.ValueString  ) 
 

Default constructor.

Definition at line 74 of file ValueString.java.

Referenced by com.quadcap.sql.types.ValueString.binop(), com.quadcap.sql.types.ValueString.binop_convert(), com.quadcap.sql.types.ValueString.convert(), and com.quadcap.sql.types.ValueString.readObject().

com.quadcap.sql.types.ValueString.ValueString boolean  quoted,
String  val
 

Explicit constructor (from parser).

Definition at line 79 of file ValueString.java.

com.quadcap.sql.types.ValueString.ValueString String  val  ) 
 

Construct a ValueString to wrap a String value.

Definition at line 106 of file ValueString.java.


Member Function Documentation

Object com.quadcap.sql.types.ValueString.asJavaObject  )  [virtual]
 

Return as Java object.

Implements com.quadcap.sql.types.Value.

Definition at line 312 of file ValueString.java.

References com.quadcap.sql.types.ValueString.val.

Value com.quadcap.sql.types.ValueString.binop int  op,
ValueString  l,
ValueString  r
throws ValueException [static]
 

Definition at line 229 of file ValueString.java.

References com.quadcap.sql.types.ValueString.ValueString().

Value com.quadcap.sql.types.ValueString.binop int  op,
ValueString  r
throws ValueException
 

String op String.

Reimplemented from com.quadcap.sql.types.Value.

Definition at line 225 of file ValueString.java.

Value com.quadcap.sql.types.ValueString.binop int  op,
ValuePattern  r
throws ValueException
 

String op Pattern.

Reimplemented from com.quadcap.sql.types.Value.

Definition at line 197 of file ValueString.java.

References com.quadcap.sql.types.Value.binop().

Value com.quadcap.sql.types.ValueString.binop int  op,
ValueNull  r
throws ValueException
 

String op NULL.

Reimplemented from com.quadcap.sql.types.Value.

Definition at line 178 of file ValueString.java.

Value com.quadcap.sql.types.ValueString.binop int  op,
ValueTimestamp  r
throws ValueException
 

String op Timestamp.

Reimplemented from com.quadcap.sql.types.Value.

Definition at line 167 of file ValueString.java.

References com.quadcap.sql.types.Value.binop(), and com.quadcap.sql.types.ValueString.val.

Value com.quadcap.sql.types.ValueString.binop int  op,
ValueTime  r
throws ValueException
 

String op Time.

Reimplemented from com.quadcap.sql.types.Value.

Definition at line 156 of file ValueString.java.

References com.quadcap.sql.types.Value.binop(), and com.quadcap.sql.types.ValueString.val.

Value com.quadcap.sql.types.ValueString.binop int  op,
ValueDate  r
throws ValueException
 

String op Date.

Reimplemented from com.quadcap.sql.types.Value.

Definition at line 145 of file ValueString.java.

References com.quadcap.sql.types.Value.binop(), and com.quadcap.sql.types.ValueString.val.

Value com.quadcap.sql.types.ValueString.binop int  op,
Value  l
throws ValueException [virtual]
 

Multiple dispatch.

Implements com.quadcap.sql.types.Value.

Definition at line 138 of file ValueString.java.

References com.quadcap.sql.types.ValueString.binop().

Referenced by com.quadcap.sql.types.ValueString.binop().

Value com.quadcap.sql.types.ValueString.binop_convert int  op,
ValueString  l,
Value  r
throws ValueException [static]
 

Ops on other values Coerced to Strings.

Definition at line 204 of file ValueString.java.

References com.quadcap.sql.types.ValueString.binop_convert(), and com.quadcap.sql.types.ValueString.ValueString().

Referenced by com.quadcap.sql.types.ValueString.binop_convert().

final int com.quadcap.sql.types.ValueString.compareStrings final String  a,
final String  b
[static, package]
 

Case sensitive/insensitve comparsion.

Definition at line 214 of file ValueString.java.

References com.quadcap.sql.types.ValueString.compareStrings().

Referenced by com.quadcap.sql.types.ValueString.compareStrings().

Value com.quadcap.sql.types.ValueString.convert TypeClob  type  )  throws ValueException
 

Convert to Clob.

Reimplemented from com.quadcap.sql.types.Value.

Definition at line 494 of file ValueString.java.

References com.quadcap.sql.types.ValueString.val.

Value com.quadcap.sql.types.ValueString.convert TypeInterval  type  )  throws ValueException
 

Convert to Interval.

Reimplemented from com.quadcap.sql.types.Value.

Definition at line 483 of file ValueString.java.

References com.quadcap.sql.types.ValueString.val.

Value com.quadcap.sql.types.ValueString.convert TypeTimestamp  type  )  throws ValueException
 

Convert to Timestamp.

Reimplemented from com.quadcap.sql.types.Value.

Definition at line 472 of file ValueString.java.

References com.quadcap.sql.types.ValueString.val.

Value com.quadcap.sql.types.ValueString.convert TypeTime  type  )  throws ValueException
 

Convert to Time.

Reimplemented from com.quadcap.sql.types.Value.

Definition at line 461 of file ValueString.java.

References com.quadcap.sql.types.ValueString.val.

Value com.quadcap.sql.types.ValueString.convert TypeDate  type  )  throws ValueException
 

Convert to Date.

Reimplemented from com.quadcap.sql.types.Value.

Definition at line 450 of file ValueString.java.

References com.quadcap.sql.types.ValueString.val.

Value com.quadcap.sql.types.ValueString.convert TypeVarChar  type  )  throws ValueException
 

Convert to VarChar.

Reimplemented from com.quadcap.sql.types.Value.

Definition at line 437 of file ValueString.java.

References com.quadcap.sql.types.ValueString.val.

Value com.quadcap.sql.types.ValueString.convert TypeChar  type  )  throws ValueException
 

Convert to Char.

Reimplemented from com.quadcap.sql.types.Value.

Definition at line 410 of file ValueString.java.

References com.quadcap.sql.types.ValueString.val, and com.quadcap.sql.types.ValueString.ValueString().

Value com.quadcap.sql.types.ValueString.convert TypeReal  type  )  throws ValueException
 

Convert to Real/Double/Float.

Reimplemented from com.quadcap.sql.types.Value.

Definition at line 391 of file ValueString.java.

References com.quadcap.sql.types.ValueString.val.

Value com.quadcap.sql.types.ValueString.convert TypeDecimal  type  )  throws ValueException
 

Convert to Decimal.

Reimplemented from com.quadcap.sql.types.Value.

Definition at line 384 of file ValueString.java.

References com.quadcap.sql.types.ValueString.val.

Value com.quadcap.sql.types.ValueString.convert TypeBigInt  type  )  throws ValueException
 

Convert to BigInt.

Reimplemented from com.quadcap.sql.types.Value.

Definition at line 373 of file ValueString.java.

References com.quadcap.sql.types.ValueString.val.

Value com.quadcap.sql.types.ValueString.convert TypeInt  type  )  throws ValueException
 

Convert to Int.

Reimplemented from com.quadcap.sql.types.Value.

Definition at line 362 of file ValueString.java.

References com.quadcap.sql.types.ValueString.val.

Value com.quadcap.sql.types.ValueString.convert TypeSmallInt  type  )  throws ValueException
 

Convert to SmallInt.

Reimplemented from com.quadcap.sql.types.Value.

Definition at line 351 of file ValueString.java.

References com.quadcap.sql.types.ValueString.val.

Value com.quadcap.sql.types.ValueString.convert TypeTinyInt  type  )  throws ValueException
 

Convert to TinyInt.

Reimplemented from com.quadcap.sql.types.Value.

Definition at line 340 of file ValueString.java.

References com.quadcap.sql.types.ValueString.convert(), and com.quadcap.sql.types.ValueString.val.

Referenced by com.quadcap.sql.types.ValueString.convert().

void com.quadcap.sql.types.ValueString.fromJavaObject Object  obj  )  [virtual]
 

Copy from Java object.

Implements com.quadcap.sql.types.Value.

Definition at line 319 of file ValueString.java.

References com.quadcap.sql.types.ValueString.fromJavaObject(), and com.quadcap.sql.types.ValueString.val.

Referenced by com.quadcap.sql.types.ValueString.fromJavaObject().

InputStream com.quadcap.sql.types.ValueString.getBinaryStream  ) 
 

Return binary stream to access string bytes.

Definition at line 326 of file ValueString.java.

References com.quadcap.sql.types.ValueString.val.

Reader com.quadcap.sql.types.ValueString.getCharacterStream  ) 
 

Return character reader to access string chars.

Definition at line 333 of file ValueString.java.

References com.quadcap.sql.types.ValueString.val.

Extern com.quadcap.sql.types.ValueString.getExtern  ) 
 

Definition at line 516 of file ValueString.java.

Type com.quadcap.sql.types.ValueString.getType  )  [virtual]
 

Return my type.

Implements com.quadcap.sql.types.Value.

Definition at line 501 of file ValueString.java.

References com.quadcap.sql.types.ValueString.val.

void com.quadcap.sql.types.ValueString.readExternal ObjectInput  in  )  throws IOException, ClassNotFoundException
 

Read me from a stream.

Definition at line 273 of file ValueString.java.

References com.quadcap.sql.types.ValueString.proxy, com.quadcap.sql.types.ValueString.readExternal(), and com.quadcap.sql.types.ValueString.val.

Referenced by com.quadcap.sql.types.ValueString.readExternal(), and com.quadcap.sql.types.ValueString.readObject().

Object com.quadcap.sql.types.ValueString.readObject ObjectInput  in  )  throws IOException, ClassNotFoundException
 

Externable: readObject.

Definition at line 292 of file ValueString.java.

References com.quadcap.sql.types.ValueString.readExternal(), com.quadcap.sql.types.ValueString.readObject(), and com.quadcap.sql.types.ValueString.ValueString().

Referenced by com.quadcap.sql.types.ValueString.readObject().

void com.quadcap.sql.types.ValueString.serializeKey KeyStream  out  )  throws IOException [virtual]
 

Serialize as key.

Implements com.quadcap.sql.types.Value.

Definition at line 508 of file ValueString.java.

References com.quadcap.sql.types.ValueString.serializeKey(), and com.quadcap.sql.types.ValueString.val.

Referenced by com.quadcap.sql.types.ValueString.serializeKey().

void com.quadcap.sql.types.ValueString.setExtern Extern  extern  ) 
 

Definition at line 517 of file ValueString.java.

References com.quadcap.sql.types.ValueString.setExtern().

Referenced by com.quadcap.sql.types.ValueString.setExtern().

String com.quadcap.sql.types.ValueString.stringValue  ) 
 

Return the string value of this object.

Definition at line 111 of file ValueString.java.

References com.quadcap.sql.types.ValueString.val.

Referenced by com.quadcap.sql.FunctionExpression.getValue().

String com.quadcap.sql.types.ValueString.toString  ) 
 

Return the string value of this object ;-).

Definition at line 116 of file ValueString.java.

References com.quadcap.sql.types.ValueString.val.

Value com.quadcap.sql.types.ValueString.unop int  op  )  throws ValueException
 

String unary ops.

Reimplemented from com.quadcap.sql.types.Value.

Definition at line 123 of file ValueString.java.

References com.quadcap.sql.types.ValueString.unop(), and com.quadcap.sql.types.ValueString.val.

Referenced by com.quadcap.sql.types.ValueString.unop().

void com.quadcap.sql.types.ValueString.writeExternal ObjectOutput  out  )  throws IOException
 

Write me to a stream.

Definition at line 282 of file ValueString.java.

References com.quadcap.sql.types.ValueString.proxy, com.quadcap.sql.types.ValueString.val, and com.quadcap.sql.types.ValueString.writeExternal().

Referenced by com.quadcap.sql.types.ValueString.writeExternal(), and com.quadcap.sql.types.ValueString.writeObject().

void com.quadcap.sql.types.ValueString.writeObject ObjectOutput  out,
Object  object
throws IOException
 

Externable: writeObject.

Definition at line 303 of file ValueString.java.

References com.quadcap.sql.types.ValueString.writeExternal(), and com.quadcap.sql.types.ValueString.writeObject().

Referenced by com.quadcap.sql.types.ValueString.writeObject().


Member Data Documentation

com.quadcap.sql.types.ValueString.Extern = null [package]
 

My class's Extern object.

Definition at line 515 of file ValueString.java.

ExternProxyString com.quadcap.sql.types.ValueString.proxy = new ExternProxyString() [static, package]
 

Definition at line 67 of file ValueString.java.

Referenced by com.quadcap.sql.types.ValueString.readExternal(), and com.quadcap.sql.types.ValueString.writeExternal().

String com.quadcap.sql.types.ValueString.val [package]
 

Definition at line 69 of file ValueString.java.

Referenced by com.quadcap.sql.types.ValueString.asJavaObject(), com.quadcap.sql.types.ValueString.binop(), com.quadcap.sql.types.ValueString.convert(), com.quadcap.sql.types.ValueString.fromJavaObject(), com.quadcap.sql.types.ValueString.getBinaryStream(), com.quadcap.sql.types.ValueString.getCharacterStream(), com.quadcap.sql.types.ValueString.getType(), com.quadcap.sql.types.ValueString.readExternal(), com.quadcap.sql.types.ValueString.serializeKey(), com.quadcap.sql.types.ValueString.stringValue(), com.quadcap.sql.types.ValueString.toString(), com.quadcap.sql.types.ValueString.unop(), and com.quadcap.sql.types.ValueString.writeExternal().