ssdbms.manager.primitives
Interface CLOBManager

All Superinterfaces:
CLOBValue, LOBValue, PrimitiveValue, SSDValue

public interface CLOBManager
extends CLOBValue

Manages the CLOB operations.

Author:
Egar Arturo García Cárdenas
See Also:
CLOBValue

Field Summary
 
Fields inherited from interface ssdbms.ssd.SSDValue
BLOB, BYTE_SEQUENCE, CLOB, INTEGER, NON_PRIMITIVE, REAL, STRING
 
Method Summary
 long length()
          Returns the lenght in characters of the storaged object.
 java.lang.String read(long pos, int size)
          Reads the CLOB from a given position.
 void setLength(long length)
          Resizes the CLOB to the given length (in characters).
 int write(long pos, java.lang.String content)
          Writes a string in the CLOB from a given position.
 int write(long pos, java.lang.String content, int offset, int length)
          Writes in the CLOB from a given position.
 

Method Detail

read

public java.lang.String read(long pos,
                             int size)
                      throws OutOfBoundsException,
                             BadFunctionException,
                             FatalErrorException
Reads the CLOB from a given position.

Parameters:
pos - The position of the CLOB from which it begins to read.
size - The size of the string to be readed.
Returns:
The readed string.
Throws:
OutOfBoundsException
BadFunctionException
FatalErrorException

write

public int write(long pos,
                 java.lang.String content)
          throws OutOfBoundsException,
                 BadFunctionException,
                 FatalErrorException
Writes a string in the CLOB from a given position.

Parameters:
pos - The position of the CLOB from which it begins to write.
content - The string to write.
Throws:
OutOfBoundsException
BadFunctionException
FatalErrorException

write

public int write(long pos,
                 java.lang.String content,
                 int offset,
                 int length)
          throws OutOfBoundsException,
                 BadFunctionException,
                 FatalErrorException
Writes in the CLOB from a given position.

Parameters:
pos - The position of the CLOB from which it begins to write.
content - The string contains the substring to write in the CLOB.
offset - The start offset of content.
length - The maximum number of characters to write.
Throws:
OutOfBoundsException
BadFunctionException
FatalErrorException

setLength

public void setLength(long length)
               throws OutOfBoundsException,
                      BadFunctionException,
                      FatalErrorException
Resizes the CLOB to the given length (in characters).

Parameters:
length - The new length of the CLOB.
Throws:
OutOfBoundsException
BadFunctionException
FatalErrorException

length

public long length()
            throws BadFunctionException,
                   FatalErrorException
Returns the lenght in characters of the storaged object.

Returns:
The lenght of the CLOB in characters.
Throws:
BadFunctionException
FatalErrorException