BankAndCustomer
|
The base class of a reference attribute from persistent objects to other persistent objects in the database. More...
#include <GloReference.h>
Public Member Functions | |
Reference () | |
Reference (const ObjID &rObjID) | |
Reference (Base &rBase) | |
Reference (unsigned long ulDatabaseID) | |
Reference (const ObjID &rObjID, Base &rBase) | |
Reference (const ObjID &rObjID, unsigned long ulDatabaseID) | |
Reference (const Reference &rT) | |
virtual | ~Reference () |
virtual int | setBase (Base *pBase) override |
virtual Base * | getBase () const override |
virtual int | getTypeAsString (std::string &rsTypeName) override |
bool | isNULL () const |
void | setNULL () |
ObjID | getObjID () const |
const ObjID * | getObjIDAsPointer () const |
virtual int | setReference (const ObjID &rObjID) |
int | setReference (const BasePersistent *pObj) |
int | setReference (const BasePersistent &rObj) |
int | getReference (BasePersistent *&prRetVal) |
int | getReference (std::shared_ptr< BasePersistent > &sprRetVal) |
virtual int | deleteInBase (EnDeepMode eDeepMode=DM_SHALLOW) |
virtual int | lock (EnLockMode eLockMode=LK_DELETEvWRITE, EnDeepMode eDeepMode=DM_SHALLOW) const |
virtual int | lock (const LockSpecification &rLockSpecification) const |
virtual int | unlock (EnLockMode eLockMode=LK_DELETEvWRITE, EnDeepMode eDeepMode=DM_SHALLOW) const |
virtual int | unlock (const LockSpecification &rLockSpecification) const |
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 | setWatch (TdWatchNotifyMode ulWatchMode, EnDeepMode eDeepMode, CallBack *pCallBack=0) const |
virtual int | setWatch (const WatchSpecification &rWatchSpec) const |
virtual int | unsetWatch (TdWatchNotifyMode ulWatchMode, EnDeepMode eDeepMode, CallBack *pCallBack) const |
virtual int | unsetWatch (const WatchSpecification &rWatchSpec) const |
Reference & | operator= (const Reference &rT) |
bool | operator== (const Reference &rT) const |
Comparison operator. | |
bool | operator!= (const Reference &rT) const |
Comparison operator. | |
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. | |
Private Attributes | |
unsigned long | m_ulDatabaseID |
ObjID | m_RefObjID |
Friends | |
class | ObjectMaker |
class | OndemandLot |
class | OndemandList |
class | OndemandSet |
class | TableReaderInterface |
class | BaseAllSet |
class | Base |
class | OdRefRecordAttribute |
Additional Inherited Members | |
Public Attributes inherited from glo::CallBack | |
std::string | m_strDebugInfo |
Protected Member Functions inherited from glo::CallBack | |
CallBack (const CallBack &rT) | |
void | init () |
void | deinit () |
The base class of a reference attribute from persistent objects to other persistent objects in the database.
glo::Reference::Reference | ( | ) |
Standard constructor.
glo::Reference::Reference | ( | const ObjID & | rObjID | ) |
Constructor with parameter passing.
[in] | rObjID | The object ID of the object to be referenced can be specified during creation. |
glo::Reference::Reference | ( | Base & | rBase | ) |
Constructor with parameter passing.
[in] | rBase | The authoritative database can be specified during the creation. |
glo::Reference::Reference | ( | unsigned long | ulDatabaseID | ) |
Constructor with parameter passing.
[in] | ulDatabaseID | The authoritative database id can be specified during the creation. |
Constructor with parameter passing.
[in] | rObjID | The object ID of the object to be referenced and... |
[in] | rBase | ...the relevant database can be specified during creation. |
eut::ErrorNException | If the database IDs of the passed object ID and the database do not match, an exception is thrown. |
glo::Reference::Reference | ( | const ObjID & | rObjID, |
unsigned long | ulDatabaseID ) |
Constructor with parameter passing.
[in] | rObjID | The object ID of the object to be referenced and... |
[in] | ulDatabaseID | ...the relevant database id can be specified during creation. |
eut::ErrorNException | If the database IDs of the passed object ID and the database do not match, an exception is thrown. |
glo::Reference::Reference | ( | const Reference & | rT | ) |
Copy constructor.
[in] | rT | The data is copied from this object. |
|
virtual |
Destructor.
|
virtual |
Referenced object is deleted from the database.
[in] | eDeepMode | The Deep Mode |
|
overridevirtual |
Reimplemented from glo::CallBack.
ObjID glo::Reference::getObjID | ( | ) | const |
Returns the object ID of the reference.
const ObjID * glo::Reference::getObjIDAsPointer | ( | ) | const |
Returns the object ID of the reference as pointer.
int glo::Reference::getReference | ( | BasePersistent *& | prRetVal | ) |
Returns the referenced object from the database (or from memory if already loaded).
[in,out] | prRetVal | The referenced object. |
int glo::Reference::getReference | ( | std::shared_ptr< BasePersistent > & | sprRetVal | ) |
Returns the referenced object from the database (or from memory if already loaded).
[in,out] | sprRetVal | The referenced object. |
|
overridevirtual |
Returns the type of the reference, i.e. the class name as string when connected to the database.
[in,out] | rsTypeName | The type name. |
Reimplemented from glo::CallBack.
|
virtual |
Checks if referenced object is locked in the database with the passed parameters.
[in] | rLockSpecification | The lock and lock depth mode. |
|
virtual |
Checks if referenced object is locked in the database with the passed parameters.
[in] | eLockMode | The lock mode. |
[in] | eDeepMode | The lock depth mode. |
bool glo::Reference::isNULL | ( | ) | const |
Checks if the reference is formally valid.
|
virtual |
Checks the allowed actions for the referenced object in the database.
[in] | bRead | If true, the read permission is checked. |
[in] | bWrite | If true, the write permission is checked. |
[in] | bDelete | If true, a check is made for delete permissions. |
[in] | eDeepMode | The depth mode for which it is checked. |
|
virtual |
Checks the allowed actions for the referenced object in the database.
[in] | rLockPossibleSpec | The possibility request. |
[in] | eDeepMode | The depth mode for which it is checked. |
|
virtual |
The referenced object is locked in the database for other clients.
[in] | rLockSpecification | The lock- and lock depth mode. |
|
virtual |
The referenced object is locked in the database for other clients.
[in] | eLockMode | The lock mode. |
[in] | eDeepMode | The lock depth mode. |
bool glo::Reference::operator!= | ( | const Reference & | rT | ) | const |
Comparison operator.
[in] | rT | The object to be compared with this one. |
Assignment operator.
[in] | rT | The data is transferred from this object. |
bool glo::Reference::operator== | ( | const Reference & | rT | ) | const |
Comparison operator.
[in] | rT | The object to be compared with this one. |
|
overridevirtual |
Sets the pointer to the database.
[in] | pBase | Pointer to the database. |
Reimplemented from glo::CallBack.
void glo::Reference::setNULL | ( | ) |
Sets the reference to formally invalid.
int glo::Reference::setReference | ( | const BasePersistent & | rObj | ) |
Adopts the object ID of the passed object as reference. Both objects, this and the object to be referenced must be logged on to the same database.
[in] | rObj | The object ID of the object to be referenced. |
int glo::Reference::setReference | ( | const BasePersistent * | pObj | ) |
Adopts the object ID of the passed object as reference. Both objects, this and the object to be referenced must be logged on to the same database.
[in] | pObj | The object ID of the object to be referenced. |
|
virtual |
Adopts the object ID.
[in] | rObjID | The object ID of the object to be referenced. |
Reimplemented in glo::TOndemand< T >.
|
virtual |
The referenced object is monitored in the database.
[in] | rWatchSpec | The monitoring specification. |
|
virtual |
The referenced object is monitored in the database.
[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. |
|
virtual |
The referenced object is released in the database. A lock release must be called with the same parameters as the previous lock call.
[in] | rLockSpecification | The original lock and lock depth mode. |
|
virtual |
The referenced object is released in the database. A lock release must be called with the same parameters as the previous lock call.
[in] | eLockMode | The original lock mode. |
[in] | eDeepMode | The original lock depth mode. |
|
virtual |
The monitoring of the referenced object in the database is terminated. A monitoring termination must be called with the same parameters as the previous monitoring.
[in] | rWatchSpec | The original monitoring specification. |
|
virtual |
The monitoring of the referenced object in the database is terminated. A monitoring termination must be called with the same parameters as the previous monitoring.
[in] | ulWatchMode | The original watch mode. Allowed watch modes:
|
[in] | eDeepMode | The original monitoring 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. |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
private |
The reference to a persistent object as object ID.
|
private |
The reference to a database via the database ID.