Enterprise Information Portal APIs

com.ibm.mm.sdk.common
Class DKClobDB2

java.lang.Object
  |
  +--com.ibm.mm.sdk.common.dkAbstractXDO
        |
        +--com.ibm.mm.sdk.common.dkClob
              |
              +--com.ibm.mm.sdk.common.DKClobDB2
All Implemented Interfaces:
DKConstant, DKConstantDB2, dkDataObjectBase, DKMessageId, DKMessageIdDB2, dkXDO, dkXDOBase, java.io.Serializable

public class DKClobDB2
extends dkClob
implements DKConstantDB2, DKMessageIdDB2, java.io.Serializable

DKClobDB2: a clob (XDO) represents a part object of DB2

See Also:
Serialized Form

Field Summary
static short APPEND
           
static short NOOVERWRITE
           
static short OVERWRITE
           
 
Fields inherited from interface com.ibm.mm.sdk.common.DKConstantDB2
    For details, see the class or interface
 
Fields inherited from interface com.ibm.mm.sdk.common.DKConstant
    For details, see the class or interface
 
Fields inherited from interface com.ibm.mm.sdk.common.DKMessageIdDB2
    For details, see the class or interface
 
Fields inherited from interface com.ibm.mm.sdk.common.DKMessageId
    For details, see the class or interface
 
Constructor Summary
DKClobDB2()
          Constructs the clob and defers initialization until implementation methods are called.
DKClobDB2(DKClobDB2 aDKClobDB2)
          Copy constructor.
DKClobDB2(dkDatastore aDatastore)
          Constructs the clob and defers initialization until implementation methods are called.
DKClobDB2(dkDatastore aDatastore, byte[] aByteArr)
          Constructs the clob and set the object's content.
 
Method Summary
 void add()
          Adds the object content from memory to the datastore
 void add(java.lang.String aFullFileName)
          Adds the object content from existing file to the datastore
 dkXDO cloneSkeleton()
          Clone this XDO with its persistent-id only, that is, with its data content set to empty.
 boolean compareData(dkXDO adkXDO)
          Compares the content of this object with the content of the other XDO object
 void copyData(dkXDO adkXDO)
          Replaces the content of this object with the content of the other XDO object
 void del()
          Deletes the object content from datastore
 void del(boolean flush)
          Deletes the object content from datastore
 void deletingValue()
          Deprecated. no meaning for Digital Library
 boolean equals(dkXDOBase adkXDOBase)
          Deprecated. no need to do this, no meaning
 java.lang.String getColumn()
          Gets the column name of this object content (a convenient way to get the persistent information)
 byte[] getContent()
          Gets the content of this object
 void getContentToClientFile(java.lang.String afileName, int fileOption)
          Copies the lob data of this object to the given file name
 java.lang.String getDataPredicate()
          Gets the predicate that indicate the object (a convenient way to get the persistent information)
 java.lang.String getMimeType()
          Gets the MIME type represents this object's content
 java.lang.String getObjectType()
          Gets the object type.
 java.lang.String getOpenHandler()
          Gets the current program name of the handler for this object instance
 DKPid getPid()
          Deprecated. Replace by getPidObject()
 DKPid getPidObject()
          Gets a copy of the persistent ID object of this object
 int getRank()
          Gets the ranking value of a query
 java.lang.String getTable()
          Gets the table name of this object content (a convenient way to get the persistent information)
 boolean isContentChanged()
          Checks if the part content changed (in memory).
 boolean isNull()
          Checks if the part content is null (in memory).
 boolean isOpenSynchronous()
          Gets the current synchronization property
 boolean isSet()
          Checks if the part content is set (in memory).
 int length()
          Gets the length of this object content in memory
 boolean notEqual(dkXDOBase adkXDOBase)
          Deprecated. no need to do this, no meaning
 void open()
          Unloads the object content to a client file with a system generated name and then synchronously invoking a default handler against the file.
 void open(java.lang.String afileName)
          Unloads the object content to a file afileName provided by the application and then synchronously invoking a default handler against the file.
 void retrieve()
          Retrieves the object content from the datastore to the memory buffer
 void retrieve(java.lang.String aFileName)
          Retrieves the object content from the datastore to a file name
 void setClassOpenHandler(java.lang.String ahandler, boolean newSynchronousFlag)
          Sets the executable handler program name and whether this handler should be invoked synchronously or asynchronously for this object class
 void setColumn(java.lang.String aColumnName)
          Sets the column name of this object content (a convenient way to set the persistent information)
 void setContent(byte[] aByteArray)
          Sets the content of this object with a byte array stream argument
 void setContentFromClientFile(java.lang.String afileName)
          Replaces the lob data of this object with the contents of the file afileName
 void setDataPredicate(java.lang.String aDataPredicate)
          Sets the predicate that indicate the object (a convenient way to set the persistent information)
 void setDatastore(dkDatastore ds)
          Sets the reference to the owner datastore object
 void setInstanceOpenHandler(java.lang.String ahandler, boolean newSynchronousFlag)
          Sets the executable handler program name and whether this handler should be invoked synchronously or asynchronously for this object instant
 void setNull()
          Sets the part content to null (in memory).
 void setPid(DKPid aPidXDO)
          Deprecated. Replace by setPidObject(DKPid aPidXDO)
 void setPidObject(DKPid aPidXDO)
          Sets the pid information of this object with the new provided pid
 void setRank(int aRank)
          Sets the ranking value of a query
 void setTable(java.lang.String aTableName)
          Sets the table name of this object content (a convenient way to set the persistent information)
 int size()
          Gets the size of this object from datastore without retrieve object content.
 void update()
          Updates the object content in datastore with the content in memory
 void update(java.lang.String aFileName)
          Updates the object content in datastore with a file
 
