org.eclipse.datatools.connectivity.oda.consumer.helper
Class OdaClob

java.lang.Object
  extended byorg.eclipse.datatools.connectivity.oda.consumer.helper.OdaObject
      extended byorg.eclipse.datatools.connectivity.oda.consumer.helper.OdaDriverObject
          extended byorg.eclipse.datatools.connectivity.oda.consumer.helper.OdaClob
All Implemented Interfaces:
IClob

public class OdaClob
extends org.eclipse.datatools.connectivity.oda.consumer.helper.OdaDriverObject
implements IClob


Method Summary
 java.lang.Object findAndInvokeMethod(java.lang.String methodName, java.lang.Class[] parameterTypes, java.lang.Object[] args)
           
 java.io.Reader getCharacterStream()
          Retrieves the CLOB value designated by this IClob instance as a java.io.Reader object for reading a stream of characters.
 java.lang.String getSubString(long position, int length)
          Retrieves a copy of the specified substring in the CLOB value designated by this IClob instance.
 long length()
          Returns the number of characters in the CLOB value designated by this IClob object.
static void setThrowAndSetOdaException()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getCharacterStream

public java.io.Reader getCharacterStream()
                                  throws OdaException
Description copied from interface: IClob
Retrieves the CLOB value designated by this IClob instance as a java.io.Reader object for reading a stream of characters.

Specified by:
getCharacterStream in interface IClob
Returns:
a java.io.Reader object that contains the CLOB data
Throws:
OdaException - if data source error occurs

getSubString

public java.lang.String getSubString(long position,
                                     int length)
                              throws OdaException
Description copied from interface: IClob
Retrieves a copy of the specified substring in the CLOB value designated by this IClob instance.
An optional short-cut method to retrieve from the instance's character stream. The ODA consumer helper framework provides default implementation, which is used when an ODA driver throws an UnsupportedOperationException. An ODA driver is however encouraged to provide a more efficient implementation of this method.

Specified by:
getSubString in interface IClob
Parameters:
position - the first character of the substring to be extracted. The first character is at position 1.
length - the number of consecutive characters to be copied
Returns:
the specified substring that begins at position and has up to length consecutive characters.
Throws:
OdaException - if data source error occurs

length

public long length()
            throws OdaException
Description copied from interface: IClob
Returns the number of characters in the CLOB value designated by this IClob object. An optional method; throws UnsupportedOperationException if a driver does not support retrieving the length.

Specified by:
length in interface IClob
Returns:
length of the CLOB value in characters
Throws:
OdaException - if data source error occurs

setThrowAndSetOdaException

public static void setThrowAndSetOdaException()

findAndInvokeMethod

public java.lang.Object findAndInvokeMethod(java.lang.String methodName,
                                            java.lang.Class[] parameterTypes,
                                            java.lang.Object[] args)
                                     throws java.lang.NoSuchMethodException,
                                            java.lang.IllegalAccessException,
                                            java.lang.reflect.InvocationTargetException,
                                            OdaException
Throws:
java.lang.NoSuchMethodException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
OdaException


Copyright © 2005 Actuate Corp. All rights reserved.