#include <CdbBdbObjectClone.hh>
Public Member Functions | |
| CdbBdbObjectClone (const ooRef(ooObj)&theHint=0, CdbBdbObjectCloneUserAction *theUserAction=0, bool deepCopyMode=false, bool verboseMode=false, bool debugMode=false) | |
| Normal constructor. | |
| virtual | ~CdbBdbObjectClone () |
| Destructor. | |
| bool | clone (const ooHandle(ooObj)&theInputH, ooHandle(ooObj)&theOutputH) |
| Make a persistent clone of the specified object. | |
| ooRef (ooObj) setHint(const ooRef(ooObj)&theHint) | |
| Set hint. | |
| CdbBdbObjectCloneUserAction * | setUserAction (CdbBdbObjectCloneUserAction *theUserAction) |
| Set user action. | |
This facility uses the Objectivity/DB Active Schema API to clone persistent objects.
IMPLEMENTATION NOTES:
(1) This class uses PIMPL idiom to protect end users of the class from being exposed to the buggy header files of the Objectivity/DB Active Schema API.
(2) This class violates CDB API convention on the inclusion of "CdbBase/CdbCommon.hh" header file to avoid STD namespace conflicts of the kind described above.
Definition at line 31 of file CdbBdbObjectClone.hh.
|
||||||||||||||||||||||||
|
Normal constructor. Sets the initial context for the cloning. This context can be reused accross multiple calls to the cloning method itself. If the hint is not set then it will have to be set before attempting to copy. Otherwise the clone method will fail. The ownership to a user action (if any) does not get transferred into the current object. We may need non-const pointer to let a user to maintain the context of user action between calls. Note, a user action object can be overriden by passing another user cation object when calling the cloning method. Definition at line 15 of file CdbBdbObjectClone.cc. |
|
|
Destructor. More details... Definition at line 27 of file CdbBdbObjectClone.cc. |
|
||||||||||||
|
Make a persistent clone of the specified object. It's guaranteed that the resulting object (if successfull) will be different from the output one. It will be placed into the location specified through the "hint" parameter passed to the class's constructor. If the passed object refers other objects either via references or relationships and if the "deep clone" flag was passed to the class's constructor then the whole network of objects will be copied. Otherwise (if no "deep copy" flag is specified) then the resulting composite object will borrow external references/associations from the input one. The operation will return "true" in case of success, it will return "false" in case of any errors. Definition at line 34 of file CdbBdbObjectClone.cc. References CdbBdbObjectCloneImpl::clone(). Referenced by CdbBdbSMetaDataP::repoint(). |
|
|
Set hint. A valid hint object is expected. Otherwise the code will crash. The method will return the previous value of the hint. |
|
|
Set user action. If 0 pointer is passed then the current user action will be reset and it will not be called anymore. The method will return a pointer onto the previous action (if any).
Definition at line 48 of file CdbBdbObjectClone.cc. References CdbBdbObjectCloneImpl::setUserAction(). |
1.3-rc3