Methods inherited from class com.ibm.mm.sdk.common.dkClob
concatReplace, concatReplace, indexOf, indexOf, insert, insert, remove, subString
 
Methods inherited from class com.ibm.mm.sdk.common.dkAbstractXDO
addExtension, datastore, getAffiliatedType, getClassName, getContentType, getDatastore, getExtension, getOption, getParent, getRootObject, protocol, removeExtension, setAffiliatedType, setClassName, setContentType, setMimeType, setOption, setParent, setRootObject
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OVERWRITE

public static final short OVERWRITE

NOOVERWRITE

public static final short NOOVERWRITE

APPEND

public static final short APPEND
Constructor Detail

DKClobDB2

public DKClobDB2()
          throws DKUsageError,
                 java.lang.Exception
Constructs the clob and defers initialization until implementation methods are called.
Throws:
DKUsageError, - Exception If invalid datastore type

DKClobDB2

public DKClobDB2(dkDatastore aDatastore)
          throws DKUsageError,
                 java.lang.Exception
Constructs the clob and defers initialization until implementation methods are called.
Parameters:
aDatastore - a DKDatastoreDB2 representing the associated DB2 datastore
Throws:
DKUsageError, - Exception If invalid datastore type

DKClobDB2

public DKClobDB2(dkDatastore aDatastore,
                 byte[] aByteArr)
          throws DKException,
                 java.lang.Exception
Constructs the clob and set the object's content.
Parameters:
aDatastore - a DKDatastoreDB2 representing the associated DB2 datastore
aByteArr - a byte array to be set as this object's content
Throws:
DKException, - Exception If error occurred

DKClobDB2

public DKClobDB2(DKClobDB2 aDKClobDB2)
          throws DKException
Copy constructor.
Parameters:
aDKClobDB2 - an instance of DKClobDB2
Throws:
DKException - If error occurred
Method Detail

getObjectType

public java.lang.String getObjectType()
Gets the object type.
Returns:
the object type "DKClobDB2"

deletingValue

public void deletingValue()
Deprecated. no meaning for Digital Library

Deletes value, this function performs as setNull in this class

isContentChanged

public boolean isContentChanged()
Checks if the part content changed (in memory).
Overrides:
isContentChanged in class dkAbstractXDO
Returns:
true if the object content is changed; false otherwise.

isSet

public boolean isSet()
Checks if the part content is set (in memory).
Overrides:
isSet in class dkAbstractXDO
Returns:
true if the object content is set; false otherwise.

isNull

public boolean isNull()
Checks if the part content is null (in memory).
Overrides:
isNull in class dkAbstractXDO
Returns:
true if the object content is null; false otherwise.

setNull

public void setNull()
Sets the part content to null (in memory).
Overrides:
setNull in class dkAbstractXDO

equals

public boolean equals(dkXDOBase adkXDOBase)
               throws DKException
Deprecated. no need to do this, no meaning

Check if the xdo objects have same type, pid and content
Overrides:
equals in class dkAbstractXDO
Parameters:
adkXDOBase - an instance of dkXDOBase
Returns:
true if the objects have same type, pid and content false otherwise.
Throws:
DKException - If objects are not the same class

notEqual

public boolean notEqual(dkXDOBase adkXDOBase)
                 throws DKException
Deprecated. no need to do this, no meaning

check if the xdo objects is not equal.
Overrides:
notEqual in class dkAbstractXDO
Parameters:
adkXDOBase - an instance of dkXDOBase
Returns:
true if the objects do not have same type, pid, and content false otherwise.
Throws:
DKException - If objects are not the same class

getPid

public DKPid getPid()
Deprecated. Replace by getPidObject()

