Index

DKBlobV4

Purpose:

The DKBlobV4 class represents a binary large object (BLOB) for the VisualInfo for AS/400 datastore.

Heirarchy:

dkDataObjectBase
   dkXDOBase
      dkXDO
         dkBlob
            dkBlobDL
 

Class summary:

class DKBlobV4 : public dkBlob
{
  public:
   DKString dumpContent();
   
   DKBlobV4(DKDatastoreV4* aDatastore);
   DKBlobV4(DKDatastoreV4* aDatastore, const DKString& astring);
   DKBlobV4(const DKBlobV4& aDKBlobV4);
 
   virtual ~DKBlobV4();
 
   virtual DKString   getObjectType() const;
   virtual void       setNull();
   virtual DKBoolean  isNull() const;
   virtual dkXDOBase& operator= (const dkXDOBase& adkXDOBase);
   virtual DKBoolean  operator== (const dkXDOBase& adkXDOBase) const;
   virtual DKBoolean  operator!= (const dkXDOBase& adkXDOBase) const;
   virtual void  deletingValue();
   virtual void       open();
   virtual void  setPidObject(const DKPidXDO*  aDKPid);
   virtual const DKPidXDO*  getPidObject() const;
   virtual void  setPidObject(const DKPidXDO*  aDKPid);
   virtual const DKPidXDO*  getPidObject();
   virtual dkXDO&   add();
   virtual dkXDO&   del();
   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 dkBlob&  operator +=(const dkBlob& adkBlob);
   virtual dkBlob&  operator +=(const DKString& astring);
   virtual long     length() const;
   virtual long     indexOf(const DKString& astring,
                            long startPos=1) const;
   virtual long     indexOf(const dkBlob& adkBlob,
                            long startPos=1) const;
   virtual DKString subString(long startPos,
                              long alength) const;
   virtual dkBlob&  remove(long startPos,
                           long alength);
   virtual dkBlob&  insert(const DKString& astring,
                           long  startPos);
   virtual dkBlob&  insert(const dkBlob& adkBlob,
                           long  startPos);
   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 dkBlob&  add(const char* fName);
   virtual dkBlob&  update(const char* fName);
   virtual dkBlob&  del(DKBoolean flush);
   DKString       getItemId() const;
   void           setItemId(const char* aItemId );
   unsigned long  getPartId() const;
   void           setPartId(unsigned long partId);
   DKString       getRepType() const;
   void           setRepType(const char* aRType ); 
   unsigned long  getContentClass();
   void           setContentClass(unsigned long aCClass );
   virtual unsigned long  getAffiliatedType();
   virtual void           setAffiliatedType(unsigned long aAType );
   virtual DKString getMimeType();
   DKAnnotation&  getAffiliatedData();
   void           setAffiliatedData(const DKAnnotation& apAData );
   DKString       getCreatedTimestamp();
   void           setCreatedTimestamp(const DKString& aTimestamp); 
   DKString       getUpdatedTimestamp();
   void           setUpdatedTimestamp(const DKString& aTimestamp); 
   long           getRetrievalAction();
   void           setRetrievalAction(long aRetriveAction);
   long           getSize();
   void           setSize(long aObjectSize);
   virtual DKBlobV4&  operator= (const DKBlobV4& aDKBlobV4);
   virtual DKBlobV4&  operator +(const DKBlobV4& aDKBlobV4) const;
   virtual DKBlobV4&  operator +(const DKString& aString) const;
   friend  DKBlobV4&  operator +(const DKString& aString,
                                 const DKBlobV4& aDKBlobV4);
   virtual DKBlobV4&  subLob(long startPos,
                             long alength) const;
   DKBoolean          getIndexFlag();
   void               setIndexFlag(DKBoolean aIndexFlag);
   void               setAffTocFlag(DKBoolean aAffTocFlag);
   long  getRank();
   void  setRank(long aRank);
   void          getOption(long option, DKAny& value);
   void          setOption(long option, DKAny& value);
   DKBoolean     isCategoryOf(long categoryName);
   void          addExtension(const DKString& extensionName,
                              const dkExtension* extensionObj);
   void          removeExtension(const DKString& extensionName);
   void          setExtension(const DKString& extensionName,
                              const dkExtension* extensionObj);
   const dkExtension*  getExtension(const DKString& extensionName);
   void          changeStorage();  
   virtual DKBoolean  isMultiStreamBlob();
   virtual void  setMultiStreamBlob(DKBoolean tf);
   virtual DKBoolean  isMultiStreamFlagSet();
   virtual void  setMultiStreamFlag(DKBoolean tf);
   unsigned long  listStreamName(DKString*  &stringArray) const;
   const DKString&  getStreamContent(const DKString& streamName) const;
   dkBlob&   setStreamContent(const DKString& streamName, 
                              const DKString& data);
   long  streamLength(const DKString& streamName) const;  
   const DKAnnotationV4*  getAnnotationData();
   void  setAnnotationData(const DKAnnotationV4* p);
 };
 

Members:

