Index

DKBlobDB2

Purpose:

The DKBlobDB2 class is one of the concrete subclasses of dkBlob. DKBlobDB2 defines the public interface for binary large objects (BLOB) for DB2. It inherits the public interface of dkBlob (and therefore from dkXDO and dkXDOBase) and implements any abstract functions present in the interfaces of those base classes.

Class summary:

class DKBlobDB2 : public dkBlob  
{
  public:
 
   DKBlobDB2(DKDatastoreDB2* aDatastore);
   DKBlobDB2(DKDatastoreDB2* aDatastore, const DKString& astring);
   DKBlobDB2(const DKBlobDB2& aDKBlobDB2);
 
   virtual ~DKBlobDB2();
 
   virtual DKString   getObjectType() const;
   virtual void       deletingValue();
   virtual DKBoolean  isNull() const;
   virtual void       setNull();
   virtual dkXDOBase& operator= (const dkXDOBase& xdo);
   virtual DKBlobDB2& operator= (const DKBlobDB2& aDKBlobDB2);      
   virtual DKBoolean  operator== (const dkXDOBase& adkXDOBase) const;
   virtual DKBoolean  operator!= (const dkXDOBase& adkXDOBase) const;
   virtual void       open();
 
   virtual const DKPidXDO*  getPidObject() const;
   virtual void  setPidObject(const DKPidXDO*  aDKPid);
   virtual const DKPidXDO*  getPidObject();
   virtual void  setPidObject(const DKPidXDO*  aDKPid);
 
   virtual dkXDO&   add();
   virtual dkBlob&  add(const char* aFullFileName);
   virtual dkXDO&   retrieve();
   virtual dkBlob&  retrieve(const char* aFullFileName);
   virtual dkXDO&   update();
   virtual dkBlob&  update(const char* aFullFileName);
   virtual dkXDO&   del();
   virtual dkBlob&  del(DKBoolean flush);
 
   virtual dkXDO&     copyData(const dkXDO& adkXDO);
   virtual DKBoolean  compareData(const dkXDO& adkXDO);
   virtual DKBoolean  isContentChanged() const;
   virtual DKBoolean  isSet() const;
 
   virtual dkXDO*    cloneSkeleton();
   virtual DKString  getContent () const;
   virtual dkXDO&    setContent (const DKString& data);
 
   virtual dkBlob&   getContentToClientFile(const char* afileName,
                                         int fileOption) const;
   virtual dkBlob&   setContentFromClientFile(const char* afileName);
   
   virtual void      open(const char*  afileName);
   virtual void      setClassOpenHandler(const char* ahandler,
                                DKBoolean newSynchronousFlag);
   virtual void      setInstanceOpenHandler(const char* ahandler,
                                DKBoolean newSynchronousFlag);
   virtual DKString  getOpenHandler();
   virtual DKBoolean isOpenSynchronous();
 
   virtual long      length() const;
 
   virtual long     size();
 
   virtual DKString  getMimeType(); 
 
   DKString  getTable() const;
   DKString  getColumn() const;
   DKString  getDataPredicate() const;
   void      setTable(const char* aTableName);
   void      setColumn(const char* acolumn);
   void      setDataPredicate(const char* aDataPredicate);
 
   long  getRank();
   void  setRank(long aRank);
};

Members:

Constructors and destructor
The first constructor constructs a binary large object (BLOB) and defers initialization until implementation functions are called. The second constructor constructs the BLOB and sets the object's content. The third constructor is the copy constructor.
   DKBlobDB2(DKDatastoreDB2* aDatastore);
   DKBlobDB2(DKDatastoreDB2* aDatastore, const DKString& astring);
   DKBlobDB2(const DKBlobDB2& aDKBlobDB2);
 
   virtual ~DKBlobDB2();
 

Member functions

getObjectType
Gets the object type.
   virtual DKString getObjectType() const;

deletingValue
Inherited from dkXDOBase. The datastore object calls this function to tell the XDO object that the record in the database is being deleted. The implementation may perform some sort of clean-up operation.
   virtual void deletingValue();

isNull
Checks if the part content is null (in memory).
   virtual DKBoolean  isNull() const;

setNull
Sets the part content to null (in memory).
   virtual void setNull();

operator=
Assignment operator.
   virtual dkXDOBase& operator= (const dkXDOBase& xdo);

operator=
Assignment operator.
   virtual DKBlobDB2& operator= (const DKBlobDB2& aDKBlobDB2);

operator==
Compares this object with the specified object. Returns true if both objects have the same value for each data member.
   virtual DKBoolean  operator== (const dkXDOBase& 
                                  adkXDOBase) const;

