Quadcap Embeddable Database

com.quadcap.sql.types.ValueClob Class Reference

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

com.quadcap.sql.types.ValueBlob Clob Externalizable com.quadcap.sql.types.Value Blob Externalizable List of all members.

Detailed Description

A CLOB value.

Author:
Stan Bailes

Definition at line 74 of file ValueClob.java.

Public Member Functions

 ValueClob ()
 ValueClob (Datafile file, long transId, Reader r, int length) throws IOException
 ValueClob (String s)
Value unop (int op) throws ValueException
Value binop (int op, Value l) throws ValueException
 Two-level virtual operator dispatch.

Value binop (int op, ValueString r) throws ValueException
Object asJavaObject ()
void fromJavaObject (Object obj) throws ValueException
Type getType () throws SQLException
char[] getChars (long cpos, int clen) throws SQLException
 Return a sub-string of the CLOB.

InputStream getAsciiStream () throws SQLException
Reader getCharacterStream () throws SQLException
String getSubString (long pos, int length) throws SQLException
long length () throws SQLException
 Returns the number of bytes in the BLOB value designated by this Blob object.

long position (Clob clob, long start) throws SQLException
long position (String pattern, long start) throws SQLException
void readExternal (ObjectInput in) throws IOException, ClassNotFoundException
void writeExternal (ObjectOutput out) throws IOException
Value convert (TypeVarChar type) throws ValueException
Value convert (TypeClob type) throws ValueException
String toString ()
int setString (long pos, String str) throws SQLException
 Writes the given Java String to the CLOB value that this Clob object designates at the position pos.

int setString (long pos, String str, int offset, int len) throws SQLException
 Writes len characters of str, starting at character offset, to the CLOB value that this Clob represents.

java.io.OutputStream setAsciiStream (long pos) throws SQLException
 Retrieves a stream to be used to write Ascii characters to the CLOB value that this Clob object represents, starting at position pos.

java.io.Writer setCharacterStream (long pos) throws SQLException
 Retrieves a stream to be used to write a stream of Unicode characters to the CLOB value that this Clob object represents, at position pos.


Constructor & Destructor Documentation

com.quadcap.sql.types.ValueClob.ValueClob  ) 
 

Definition at line 81 of file ValueClob.java.

com.quadcap.sql.types.ValueClob.ValueClob Datafile  file,
long  transId,
Reader  r,
int  length
throws IOException
 

Definition at line 83 of file ValueClob.java.

References com.quadcap.sql.types.ValueClob.length().

com.quadcap.sql.types.ValueClob.ValueClob String  s  ) 
 

Definition at line 90 of file ValueClob.java.


Member Function Documentation

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

Reimplemented from com.quadcap.sql.types.ValueBlob.

Definition at line 114 of file ValueClob.java.

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

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

Definition at line 110 of file ValueClob.java.

References com.quadcap.sql.types.Value.binop(), and com.quadcap.sql.types.ValueClob.convert().

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

Two-level virtual operator dispatch.

Each subtype implements the same basic template for this abstract function:

 Value binop(int op, Value l) {
    return l.binop(op, this);
 }

 
Then, type overloading allows for each type to implement all ops for which it can be the left hand side for all allowed types on the right hand side: Value binop(int op, ValueInteger l); Value binop(int op, ValueLong l); ...

Reimplemented from com.quadcap.sql.types.ValueBlob.

Definition at line 106 of file ValueClob.java.

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

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

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

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

Definition at line 209 of file ValueClob.java.

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

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

Definition at line 194 of file ValueClob.java.

References com.quadcap.sql.types.ValueClob.convert(), com.quadcap.sql.types.ValueClob.length(), and com.quadcap.sql.types.ValueClob.toString().

Referenced by com.quadcap.sql.types.ValueClob.binop(), and com.quadcap.sql.types.ValueClob.convert().

void com.quadcap.sql.types.ValueClob.fromJavaObject Object  obj  )  throws ValueException [virtual]
 

Reimplemented from com.quadcap.sql.types.ValueBlob.

Definition at line 118 of file ValueClob.java.

References com.quadcap.sql.types.ValueClob.fromJavaObject().

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

InputStream com.quadcap.sql.types.ValueClob.getAsciiStream  )  throws SQLException
 

Definition at line 157 of file ValueClob.java.

References com.quadcap.sql.types.ValueBlob.getBinaryStream().

Reader com.quadcap.sql.types.ValueClob.getCharacterStream  )  throws SQLException
 

Definition at line 161 of file ValueClob.java.

References com.quadcap.sql.types.ValueBlob.getBinaryStream().

char [] com.quadcap.sql.types.ValueClob.getChars long  cpos,
int  clen
throws SQLException
 

Return a sub-string of the CLOB.

Definition at line 129 of file ValueClob.java.

References com.quadcap.sql.types.ValueClob.getChars(), com.quadcap.sql.types.ValueBlob.getRandomAccess(), and com.quadcap.sql.file.RandomAccess.read().

Referenced by com.quadcap.sql.types.ValueClob.getChars().

String com.quadcap.sql.types.ValueClob.getSubString long  pos,
int  length
throws SQLException
 