Constructors and destructor
The first constructor constructs the binary large object (BLOB) and defers initialization until implementation methods are called. The second constructor constructs the BLOBand sets the object's content. The third constructor is the copy constructor.
   DKBlobV4(DKDatastoreV4* aDatastore);
   DKBlobV4(DKDatastoreV4* aDatastore, const DKString& astring);
   DKBlobV4(const DKBlobV4& aDKBlobV4);
 
   virtual ~DKBlobV4();
 

Member functions

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

setNull
Sets the part content to 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& adkXDOBase);
 

operator==
Compares this object with the specified object. Returns true if both objects have the same value for each data member. (Returns false otherwise.)
   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. (Returns false otherwise.)
   virtual DKBoolean  operator!= (const dkXDOBase& 
                                  adkXDOBase) const;
 

deletingValue
Deletes a value. This function performs no action in this class.
   virtual void  deletingValue();
 

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

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

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

setPidObject
Sets the persist object identifier (PID) information of this object with the PID of the specified object.
   virtual void  setPidObject(const DKPidXDO*  aDKPid);
 

getPidObject
Returns the persistent identifier (PID) information of this object.

   virtual const DKPidXDO*  getPidObject();
 

add
Adds the object content in the datastore.
   virtual dkXDO& add();
 

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

copyData
Replaces the large object (LOB) data of this object with the contents of the given extended data object (XDO).
   virtual dkXDO& copyData(const dkXDO& adkXDO);
 

compareData
Compares the large object (LOB) data content with the given extended data object (XDO).
   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
Clones this extended data object (XDO) with its persistent ID only.

   virtual dkXDO&  cloneSkeleton();
 

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

setContent
Replaces the LOB data of this object with the given byte array.
   virtual dkXDO&  setContent (const DKString& data);
 

getContentToClientFile
Copies the LOB data of this object to the named file.
   virtual dkBlob& getContentToClientFile(const char* afileName,
                                            int fileOption) const;
 

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

operator +=
Concatenates this object with another dkBlobV4 object. The resulting object replaces the existing contents of this object.
   virtual dkBlob&  operator +=(const dkBlob& adkBlob);
 

operator +=
Concatenates this object with another string. The resulting object replaces the existing contents of this object.
   virtual dkBlob&  operator +=(const DKString& astring);
 

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

indexOf
Gets the byte offset of the first occurrence of the search argument within this object (starting the search at offset startPos).
   virtual long indexOf(const DKString& astring, long 
                                            startPos=1) const;
   virtual long indexOf(const dkBlob& adkBlob, long 
                                          startPos=1) const;
 

subString
Gets a string object containing a substring of the LOB data of this object.
   virtual DKString subString(long startPos, long alength) const;
 

remove
Deletes the portion of the LOB data of this object (starting at startPos for alength bytes).
   virtual dkBlob&  remove(long startPos, long alength);
 

insert
Inserts the argument data, starting at position startPos in the LOB data of this object.
   virtual dkBlob&  insert(const DKString& astring, long  startPos);
   virtual dkBlob&  insert(const dkBlob& adkBlob, long  startPos);
 

open
Unloads the object content to the file afileName , 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 instance.

   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();
 

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

update
Updates the object content in the datastore.
   virtual dkBlob&  update(const char* fName);
 

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

getItemId
Gets the VisualInfo for AS/400 item ID of the object content.
   DKString getItemId() const;
 

setItemId
Sets the VisualInfo for AS/400 item ID of the object content.
   void setItemId(const char* aItemId );
 

getPartId
Gets the part ID of this extended data object (XDO).
   unsigned long  getPartId() const;
 

setPartId
Sets the part ID of this extended data object (XDO).
   void setPartId(unsigned long partId);
 

getRepType
Gets the representation type of a piece of the content.
   DKString getRepType() const;
 

setRepType
Sets the representation type of a piece of the content.
   void setRepType(const char* aRType ); 
 

getContentClass
Gets the content class of the object, SIM_CC_UNKNOWN.
   unsigned long  getContentClass();
 

setContentClass
Sets the content class of the object, SIM_CC_UNKNOWN.
   void setContentClass(unsigned long aCClass );
 

getAffiliatedType
Gets the affiliated type of the object, if SIM_ANNOTATION. The affiliated data should point to data structure of type ANNOTATIONSTRUCT.
   virtual unsigned long  getAffiliatedType();
 

setAffiliatedType
Sets the affiliated type of the object, if SIM_ANNOTATION. The affiliated data should point to data structure of type ANNOTATIONSTRUCT.
   virtual void setAffiliatedType(unsigned long aAType );
 

getMimeType
Gets the MIME type.
   virtual DKString getMimeType();

getAffiliatedData
getAffiliatedData has been deprecated and replaced by getExtension.
   DKAnnotation&  getAffiliatedData();
 

setAffiliatedData
setAffiliatedData has been deprecated and replaced by setExtension.
   void setAffiliatedData(const DKAnnotation& apAData );
 

mimeType
Gets the MIME type representing this object's content class.
   DKString mimeType();