operator!=
Compares this object with the specified object. Returns true if both objects do not have the same value for each data member.
   virtual DKBoolean  operator!= (const dkXDOBase& 
                                  adkXDOBase) const;

open
Unloads the object content to a client file with a system generated name and then synchronously invokes a default handler against the file.
   virtual void open();

getPid
This function has been deprecated and replaced by getPidObject.
   virtual const DKPidXDO*  getPid() const;

setPid
This function has been deprecated and replaced by setPidObject.
   virtual void  setPid(const DKPidXDO*  aDKPid);

getPidObject
Gets a copy of the persistent ID object of this object.
   virtual const DKPidXDO* getPidObject();

setPidObject
Sets the PID information of this object with the new provided PID.
   virtual void  setPidObject(const DKPidXDO*  aDKPid);

add
Adds the object content from memory to the datastore.
   virtual dkXDO& add();

add
Adds the object content from an existing file to the datastore.
   virtual dkBlob& add(const char* aFullFileName);

retrieve
Retrieves the object content from the datastore to the memory buffer.
   virtual dkXDO& retrieve();

retrieve
Retrieves the object content from the datastore to a file name.
   virtual dkBlob&  retrieve(const char* aFullFileName);

update
Updates the object content in the datastore with the content in memory.
   virtual dkXDO& update();

update
Updates the object content in the datastore with a file.
   virtual dkBlob&  update(const char* aFullFileName);

del
Deletes the object content from the datastore.
   virtual dkXDO& del();

del
Deletes the object content from the datastore.
   virtual dkBlob& del(DKBoolean flush);

copyData
Replaces the content of this object with the content of the other XDO object.
   virtual dkXDO& copyData(const dkXDO& adkXDO);

compareData
Compares the content of this object with the content of the other XDO object.
   virtual DKBoolean  compareData(const dkXDO& adkXDO);

isContentChanged
Checks if the part content changed (in memory).
   virtual DKBoolean isContentChanged() const;

isSet
Checks if the part content is set (in memory).
   virtual DKBoolean  isSet() const;

cloneSkeleton
Clone this XDO with its persistent-id only, that is, with its data content set to empty.
   virtual dkXDO* cloneSkeleton();

getContent
Gets the content of this object.
   virtual DKString  getContent () const;

setContent
Sets the content of this object with a byte array stream argument.
   virtual dkXDO& setContent (const DKString& data);

getContentToClientFile
Copies the lob (large object data) data of this object to the given file name.
   virtual dkBlob& getContentToClientFile(const char* afileName,
                                         int fileOption) const;

setContentFromClientFile
Replaces the lob data (large object data) of this object with the contents of the file afileName.
   virtual dkBlob& setContentFromClientFile(const char* afileName);

open
Unloads the object content to a file afileName provided by the application and then synchronously invokes a default handler against the file.
   virtual void open(const char*  afileName);

setClassOpenHandler
Sets the executable handler program name and whether this handler should be invoked synchronously or asynchronously for this object class.
   virtual void setClassOpenHandler(const char* ahandler,
                                DKBoolean newSynchronousFlag);

setInstanceOpenHandler
Sets the executable handler program name and whether this handler should be invoked synchronously or asynchronously for this object instant.
   virtual void setInstanceOpenHandler(const char* ahandler,
                                DKBoolean newSynchronousFlag);

getOpenHandler
Gets the current program name of the handler for this object instance.
   virtual DKString  getOpenHandler();

isOpenSynchronous
Gets the current synchronization property.
   virtual DKBoolean isOpenSynchronous();

length
Gets the length of this object content in memory.
   virtual long length() const;

size
Gets the size of this object from the datastore without retrieving the object content.
   virtual long size();

getMimeType
Gets the MIME type that represents this object's content.
   virtual DKString  getMimeType();

getTable
Gets the table name of this object content (a convenient way to get the persistent information).
   DKString  getTable() const;

getColumn
Gets the column name of this object content (a convenient way to get the persistent information).
   DKString  getColumn() const;

getDataPredicate
Gets the predicate that indicates the object (a convenient way to get the persistent information).
   DKString  getDataPredicate() const;

setTable
Sets the table name of this object content (a convenient way to set the persistent information).
   void setTable(const char* aTableName);

setColumn
Sets the column name of this object content (a convenient way to set the persistent information).
   void setColumn(const char* acolumn);

setDataPredicate
Sets the predicate that indicates the object (a convenient way to set the persistent information).
   void setDataPredicate(const char* aDataPredicate);

getRank
Gets the ranking value of a query.
   long  getRank();

setRank
Sets the ranking value of a query.
   void  setRank(long aRank);

(c) Copyright International Business Machines Corporation 1996, 2003. IBM Corp. All rights reserved.