Index

DKBlobDD

Purpose:

The DKBlobDD class represents a binary large object (BLOB) for Domino.Doc. While other datastores let you manipulate the contents of a part, the Domino.Doc datastore does not. Unsupported methods throw a DKUsageError DKMST_NOTIMP.

Class summary:

class DKBlobDD : public dkBlob
{
   public:
      DKString dumpContent ();
      DKBlobDD ();
      DKBlobDD (dkDatastore* dsDD);
      DKBlobDD (dkDatastore* dsDD,
                const DKString& data);
      DKBlobDD (const DKBlobDD& blob);
 
      virtual ~DKBlobDD ();
 
      virtual DKString  getObjectType () const;
      virtual void       setNull ();
      virtual DKBoolean  isNull () const;
      virtual dkXDOBase&  operator= (const dkXDOBase& xdo);
      virtual DKBoolean   operator== (const dkXDOBase& xdo) const;
      virtual DKBoolean   operator!= (const dkXDOBase& xdo) const;
      virtual void  open ();
      virtual void  setPidObject (const DKPidXDO* pid);
      virtual const DKPidXDO*  getPidObject ();
      virtual dkXDO&  retrieve ();
      virtual dkXDO&     copyData (const dkXDO& xdo);
      virtual DKBoolean  compareData (const dkXDO& xdo);
      virtual DKBoolean  isContentChanged () const;
      virtual DKBoolean  isSet () const;
      virtual dkXDO& cloneSkeleton ();
      virtual DKString  getContent () const;
      virtual dkXDO&    setContent (const DKString& data);
      virtual DKString getContentType();
      virtual dkBlob&   getContentToClientFile (const char* fName,
                                                int fOpt) const;
      virtual dkBlob&  setContentFromClientFile (const char* fName);
      virtual long  length () const;
      virtual void  open (const char*  fName);
      virtual void  setClassOpenHandler (const char* hOpen,
                                         DKBoolean sysFlag);
      virtual void  setInstanceOpenHandler (const char* hOpen,
                                            DKBoolean sysFlag);
      virtual DKString   getOpenHandler ();
      virtual DKBoolean  isOpenSynchronous ();
      virtual dkBlob&  retrieve (const char* fName);
      DKDatastoreDD* getDatastoreDD();
      DKString       getDocumentId();
      void           setDocumentId(DKString id);
      DKString  getMimeType ();
};

Members:

Constructors and destructor
The first constructor constructs the binary large object (BLOB) and defers initialization. The second constructor constructs the BLOB and setS the object's datastore. The third constructor constructs the BLOB and sets the object's datastore and contents. The fourth constructor is a copy constructor.
   public:
      DKString dumpContent ();
      DKBlobDD ();
      DKBlobDD (dkDatastore* dsDD);
      DKBlobDD (dkDatastore* dsDD,
                const DKString& data);
      DKBlobDD (const DKBlobDD& blob);
 
      virtual ~DKBlobDD ();
 

Member functions

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

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

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

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

operator==
Returns true if objects are equal. Does not compare all the bytes in data, but instead compares pointers to data. Use the compareData() method to compare all the bytes in the data.
      virtual DKBoolean operator== (const dkXDOBase& xdo) const;
 

operator!=
Returns true if both objects do not have the same value.

      virtual DKBoolean operator!= (const dkXDOBase& xdo) const;

setPidObject
Sets the persistent identifier (PID) information of this object with the contents of the input pid parameter.
      virtual void  setPidObject (const DKPidXDO* pid);
 

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

retrieve
The first form retrieves the object content from the datastore to a temporary file. The second form retrieves the object content from the datastore to a file named fName.
      virtual dkXDO&  retrieve ();
      virtual dkBlob&  retrieve (const char* fName);
 

copyData
If the input dkXDO is a DKKBlobDD, the contents are copied to this object. If the input dkXDO is not a DKKBlobDD, a DKXDOError exception is thrown.
      virtual dkXDO& copyData (const dkXDO& xdo);
 

compareData
If the input dkXDO is a DKKBlobDD, the document contents of the input object are compared with this object. If it is not a DKKBlobDD, a DKXDOError exception is thrown. Returns true if the objects are equal and false if they are not.
      virtual DKBoolean  compareData (const dkXDO& xdo);
 

isContentChanged
Returns true if the data content has changed since object construction.
      virtual DKBoolean  isContentChanged () const;
 

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

cloneSkeleton
Creates a clone of this extended data object (XDO) with its persistent ID only (with its data content set to empty).
      virtual dkXDO& cloneSkeleton ();
 

getContent
Gets the stream object containing the large object (LOB) data of this object.
      virtual DKString  getContent () const;
 

setContent
Replaces the document contents in memory with the input array.
      virtual dkXDO& setContent (const DKString& data);
 

getContentType
Gets the document's file extension.
      virtual DKString getContentType();
 

getContentToClientFile
Copies the document contents of this object to the named file. fOpt parameters are:
  • DK_DD_APPEND
  • DK_DD_CREATE
  • DK_DD_OVERWRITE

Any option other than DK_DD_APPEND causes the file to be truncated and rewritten.

      virtual dkBlob& getContentToClientFile (const char* fName,
                                                int fOpt) const;
 

setContentFromClientFile
Replaces this object's document contents in memory with the contents contained in the input file. A DKXDOError is thrown if there are file access problems.
      virtual dkBlob&  setContentFromClientFile (const char* fName);
 

length
Gets the length of this object, which is the number of bytes in the data content.
      virtual long  length () const;
 

open
Invokes a document handler for this object. If the fileName parameter is empty (or null), and if the document has not yet been retrieved from the server, it will be retrieved and then opened. Whether the document handler is to be invoked synchronously or asynchronously depends on the setting used in the setInstanceOpenHandler method.
      virtual void  open (const char*  fName);
 

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* hOpen,
                                         DKBoolean sysFlag);
 

setInstanceOpenHandler
For this object instance, sets the executable handler program name, and whether this handler should be invoked synchronously or asynchronously .
      virtual void  setInstanceOpenHandler (const char* hOpen,
                                            DKBoolean sysFlag);
 

getOpenHandler
Gets the current program name of the handler for this object instance. Returns null if neither the instance open handler nor the class open handler has been set.
      virtual DKString   getOpenHandler ();
 

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

getDatastoreDD
Returns a pointer to this BLOB's datastore.
      DKDatastoreDD* getDatastoreDD();
 

getDocumentId
Returns the Domino.Doc unique ID for this document.
      DKString getDocumentId();
 

setDocumentId
Sets this BLOB's document ID. This string input parameter should have been retrieved from the results of some previous search results.
      void setDocumentId(DKString id);
 

getMimeType
Gets the MIME type for this object.
      DKString  getMimeType ();
 

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