getCreatedTimestamp
Gets the date and time that the object was created.
   DKString getCreatedTimestamp();
 

setCreatedTimestamp
Sets the date and time that the object was created.
   void setCreatedTimestamp(const DKString& aTimestamp);

getUpdatedTimestamp
Gets the date and time that the object was updated.
   DKString getUpdatedTimestamp();
 

setUpdatedTimestamp
Sets the date and time that the object was updated.
   void setUpdatedTimestamp(const DKString& aTimestamp); 
 

getRetrievalAction
getRetrievalAction has been deprecated and replaced by getOption.
   long getRetrievalAction();
 

setRetrievalAction
setRetrievalAction has been deprecated and replaced by setOption.
   void setRetrievalAction(long aRetriveAction);
 

getSize
Returns the length of this object without retrieving the object itself.
   long getSize();
 

setSize
Sets the size of an object.
   void setSize(long aObjectSize);
 

operator=
Assignment operator.
   virtual DKBlobV4&  operator= (const DKBlobV4& aDKBlobV4);
 

operator +
Concatenates this object with another dkBlobV4 object and returns the resulting dkBlobV4 object.
   virtual DKBlobV4&  operator +(const DKBlobV4& aDKBlobV4) const;
 

operator +
Concatenates this object with a DKString object and returns the resulting DKBlobV4 object.
   virtual DKBlobV4&  operator +(const DKString& aString) const;
 

operator +
Concatenates the special DKString object and the specified dkBlobV4 object, and returns the resulting object.
   friend  DKBlobV4&  operator +(const DKString& aString,
                                 const DKBlobV4& aDKBlobV4);
 

subLob
Similar to subString, but returns the subString data in the form of a new DKBlobV4 object.
   virtual DKBlobV4&  subLob(long startPos,
                             long alength) const;
 

getIndexFlag
getIndexFlag always returns false.
   DKBoolean getIndexFlag();
 

setIndexFlag
setIndexFlag always throws exception.
   void setIndexFlag(DKBoolean aIndexFlag);
 

setAffTocFlag
Sets a flag to indicate that SimLibSetItem Affiliated TOC has been invoked.
   void setAffTocFlag(DKBoolean aAffTocFlag);
 

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

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

getOption
Gets the delete or retrieval option to perform the delete or retrieve action.
   void getOption(long option, DKAny& value);
 

setOption
Sets the delete or retrieval option to perform the delete or retrieve action. The valid options are:

DK_V4_OPT_DELETE_OPTION
The valid values are:
  • DK_V4_DELETE_ITEM: Delete item if no more part left in the item.
  • DK_V4_DELETE_OBJECT_ONLY(default if not set): Don't delete the item, even if there is no more part left in the item.

DK_V4_OPT_RETRIEVAL_ACTION
The valid values are:
  • DK_V4_RETRIEVAL_GET_IT
  • DK_V4_RETRIEVAL_GET_IT_PREFETCH
  • DK_V4_RETRIEVAL_NO_MOUNT
  • DK_V4_RETRIEVAL_NO_MOUNT_PREFETCH
  • DK_V4_RETRIEVAL_STAGE_IT
  • DK_V4_RETRIEVAL_STAGE_IT_PREFETCH

   void setOption(long option, DKAny& value);
 

isCategoryOf
isCategoryOf always returns false.
   DKBoolean isCategoryOf(long categoryName);
 

addExtension
Adds the extension object.
   void addExtension(const DKString& extensionName,
                              const dkExtension* extensionObj);
 

removeExtension
Removes the extension object. The valid extension names are:
  • DKAnnotationV4
  • DKStorageManageInfoV4

   void removeExtension(const DKString& extensionName);
 

setExtension
Sets the extension object. The valid extension names are:

DKAnnotationV4
For a DKAnnotationV4 or DKAnnotationExt object, this extension object must be set to hold the annoctation information.

DKStorageManageInfoV4
To associate this part with a different storage colleciton name, this extension object must be set to hold the storage collection information.

   void setExtension(const DKString& extensionName,
                              const dkExtension* extensionObj);
 

getExtension
Gets the extension object. The valid extension names are:
  • DKAnnotationExt
  • DKAnnotationV4
  • DKStorageManageInfoV4

   const dkExtension*  getExtension(const DKString& extensionName);
 

changeStorage
Changes the system- managed storage (SMS) criteria for an object.

The collection name, management class name and storage class name will be all converted to upper case by the system. These names must be valid on the object server where the object is stored. If the collection names are changed and a null string is specified as the class name, the function places the object in the default class for the specified collection.

It is not possible to move the object from one server to another using this function, therefore the StoreSite cannot change. If the change causes any physical movement of the object, it might be deferred until the storage management cycle runs on the server.

   void changeStorage();  
 

getAnnotationData
Returns the DKAnnotationV4 pointer data member of this object.
   const DKAnnotationV4*  getAnnotationData();
 

setAnnotationData
Sets the DKAnnotationV4 pointer data member of this object to the special DKAnnotationV4 pointer.
   void  setAnnotationData(const DKAnnotationV4* p);
 

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