Gets a copy of the persistent ID object of this DKClobDB2 object
Overrides:
getPid in class dkAbstractXDO
Returns:
a copy of the persistent ID object of this DKClobDB2 object
See Also:
getPidObject()

setPid

public void setPid(DKPid aPidXDO)
            throws DKUsageError
Deprecated. Replace by setPidObject(DKPid aPidXDO)

Sets the pid information of this object with the new provided pid
Overrides:
setPid in class dkAbstractXDO
Parameters:
aDKPid - a DKPidXDO object
Throws:
DKUsageError - If provided pid is null
See Also:
setPidObject(DKPid aPidXDO)

getPidObject

public DKPid getPidObject()
Gets a copy of the persistent ID object of this object
Overrides:
getPidObject in class dkAbstractXDO
Returns:
a copy of the persistent ID object of this object

setPidObject

public void setPidObject(DKPid aPidXDO)
                  throws DKException
Sets the pid information of this object with the new provided pid
Overrides:
setPidObject in class dkAbstractXDO
Parameters:
aPidXDO - a DKPidXDO object
Throws:
DKException - If provided pid is null

add

public void add()
         throws DKException,
                java.lang.Exception
Adds the object content from memory to the datastore
Overrides:
add in class dkAbstractXDO
Throws:
DKException, - Exception If error occurred

add

public void add(java.lang.String aFullFileName)
         throws DKException,
                java.lang.Exception
Adds the object content from existing file to the datastore
Overrides:
add in class dkAbstractXDO
Parameters:
aFullFileName - a fully qualified path and file name, default is current directory
Throws:
DKException, - Exception If error occurred

retrieve

public void retrieve()
              throws DKException,
                     java.lang.Exception
Retrieves the object content from the datastore to the memory buffer
Overrides:
retrieve in class dkAbstractXDO
Throws:
DKException, - Exception If error occurred

retrieve

public void retrieve(java.lang.String aFileName)
              throws DKException,
                     java.lang.Exception
Retrieves the object content from the datastore to a file name
Overrides:
retrieve in class dkAbstractXDO
Parameters:
aFileName - a fully qualified path and file name, default is current directory
Throws:
DKException, - Exception If error occurred

update

public void update()
            throws DKException,
                   java.lang.Exception
Updates the object content in datastore with the content in memory
Overrides:
update in class dkAbstractXDO
Throws:
DKException, - Exception If error occurred

update

public void update(java.lang.String aFileName)
            throws DKException,
                   java.lang.Exception
Updates the object content in datastore with a file
Overrides:
update in class dkAbstractXDO
Parameters:
aFileName - a fully qualified path and file name, default is current directory
Throws:
DKException, - Exception If error occurred

del

public void del()
         throws DKException,
                java.lang.Exception
Deletes the object content from datastore
Overrides:
del in class dkAbstractXDO
Throws:
DKException, - Exception If error occurred

del

public void del(boolean flush)
         throws DKException,
                java.lang.Exception
Deletes the object content from datastore
Overrides:
del in class dkAbstractXDO
Parameters:
flush - if true the memory content will be flush, if false and content is not set, the object will be retreived before delete it. The default is true.
Throws:
DKException, - Exception If error occurred

copyData

public void copyData(dkXDO adkXDO)
              throws DKException,
                     java.lang.Exception
Replaces the content of this object with the content of the other XDO object
Overrides:
copyData in class dkAbstractXDO
Parameters:
adkXDO - the other XDO object
Throws:
DKException, - Exception If error occurred

compareData

public boolean compareData(dkXDO adkXDO)
                    throws DKException,
                           java.lang.Exception
Compares the content of this object with the content of the other XDO object
Overrides:
compareData in class dkAbstractXDO
Parameters:
adkXDO - the other XDO object
Throws:
DKException, - Exception If object type is different

setContent

public void setContent(byte[] aByteArray)
Sets the content of this object with a byte array stream argument
Overrides:
setContent in class dkAbstractXDO
Parameters:
aByteArray - a byte array

getContent

public byte[] getContent()
                  throws DKException,
                         java.lang.Exception
Gets the content of this object
Overrides:
getContent in class dkAbstractXDO
Returns:
the object content as a byte array stream
Throws:
DKException, - Exception If object type is different

getContentToClientFile

public void getContentToClientFile(java.lang.String afileName,
                                   int fileOption)
                            throws DKException,
                                   java.lang.Exception
Copies the lob data of this object to the given file name
Overrides:
getContentToClientFile in class dkAbstractXDO
Parameters:
afileName - a fully qualified path with file name, default is current directory(if no path)
fileOption - 1 will create or overwrite an existing file; 2 will only create file, but will also throw an exception if the file already exists; 3 appends to an existing file
Throws:
DKException, - Exception If error occurred

