BankAndCustomer
|
The base class of the persistent classes. All persistent classes must be derived from this class to be able to process their objects in the database. More...
#include <GloPersistent.h>
Public Member Functions | |
Persistent () | |
Persistent (const Persistent &rT) | |
virtual void | activate () |
virtual int | assign (Base &rBase) override |
virtual void | removeBase () override |
virtual ObjID | getObjID () const override |
virtual std::time_t | getCreateDate () const override |
virtual std::time_t | getLastChangeDate () const override |
virtual void | takeOverRecord (Record *pRecord) override |
virtual int | preStore (EnDeepMode eDeepMode, void *&prData) |
virtual int | store (EnDeepMode eDeepMode=DM_SHALLOW) override |
virtual void | postStore (int iStoreErr, EnDeepMode eDeepMode, void *pData) |
virtual int | preDeleteInBase (EnDeepMode eDeepMode, void *&prData) |
virtual int | deleteInBase (EnDeepMode eDeepMode=DM_SHALLOW) override |
virtual void | postDeleteInBase (int iDeleteErr, EnDeepMode eDeepMode, void *pData) |
virtual int | preRefresh (void *&prData) |
virtual int | refresh () override |
virtual void | postRefresh (int iRefreshErr, void *pData) |
virtual int | preLock (EnLockMode eLockMode, EnDeepMode eDeepMode, void *&prData) |
virtual int | lock (EnLockMode eLockMode=LK_DELETEvWRITE, EnDeepMode eDeepMode=DM_SHALLOW) override |
virtual void | postLock (int iLockErr, EnLockMode eLockMode, EnDeepMode eDeepMode, void *pData) |
virtual int | preRelock (EnLockMode eLockMode, EnDeepMode eDeepMode, void *&prData) |
virtual int | relock (EnLockMode eLockMode=LK_DELETEvWRITE, EnDeepMode eDeepMode=DM_SHALLOW) override |
virtual void | postRelock (int iLockErr, EnLockMode eLockMode, EnDeepMode eDeepMode, void *pData) |
virtual int | preUnlock (EnLockMode eLockMode, EnDeepMode eDeepMode, void *&prData) |
virtual int | unlock (EnLockMode eLockMode=LK_DELETEvWRITE, EnDeepMode eDeepMode=DM_SHALLOW) override |
virtual void | postUnlock (int iUnlockErr, EnLockMode eLockMode, EnDeepMode eDeepMode, void *pData) |
virtual int | preSetWatch (TdWatchNotifyMode ulWatchMode, EnDeepMode eDeepMode, CallBack *pCallBack, void *&prData) |
virtual int | setWatch (TdWatchNotifyMode ulWatchMode, EnDeepMode eDeepMode, CallBack *pCallBack=0) override |
virtual void | postSetWatch (int iSetWatchErr, TdWatchNotifyMode ulWatchMode, EnDeepMode eDeepMode, CallBack *pCallBack, void *pData) |
virtual int | preUnsetWatch (TdWatchNotifyMode ulWatchMode, EnDeepMode eDeepMode, CallBack *pCallBack, void *&prData) |
virtual int | unsetWatch (TdWatchNotifyMode ulWatchMode, EnDeepMode eDeepMode, CallBack *pCallBack=0) override |
virtual void | postUnsetWatch (int iUnsetWatchErr, TdWatchNotifyMode ulWatchMode, EnDeepMode eDeepMode, CallBack *pCallBack, void *pData) |
virtual unsigned long | getGloClassID () const override |
virtual int | getTypeAsString (std::string &rsTypeName) override |
virtual int | setGloAttribute (const AttributeID &rAttributeID, void *pPara) |
virtual void * | getGloAttribute (const AttributeID &rAttributeID) |
virtual int | setGloAttribute (const std::string &rstrAttributName, void *pPara) |
virtual void * | getGloAttribute (const std::string &rstrAttributName) |
virtual bool | isSameOrSuperClassFrom (const glo::Persistent *pPersistent) const |
Checks if passed object can be cast to this. | |
virtual bool | isSameOrSuperClassFrom (const std::shared_ptr< glo::Persistent > pPersistent) const |
Checks if passed object can be cast to this. | |
Public Member Functions inherited from glo::BasePersistent | |
BasePersistent () | |
BasePersistent (const BasePersistent &rT) | |
virtual int | setBase (Base *pBase) override |
virtual Base * | getBase () const override |
virtual int | getClassInfo (ClassInfo *&prClassInfo) |
virtual unsigned int | remember () |
virtual unsigned int | forget () |
virtual bool | isAssigned () const |
unsigned int | getLinkCount () const |
int | getRecord (Record *&prRecord) const |
int | getRecord (std::shared_ptr< Record > &rRetVal) const |
int | getAllPersAttributeNames (std::list< std::string > &rRetValList, const std::vector< unsigned long > *pClassIdVector=0) const |
int | getAllPersAttributeNamesSortByID (std::map< AttributeID, std::string > &rRetValMap, const std::vector< unsigned long > *pClassIdVector=0) const |
int | getPersAttribute (BaseRecordAttribute *&prRetVal, const std::string &sName) const |
int | getPersAttribute (std::shared_ptr< BaseRecordAttribute > &rRetVal, const std::string &sName) const |
int | getPersAttribute (BaseRecordAttribute *&prRetVal, const AttributeID &rAttributeID) const |
int | getPersAttribute (std::shared_ptr< BaseRecordAttribute > &rRetVal, const AttributeID &rAttributeID) const |
int | getAllPersAttributes (std::list< BaseRecordAttribute * > &rRetValList, const std::vector< unsigned long > *pClassIdVector=0) const |
int | getAllPersAttributes (std::list< std::shared_ptr< BaseRecordAttribute > > &rRetValList, const std::vector< unsigned long > *pClassIdVector=0) const |
int | getAllPersAttributesSortByName (std::map< std::string, BaseRecordAttribute *, std::less< std::string > > &rRetValMap, const std::vector< unsigned long > *pClassIdVector=0) const |
int | getAllPersAttributesSortByName (std::map< std::string, std::shared_ptr< BaseRecordAttribute >, std::less< std::string > > &rRetValMap, const std::vector< unsigned long > *pClassIdVector=0) const |
int | getAllPersAttributesSortByID (std::map< AttributeID, BaseRecordAttribute *, std::less< AttributeID > > &rRetValMap, const std::vector< unsigned long > *pClassIdVector=0) const |
int | getAllPersAttributesSortByID (std::map< AttributeID, std::shared_ptr< BaseRecordAttribute >, std::less< AttributeID > > &rRetValMap, const std::vector< unsigned long > *pClassIdVector=0) const |
virtual bool | isStored () |
virtual bool | isDeletedInBase () |
virtual int | lock (const LockSpecification &rLockSpecification) |
virtual int | relock (const LockSpecification &rLockSpecification) |
virtual int | unlock (const LockSpecification &rLockSpecification) |
virtual int | isLocked (EnLockMode eLockMode=LK_DELETEvWRITE, EnDeepMode eDeepMode=DM_SHALLOW) const |
virtual int | isLocked (const LockSpecification &rLockSpecification) const |
virtual int | isPossible (bool bRead, bool bWrite, bool bDelete, EnDeepMode eDeepMode=DM_SHALLOW) const |
virtual int | isPossible (const LockPossibleSpecification &rLockPossibleSpec, EnDeepMode eDeepMode=DM_SHALLOW) const |
virtual int | getProcessingPossibilities (LockPossibleSpecification &rLockPossibleSpec, EnDeepMode eDeepMode=DM_SHALLOW) const |
virtual int | setWatch (const WatchSpecification &rWatchSpec) |
virtual int | unsetWatch (const WatchSpecification &rWatchSpec) |
BasePersistent & | operator= (const BasePersistent &rT) |
bool | operator== (const BasePersistent &rT) const |
Comparison operator, all attributes are compared. | |
bool | operator!= (const BasePersistent &rT) const |
Comparison operator, all attributes are compared. | |
Public Member Functions inherited from glo::CallBack | |
CallBack () | |
virtual | ~CallBack () |
virtual void | notify (NotifyNote &rNote) |
CallBack & | operator= (const CallBack &rT) |
bool | operator== (const CallBack &rT) const |
Comparison operator, all attributes are compared. | |
bool | operator!= (const CallBack &rT) const |
Comparison operator, all attributes are compared. | |
Protected Member Functions | |
virtual | ~Persistent () |
virtual void | insertInObjectSpy () const override |
virtual void | removeInObjectSpy () const override |
virtual void | setCreateDate () override |
virtual void | _postAssign (Base &rBase) |
Persistent & | operator= (const Persistent &rT) |
bool | operator== (const Persistent &rT) const |
Comparison operator. | |
bool | operator!= (const Persistent &rT) const |
Comparison operator. | |
Protected Member Functions inherited from glo::BasePersistent | |
virtual | ~BasePersistent () |
void | setSpyaction (bool bSpyaction) |
Protected Member Functions inherited from glo::CallBack | |
CallBack (const CallBack &rT) | |
void | init () |
void | deinit () |
Private Attributes | |
ObjID | m_ObjID |
std::time_t | m_dtCreateDate |
std::time_t | m_dtLastChange |
Additional Inherited Members | |
Public Attributes inherited from glo::CallBack | |
std::string | m_strDebugInfo |
Protected Attributes inherited from glo::BasePersistent | |
Base * | m_pBase |
unsigned int | m_uiReferenceCount |
eut::CriticalSection | m_LocalCriticalSection |
Record * | m_pRecord |
bool | m_bSpyaction |
The base class of the persistent classes. All persistent classes must be derived from this class to be able to process their objects in the database.
Objects of this type have a reference counter and must not be removed from memory using the destructor.
Objects with reference counters may only be instantiated once. When passing to another instance, the reference counter must be incremented using Persistent::remember().
If the owning instance no longer needs the object, the reference counter is decremented via Persistent::forget().
When the reference counter runs to 0, the destructor is called automatically.
This error-prone method can be avoided by using the std::shared_ptr if the Forgetter is passed when instantiating a persistent object.
Example (PersClass is the persistent class):
glo::Persistent::Persistent | ( | ) |
Standard constructor.
|
protectedvirtual |
Destructor, the object removes itself from the PersObjectSpy if inside.
The destructor is not available. The object may only be removed from memory using forget().
glo::Persistent::Persistent | ( | const Persistent & | rT | ) |
Copy constructor. No attributes of this class are copied!
|
protectedvirtual |
Called in BasePersistent::assign( Base & rBase ) if not error there. Used in derived classes to supply attributes of type glo::TOndemand and derived glo::BaseLot with the database.
[in] | rBase | The database in wich the object is stored. |
|
virtual |
Is always called after the fetch from the database.
In derived classes, you can, for example, set pointers to nullptr, set 'non-persistent' variables and/or perform other initializations.
|
overridevirtual |
By means of this method, an object of this class is made known to the database and (if successful) receives a unique ObjID (if not already registered).
Only after this method has been called can an object be saved. A persistent object only needs to be logged on to the database once, before it is saved for the first time. Afterwards it keeps its unique ObjID.
[in] | rBase | The database in which the object is to be stored. |
Reimplemented from glo::BasePersistent.
|
overridevirtual |
The object respectively its persistent attributes are deleted in the database.
Before deleting in the database, the method Persistent::preDeleteInBase(EnDeepMode,void*&) is called, which is given a pointer reference (which can be set in Persistent::preDeleteInBase(EnDeepMode,void*&)) in addition to the glo::EnDeepMode. After deleting or even if not successful. the method Persistent::postDeleteInBase(int,EnDeepMode,void*) is called.
If necessary, Persistent::preDeleteInBase(EnDeepMode,void*&) and Persistent::postDeleteInBase(int,EnDeepMode,void*) can be overwritten.
[in] | eDeepMode | The deleting depth mode. |
Reimplemented from glo::BasePersistent.
|
overridevirtual |
Returns the date of creation in the database.
Implements glo::BasePersistent.
|
virtual |
Returns a pointer to a persistent attribute.
[in] | rAttributeID | The attribute ID of the attribute to be returned. |
eut::ErrorNException | If attribute is not found, an exception is thrown. |
|
virtual |
Returns a pointer to a persistent attribute.
[in] | rstrAttributName | The name of the attribute to be set (e.g. "ClassName.AttributName"). |
eut::ErrorNException | If attribute is not found, an exception is thrown. |
|
overridevirtual |
Returns the own class ID.
Implements glo::BasePersistent.
|
overridevirtual |
Returns the date of the last change in the database.
Implements glo::BasePersistent.
|
overridevirtual |
Reimplemented from glo::BasePersistent.
|
overridevirtual |
Returns the class name.
[in,out] | rsTypeName | The type name. |
Reimplemented from glo::BasePersistent.
|
overrideprotectedvirtual |
Pastes the object into its ObjectSpy.
Implements glo::BasePersistent.
|
virtual |
Checks if passed object can be cast to this.
[in] | pPersistent | Pointer to the object to be checked. |
|
virtual |
Checks if passed object can be cast to this.
[in] | pPersistent | Pointer to the object to be checked. |
|
overridevirtual |
The object is locked in the database for other clients.
Before locking, the Persistent::preLock(EnLockMode,EnDeepMode,void*&) method is called, which is given a pointer reference (which can be set in Persistent::preLock(EnLockMode,EnDeepMode,void*&)). After locking, or even if it fails, the Persistent::postLock(int,EnLockMode,EnDeepMode,void*) method is called.
If necessary, Persistent::preLock(EnLockMode,EnDeepMode,void*&) and Persistent::postLock(int,EnLockMode,EnDeepMode,void*) can be overwritten.
[in] | eLockMode | The lock mode. |
[in] | eDeepMode | The lock depth mode. |
Reimplemented from glo::BasePersistent.
|
protected |
Comparison operator.
[in] | rT | The object to be compared with this one. |
|
protected |
Assignment operator.
[in] | rT | The data is transferred from this object. |
|
protected |
Comparison operator.
[in] | rT | The object to be compared with this one. |
|
virtual |
Is called in Persistent::deleteInBase(EnDeepMode) after deletion in the database or if deletion fails.
[in] | iDeleteErr | Possibly a deleting error, if != 0 the deleteing in Persistent::deleteInBase(EnDeepMode) was not performed. |
[in] | eDeepMode | The deleting depth mode. |
[in] | pData | Data that may ben set in Persistent::preDeleteInBase(EnDeepMode,void**). |
|
virtual |
Called in Persistent::lock(EnLockMode,EnDeepMode) after attempting to lock the object.
[in] | iLockErr | Possibly an error during locking. If !=0 the lock in Persistent::lock(EnLockMode,EnDeepMode) was not performed. |
[in] | eLockMode | The lock mode. |
[in] | eDeepMode | The lock depth mode. |
[in] | pData | Data that may ben set in Persistent::preLock(EnLockMode,EnDeepMode,void**). |
|
virtual |
This method is called in Persistent::refresh() after the attempt to reread the persistent attributes of the object.
[in] | iRefreshErr | Possibly an error during the refresh. If !=0 the refresh in Persistent::refresh() was not performed. |
[in] | pData | Data that may ben set in Persistent::preRefresh(void**). |
|
virtual |
Called in Persistent::lock(EnLockMode,EnDeepMode) after attempting to lock the object.
[in] | iLockErr | Possibly an error during locking. If !=0 the lock in Persistent::lock(EnLockMode,EnDeepMode) was not performed. |
[in] | eLockMode | The lock mode. |
[in] | eDeepMode | The lock depth mode. |
[in] | pData | Data that may ben set in Persistent::preRelock(EnLockMode,EnDeepMode,void**). |
|
virtual |
Is called in Persistent::setWatch(TdWatchNotifyMode,EnDeepMode,CallBack*) after setting the watching.
[in] | iSetWatchErr | Possibly an error when setting the watching. If !=0 the setting of the watching in Persistent::setWatch(TdWatchNotifyMode,EnDeepMode,CallBack*) was not performed. |
[in] | ulWatchMode | The watch mode. |
[in] | eDeepMode | The watching depth mode. |
[in] | pCallBack | The CallBack object that is notified via its method CallBack::notify(NotifyNote&). |
[in] | pData | Data that may ben set in Persistent::preUnlock(EnLockMode,EnDeepMode,void**). |
|
virtual |
Is called in Persistent::store(EnDeepMode) after storing.
[in] | iStoreErr | Possibly a storage error, if != 0 the storing in Persistent::store(EnDeepMode) was not performed. |
[in] | eDeepMode | The storage depth mode. |
[in] | pData | Data that may ben set in Persistent::preStore(EnDeepMode,void**). |
|
virtual |
Called in Persistent::unlock(EnLockMode,EnDeepMode) after attempting to unlock the object.
[in] | iUnlockErr | Possibly an error during unlocking. If !=0 the unlocking in Persistent::unlock(EnLockMode,EnDeepMode) was not performed. |
[in] | eLockMode | The lock mode. |
[in] | eDeepMode | The lock depth mode. |
[in] | pData | Data that may ben set in Persistent::preUnlock(EnLockMode,EnDeepMode,void**). |
|
virtual |
Called in Persistent::unsetWatch(TdWatchNotifyMode,EnDeepMode,CallBack*) after watching is stopped.
[in] | iUnsetWatchErr | Possibly an error when stopping the watching. If !=0 the watching was not stopped in Persistent::unsetWatch(TdWatchNotifyMode,EnDeepMode,CallBack*). |
[in] | ulWatchMode | The original watch mode. |
[in] | eDeepMode | The original watching depth mode. |
[in] | pCallBack | The CallBack object that was notified via its method CallBack::notify(NotifyNote&). |
[in] | pData | Data that may ben set in Persistent::preUnlock(EnLockMode,EnDeepMode,void**). |
|
virtual |
Is called in Persistent::deleteInBase(EnDeepMode) before deleting in the database.
[in] | eDeepMode | The deleting depth mode. |
[in] | prData | This reference can be used to pass data instantiated in this method to Persistent::postDeleteInBase(int,EnDeepMode,void*), which then has to be removed from memory in Persistent::postDeleteInBase(int,EnDeepMode,void*). |
|
virtual |
Is called in Persistent::lock(EnLockMode,EnDeepMode) before the object is locked in the database for other clients.
[in] | eLockMode | The lock mode. |
[in] | eDeepMode | The lock depth mode. |
[in] | prData | This reference can be used to pass data instantiated in this method to Persistent::postLock(int,EnLockMode,EnDeepMode,void*), which then has to be removed from memory in Persistent::postLock(int,EnLockMode,EnDeepMode,void*). |
|
virtual |
Is called in Persistent::refresh() before all persistent attributes of the object are re-read from the database.
[in] | prData | This reference can be used to pass data instantiated in this method to Persistent::postRefresh(int,void*), which then has to be removed from memory in Persistent::postRefresh(int,void*). |
|
virtual |
Is called in Persistent::relock(EnLockMode,EnDeepMode) before the object is relocked in the database for other clients.
[in] | eLockMode | The lock mode. |
[in] | eDeepMode | The lock depth mode. |
[in] | prData | This reference can be used to pass data instantiated in this method to Persistent::postRelock(int,EnLockMode,EnDeepMode,void*), which then has to be removed from memory in Persistent::postRelock(int,EnLockMode,EnDeepMode,void*). |
|
virtual |
Is called in Persistent::setWatch(TdWatchNotifyMode,EnDeepMode,CallBack*) before watching is initiated.
[in] | ulWatchMode | The watch mode. |
[in] | eDeepMode | The watching depth mode. |
[in] | pCallBack | The CallBack object that is notified via its method CallBack::notify(NotifyNote&). |
[in] | prData | This reference can be used to pass data instantiated in this method to Persistent::postSetWatch(int,TdWatchNotifyMode,EnDeepMode,CallBack*,void*), which then has to be removed from memory in Persistent::postSetWatch(int,TdWatchNotifyMode,EnDeepMode,CallBack*,void*). |
|
virtual |
Is called in Persistent::store(EnDeepMode) before storing.
[in] | eDeepMode | The storage depth mode. |
[in] | prData | This reference can be used to pass data instantiated in this method to Persistent::postStore(int,EnDeepMode,void*), which then has to be removed from memory in Persistent::postStore(int,EnDeepMode,void*). |
|
virtual |
Called in Persistent::unLock(EnLockMode,EnDeepMode) before the object in the database is shared with other clients.
[in] | eLockMode | The original lock mode. |
[in] | eDeepMode | The original lock depth mode. |
[in] | prData | This reference can be used to pass data instantiated in this method to Persistent::postUnlock(int,EnLockMode,EnDeepMode,void*), which then has to be removed from memory in Persistent::postUnlock(int,EnLockMode,EnDeepMode,void*). |
|
virtual |
Called in Persistent::unsetWatch(TdWatchNotifyMode,EnDeepMode,CallBack*) before stopping watching.
[in] | ulWatchMode | The original watch mode. |
[in] | eDeepMode | The original watching depth mode. |
[in] | pCallBack | The CallBack object that was notified via its method CallBack::notify(NotifyNote&). |
[in] | prData | This reference can be used to pass data instantiated in this method to Persistent::postUnsetWatch(int,TdWatchNotifyMode,EnDeepMode,CallBack*,void*), which then has to be removed from memory in Persistent::postUnsetWatch(int,TdWatchNotifyMode,EnDeepMode,CallBack*,void*). |
|
overridevirtual |
Reads all persistent attributes of the object from the database again.
The Persistent::preRefresh(void*&) method is called before the refresh, and a pointer reference (which can be set in Persistent::preRefresh(void*&) ) is given to it. After the refresh, or even if it fails, the Persistent::postRefresh(int,void*) method is called.
If necessary, Persistent::preRefresh(void*&) and Persistent::postRefresh(int,void*) can be overwritten.
Reimplemented from glo::BasePersistent.
|
overridevirtual |
This method executes an unlock(const LockSpecification&) and then a lock(const LockSpecification&) of an already locked object, whereby newly referenced objects are also locked, depending on the locking mode, if possible, and previously locked referenced objects are released. If newly referenced objects cannot be locked, the previous locked state is retained.
Before relocking, the Persistent::preRelock(EnLockMode,EnDeepMode,void*&) method is called, which is given a pointer reference (which can be set in Persistent::preRelock(EnLockMode,EnDeepMode,void*&)). After relocking, or even if it fails, the Persistent::postRelock(int,EnLockMode,EnDeepMode,void*) method is called.
If necessary, Persistent::preRelock(EnLockMode,EnDeepMode,void*&) and Persistent::postRelock(int,EnLockMode,EnDeepMode,void*) can be overwritten.
[in] | eLockMode | The lock mode. |
[in] | eDeepMode | The lock depth mode. |
Reimplemented from glo::BasePersistent.
|
overridevirtual |
Removes the reference to the database and removes itself from the PersObjectSpy, if inside.
Reimplemented from glo::BasePersistent.
|
overrideprotectedvirtual |
Removes the object from its ObjectSpy.
Implements glo::BasePersistent.
|
overrideprotectedvirtual |
Sets the creation date to 'now'.
Implements glo::BasePersistent.
|
virtual |
Sets a persistent attribute.
[in] | rAttributeID | The attribute ID of the attribute to be set |
[in] | pPara | The value to be set as void pointer, internally a static_cast is performed! |
|
virtual |
Sets a persistent attribute.
[in] | rstrAttributName | The name of the attribute to be set (e.g. "ClassName.AttributName"). |
[in] | pPara | The value to be set as void pointer, internally a static_cast is performed! |
|
overridevirtual |
The object is monitored in the database.
Before watching the object, the Persistent::preSetWatch(TdWatchNotifyMode,EnDeepMode,CallBack*,void*&) method is called, which is given a pointer reference (which can be set in Persistent::preSetWatch(TdWatchNotifyMode,EnDeepMode,CallBack,void*&)). After the watch request, or even if it fails, the Persistent::postSetWatch(int,TdWatchNotifyMode,EnDeepMode,CallBack*,void*) method is called.
If necessary, Persistent::preSetWatch(TdWatchNotifyMode,EnDeepMode,CallBack*,void*&) and Persistent::postSetWatch(int,TdWatchNotifyMode,EnDeepMode,CallBack*,void*) can be overwritten.
[in] | ulWatchMode | The watch mode. Allowed watch modes:
|
[in] | eDeepMode | The watching depth mode. |
[in] | pCallBack | The CallBack object that is notified via its method CallBack::notify(NotifyNote&). If no CallBack is passed, notify(NotifyNote&) is taken from this; in this case the method notify(NotifyNote&) should be overwritten in the respective derived class. |
Reimplemented from glo::BasePersistent.
|
overridevirtual |
The object respectively its persistent attributes are stored in the database.
Before storing, the method Persistent::preStore(EnDeepMode,void*&) is called, which is given a pointer reference (which can be set in Persistent::preStore(EnDeepMode,void*&)) in addition to the glo::EnDeepMode. After storing or even if not successful. the method Persistent::postStore(int,EnDeepMode,void*) is called.
if necessary, Persistent::preStore(EnDeepMode,void*&) and Persistent::postStore(int,EnDeepMode,void*) can be overwritten.
[in] | eDeepMode | The storage depth mode. |
Reimplemented from glo::BasePersistent.
|
overridevirtual |
Adopts transferred record if unequal to nullptr.
If a valid record is passed, m_dtCreateDate and m_dtLastChange will be taken from the record.
[in] | pRecord | The record to be transferred. |
Reimplemented from glo::BasePersistent.
|
overridevirtual |
The object is released in the database. A lock release must be called with the same parameters as the previous lock call.
Before unlocking the method Persistent::preUnlock(EnLockMode,EnDeepMode,void*&) is called, which is given a pointer reference (which can be set in Persistent::preUnlock(EnLockMode,EnDeepMode,void*&)). After unlocking, or even if its fails, the Persistent::postUnlock(int,EnLockMode,EnDeepMode,void*) method is called.
If necessary, Persistent::preUnlock(EnLockMode,EnDeepMode,void*&) and Persistent::postUnlock(int,EnLockMode,EnDeepMode,void*) can be overwritten.
[in] | eLockMode | The original lock mode. |
[in] | eDeepMode | The original lock depth mode. |
Reimplemented from glo::BasePersistent.
|
overridevirtual |
The monitoring of the object in the database is terminated. A monitoring termination must be called with the same parameters as the previous monitoring.
Before the watching is stopped, the Persistent::preUnsetWatch(TdWatchNotifyMode,EnDeepMode,CallBack*,void*&) method is called, which is given a pointer reference (which can be set in Persistent::preUnsetWatch(TdWatchNotifyMode,EnDeepMode,CallBack,void*&)). After the watching is finished or even if it fails, the Persistent::postUnsetWatch(int,TdWatchNotifyMode,EnDeepMode,CallBack*,void*) method is called.
If necessary, Persistent::preUnsetWatch(TdWatchNotifyMode,EnDeepMode,CallBack*,void*&) and Persistent::postUnsetWatch(int,TdWatchNotifyMode,EnDeepMode,CallBack*,void*) can be overwritten.
[in] | ulWatchMode | The original watch mode. Allowed watch modes:
|
[in] | eDeepMode | The original monitoring depth mode. |
[in] | pCallBack | The CallBack object that was notified via its method CallBack::notify(NotifyNote&). If no CallBack is passed, notify(NotifyNote&) is taken from this; in this case the method notify(NotifyNote&) should be overwritten in the respective derived class. |
Reimplemented from glo::BasePersistent.
|
private |
The creation date is set in a database after a successful login.
|
private |
The last modification date in the database will be set when successfully saved in a database.
|
private |