Definition at line 165 of file ValueClob.java.

References com.quadcap.sql.types.ValueClob.getSubString(), and com.quadcap.sql.types.ValueClob.length().

Referenced by com.quadcap.sql.types.ValueClob.getSubString().

Type com.quadcap.sql.types.ValueClob.getType  )  throws SQLException [virtual]
 

Reimplemented from com.quadcap.sql.types.ValueBlob.

Definition at line 122 of file ValueClob.java.

long com.quadcap.sql.types.ValueClob.length  )  throws SQLException
 

Returns the number of bytes in the BLOB value designated by this Blob object.

Returns:
length of the BLOB in bytes
Exceptions:
SQLException if there is an error accessing the length of the BLOB
Since:
1.2

Reimplemented from com.quadcap.sql.types.ValueBlob.

Definition at line 169 of file ValueClob.java.

Referenced by com.quadcap.sql.types.ValueClob.convert(), com.quadcap.sql.types.ValueClob.getSubString(), com.quadcap.sql.types.ValueClob.toString(), and com.quadcap.sql.types.ValueClob.ValueClob().

long com.quadcap.sql.types.ValueClob.position String  pattern,
long  start
throws SQLException
 

Definition at line 180 of file ValueClob.java.

long com.quadcap.sql.types.ValueClob.position Clob  clob,
long  start
throws SQLException
 

Definition at line 174 of file ValueClob.java.

References com.quadcap.sql.types.ValueClob.position().

Referenced by com.quadcap.sql.types.ValueClob.position().

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

Reimplemented from com.quadcap.sql.types.ValueBlob.

Definition at line 184 of file ValueClob.java.

References com.quadcap.sql.types.ValueClob.readExternal().

Referenced by com.quadcap.sql.types.ValueClob.readExternal().

java.io.OutputStream com.quadcap.sql.types.ValueClob.setAsciiStream long  pos  )  throws SQLException
 

Retrieves a stream to be used to write Ascii characters to the CLOB value that this Clob object represents, starting at position pos.

Parameters:
pos the position at which to start writing to this CLOB object
Returns:
the stream to which ASCII encoded characters can be written
Exceptions:
SQLException if there is an error accessing the CLOB value
See also:
getAsciiStream
Since:
1.4

Definition at line 283 of file ValueClob.java.

References com.quadcap.sql.types.ValueClob.setAsciiStream().

Referenced by com.quadcap.sql.types.ValueClob.setAsciiStream().

java.io.Writer com.quadcap.sql.types.ValueClob.setCharacterStream long  pos  )  throws SQLException
 

Retrieves a stream to be used to write a stream of Unicode characters to the CLOB value that this Clob object represents, at position pos.

Parameters:
pos the position at which to start writing to the CLOB value
Returns:
a stream to which Unicode encoded characters can be written
Exceptions:
SQLException if there is an error accessing the CLOB value
See also:
getCharacterStream
Since:
1.4

Definition at line 304 of file ValueClob.java.

References com.quadcap.sql.types.ValueClob.setCharacterStream().

Referenced by com.quadcap.sql.types.ValueClob.setCharacterStream().

int com.quadcap.sql.types.ValueClob.setString long  pos,
String  str,
int  offset,
int  len
throws SQLException
 

Writes len characters of str, starting at character offset, to the CLOB value that this Clob represents.

Parameters:
pos the position at which to start writing to this CLOB object
str the string to be written to the CLOB value that this Clob object represents
offset the offset into str to start reading the characters to be written
len the number of characters to be written
Returns:
the number of characters written
Exceptions:
SQLException if there is an error accessing the CLOB value
Since:
1.4

Definition at line 263 of file ValueClob.java.

int com.quadcap.sql.types.ValueClob.setString long  pos,
String  str
throws SQLException
 

Writes the given Java String to the CLOB value that this Clob object designates at the position pos.

Parameters:
pos the position at which to start writing to the CLOB value that this Clob object represents
str the string to be written to the CLOB value that this Clob designates
Returns:
the number of characters written
Exceptions:
SQLException if there is an error accessing the CLOB value
Since:
1.4

Definition at line 239 of file ValueClob.java.

References com.quadcap.sql.types.ValueClob.setString().

Referenced by com.quadcap.sql.types.ValueClob.setString().

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

Reimplemented from com.quadcap.sql.types.ValueBlob.

Definition at line 213 of file ValueClob.java.

References com.quadcap.sql.types.ValueClob.length().

Referenced by com.quadcap.sql.types.ValueClob.convert(), and com.quadcap.sql.types.ValueClob.unop().

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

Reimplemented from com.quadcap.sql.types.ValueBlob.

Definition at line 94 of file ValueClob.java.

References com.quadcap.sql.types.ValueClob.toString(), and com.quadcap.sql.types.ValueClob.unop().

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

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

Reimplemented from com.quadcap.sql.types.ValueBlob.

Definition at line 190 of file ValueClob.java.

References com.quadcap.sql.types.ValueClob.writeExternal().

Referenced by com.quadcap.sql.types.ValueClob.writeExternal().