setContentFromClientFile

public void setContentFromClientFile(java.lang.String afileName)
                              throws DKException
Replaces the lob data of this object with the contents of the file afileName
Overrides:
setContentFromClientFile in class dkAbstractXDO
Parameters:
afileName - a fully qualified path with file name, default is current directory(if no path)
Throws:
DKException - If error occurred

open

public void open()
          throws DKException,
                 java.lang.Exception
Unloads the object content to a client file with a system generated name and then synchronously invoking a default handler against the file.
Overrides:
open in class dkAbstractXDO
Throws:
DKException, - Exception If error occurred

open

public void open(java.lang.String afileName)
          throws DKException,
                 java.lang.Exception
Unloads the object content to a file afileName provided by the application and then synchronously invoking a default handler against the file.
Overrides:
open in class dkAbstractXDO
Parameters:
afileName - a provided file name
Throws:
DKException, - Exception If error occurred

setInstanceOpenHandler

public void setInstanceOpenHandler(java.lang.String ahandler,
                                   boolean newSynchronousFlag)
Sets the executable handler program name and whether this handler should be invoked synchronously or asynchronously for this object instant
Overrides:
setInstanceOpenHandler in class dkAbstractXDO
Parameters:
ahandler - the handler program name to view the content
newSynchronousFlag - true for synchronous process; false otherwise.

setClassOpenHandler

public void setClassOpenHandler(java.lang.String ahandler,
                                boolean newSynchronousFlag)
Sets the executable handler program name and whether this handler should be invoked synchronously or asynchronously for this object class
Overrides:
setClassOpenHandler in class dkAbstractXDO
Parameters:
ahandler - the handler program name to view the content
newSynchronousFlag - true for synchronous process; false otherwise.

getOpenHandler

public java.lang.String getOpenHandler()
Gets the current program name of the handler for this object instance
Overrides:
getOpenHandler in class dkAbstractXDO
Returns:
the handler program name

isOpenSynchronous

public boolean isOpenSynchronous()
Gets the current synchronization property
Overrides:
isOpenSynchronous in class dkAbstractXDO
Returns:
TRUE or FALSE for the handler

setRank

public void setRank(int aRank)
Sets the ranking value of a query
Overrides:
setRank in class dkAbstractXDO
Parameters:
aRank - a ranking value

getRank

public int getRank()
Gets the ranking value of a query
Overrides:
getRank in class dkAbstractXDO
Returns:
a ranking value

getMimeType

public java.lang.String getMimeType()
                             throws DKException,
                                    java.lang.Exception
Gets the MIME type represents this object's content
Overrides:
getMimeType in class dkAbstractXDO
Returns:
the MIME type
Throws:
DKException, - Exception If error occurred

size

public int size()
         throws DKException,
                java.lang.Exception
Gets the size of this object from datastore without retrieve object content.
Overrides:
size in class dkAbstractXDO
Returns:
the object size
Throws:
DKException, - Exception If error occurred

length

public int length()
           throws DKException,
                  java.lang.Exception
Gets the length of this object content in memory
Overrides:
length in class dkAbstractXDO
Returns:
a byte length of this object content in memory

cloneSkeleton

public dkXDO cloneSkeleton()
                    throws DKUsageError,
                           java.lang.Exception
Clone this XDO with its persistent-id only, that is, with its data content set to empty.
Overrides:
cloneSkeleton in class dkAbstractXDO

getTable

public java.lang.String getTable()
Gets the table name of this object content (a convenient way to get the persistent information)
Returns:
the table name of the object content

setTable

public void setTable(java.lang.String aTableName)
Sets the table name of this object content (a convenient way to set the persistent information)
Parameters:
aTableName - the table name of the object content

getColumn

public java.lang.String getColumn()
Gets the column name of this object content (a convenient way to get the persistent information)
Returns:
the column name of the object content

setColumn

public void setColumn(java.lang.String aColumnName)
Sets the column name of this object content (a convenient way to set the persistent information)
Parameters:
aColumnName - the column name of the object content

getDataPredicate

public java.lang.String getDataPredicate()
Gets the predicate that indicate the object (a convenient way to get the persistent information)
Returns:
the predicate that indicate the object

setDataPredicate

public void setDataPredicate(java.lang.String aDataPredicate)
Sets the predicate that indicate the object (a convenient way to set the persistent information)
Parameters:
aDataPredicate - a predicate that indicate the object

setDatastore

public void setDatastore(dkDatastore ds)
Sets the reference to the owner datastore object
Overrides:
setDatastore in class dkAbstractXDO
Parameters:
ds - a dkDatastore

EIP Java APIs

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