DbStorage.driver
Class LobPrimitiveSsdDescriptorDriver

java.lang.Object
  extended byDbStorage.driver.SsdDescriptorDriver
      extended byDbStorage.driver.LobPrimitiveSsdDescriptorDriver

public final class LobPrimitiveSsdDescriptorDriver
extends SsdDescriptorDriver

This class drives a semistructured datum descriptor for a LOB primitive datum.


Field Summary
static int CONTENT_EXTENSION_OFFSET
           
static int CONTENT_OFFSET
           
static int CONTENT_SIZE_OFFSET
           
 
Fields inherited from class DbStorage.driver.SsdDescriptorDriver
DICTIONARY_REFERENCES_OFFSET, FIRST_PARENT_OFFSET, HEAD_PARENTS_COLLECTION_OFFSET, ROOT_PARENTS_COLLECTION_OFFSET, TYPE_OFFSET
 
Constructor Summary
LobPrimitiveSsdDescriptorDriver()
           
 
Method Summary
static int getContent(DbStorageManager dbsm, long transactionNumber, DbUnitAddress unitAddress, int position, int maxLength, byte[] b, int off)
          Gets the part of datum's content stored in the specified descriptor.
static void getContentExtension(DbStorageManager dbsm, long transactionNumber, DbUnitAddress unitAddress, DbUnitAddress destiny)
          Gets the content extension's address (in the CONTENT segment for simple data or LOB segment for LOB data) of the specified primitive datum.
static long getContentSize(DbStorageManager dbsm, long transactionNumber, DbUnitAddress unitAddress)
          Returns the content's size of the descripted simple primitive datum.
static int setContent(DbStorageManager dbsm, long transactionNumber, DbUnitAddress unitAddress, int position, int maxLength, byte[] b, int off)
          Sets the part of datum's content stored in the specified descriptor.
static void setContentExtension(DbStorageManager dbsm, long transactionNumber, DbUnitAddress unitAddress, DbUnitAddress source)
          Sets the Content Extension's address (in the CONTENT segment for simple data or LOB segment for LOB data) of the specified primitive datum.
static void setContentSize(DbStorageManager dbsm, long transactionNumber, DbUnitAddress unitAddress, long source)
          Sets the content's size of the descripted simple primitive datum.
 
Methods inherited from class DbStorage.driver.SsdDescriptorDriver
createSsdDescriptor, getDictionaryReferences, getFirstParent, getHeadParentsCollection, getRootParentsCollection, getType, setDictionaryReferences, setFirstParent, setHeadParentsCollection, setRootParentsCollection, setType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONTENT_EXTENSION_OFFSET

public static final int CONTENT_EXTENSION_OFFSET
See Also:
Constant Field Values

CONTENT_SIZE_OFFSET

public static final int CONTENT_SIZE_OFFSET
See Also:
Constant Field Values

CONTENT_OFFSET

public static final int CONTENT_OFFSET
See Also:
Constant Field Values
Constructor Detail

LobPrimitiveSsdDescriptorDriver

public LobPrimitiveSsdDescriptorDriver()
Method Detail

getContentExtension

public static void getContentExtension(DbStorageManager dbsm,
                                       long transactionNumber,
                                       DbUnitAddress unitAddress,
                                       DbUnitAddress destiny)
                                throws storage.StorageException,
                                       java.io.IOException
Gets the content extension's address (in the CONTENT segment for simple data or LOB segment for LOB data) of the specified primitive datum.

Parameters:
dbsm - The data base storage manager where the operation will be performed.
transactionNumber - The number of transaction.
unitAddress - The address of the SSD descriptor.
destiny - Where the retrieved unit address will be stored.
Throws:
storage.StorageException
java.io.IOException

setContentExtension

public static void setContentExtension(DbStorageManager dbsm,
                                       long transactionNumber,
                                       DbUnitAddress unitAddress,
                                       DbUnitAddress source)
                                throws storage.StorageException,
                                       java.io.IOException
Sets the Content Extension's address (in the CONTENT segment for simple data or LOB segment for LOB data) of the specified primitive datum.

Parameters:
dbsm - The data base storage manager where the operation will be performed.
transactionNumber - The number of transaction.
unitAddress - The address of the SSD descriptor.
source - Where the unit address is stored.
Throws:
storage.StorageException
java.io.IOException

getContentSize

public static long getContentSize(DbStorageManager dbsm,
                                  long transactionNumber,
                                  DbUnitAddress unitAddress)
                           throws storage.StorageException,
                                  java.io.IOException
Returns the content's size of the descripted simple primitive datum.

Parameters:
dbsm - The data base storage manager where the operation will be performed.
transactionNumber - The number of transaction.
unitAddress - The address of the SSD descriptor.
Returns:
The size.
Throws:
storage.StorageException
java.io.IOException

setContentSize

public static void setContentSize(DbStorageManager dbsm,
                                  long transactionNumber,
                                  DbUnitAddress unitAddress,
                                  long source)
                           throws storage.StorageException,
                                  java.io.IOException
Sets the content's size of the descripted simple primitive datum.

Parameters:
dbsm - The data base storage manager where the operation will be performed.
transactionNumber - The number of transaction.
unitAddress - The address of the SSD descriptor.
source - The size.
Throws:
storage.StorageException
java.io.IOException

getContent

public static int getContent(DbStorageManager dbsm,
                             long transactionNumber,
                             DbUnitAddress unitAddress,
                             int position,
                             int maxLength,
                             byte[] b,
                             int off)
                      throws storage.StorageException,
                             java.io.IOException
Gets the part of datum's content stored in the specified descriptor.

Parameters:
dbsm - The data base storage manager where the operation will be performed.
transactionNumber - The number of transaction.
unitAddress - The address of the SSD descriptor.
position - The position in the page from which the reading starts.
maxLength - The maximun number of bytes to be got.
b - Where the content will be stored.
off - The begining position of b where the content will be stored.
Returns:
The number of bytes recovered bytes.
Throws:
storage.StorageException
java.io.IOException

setContent

public static int setContent(DbStorageManager dbsm,
                             long transactionNumber,
                             DbUnitAddress unitAddress,
                             int position,
                             int maxLength,
                             byte[] b,
                             int off)
                      throws storage.StorageException,
                             java.io.IOException
Sets the part of datum's content stored in the specified descriptor.

Parameters:
dbsm - The data base storage manager where the operation will be performed.
transactionNumber - The number of transaction.
unitAddress - The address of the SSD descriptor.
position - The position in the page from which the reading starts.
maxLength - The maximun number of bytes to be setted.
b - Where the content is stored.
off - The begining position of b where the content is stored.
Returns:
The number of wroten bytes.
Throws:
storage.StorageException
java.io.IOException