BankAndCustomer
All Classes Namespaces Files Functions Variables Typedefs Friends Macros Pages
GloReference.h
Go to the documentation of this file.
1#ifndef INC_GLOREFERENCE_H
2#define INC_GLOREFERENCE_H
3//-----------------------------------------------------------------------------
43//-----------------------------------------------------------------------------
44#include "GloTypes.h"
45#include "GloCallBack.h"
46#include "GloObjID.h"
47#include "GloLockSpecification.h"
48#include "GloWatchSpecification.h"
49#include <memory>
50//-----------------------------------------------------------------------------
51namespace glo
52{
53 //---------------------------------------------------------------------------
54 /* Forwards */
55 class BasePersistent;
56 //---------------------------------------------------------------------------
71 class __glo_export_dll Reference : public CallBack
72 {
73 private:
74 //============== Friends
75 //-----------------------------------------------------------------------
76 friend class ObjectMaker;
77 friend class OndemandLot;
78 friend class OndemandList;
79 friend class OndemandSet;
81 friend class BaseAllSet;
82 friend class Base;
84 //-----------------------------------------------------------------------
85
86 //============== Attribute
87 //-----------------------------------------------------------------------
98 //-----------------------------------------------------------------------
99
100 public:
101 //============== de- contructors
102 //-----------------------------------------------------------------------
113 //-----------------------------------------------------------------------
127 Reference( const ObjID & rObjID );
128 //-----------------------------------------------------------------------
140 Reference( const Reference & rT );
141 //-----------------------------------------------------------------------
151 virtual ~Reference();
152 //-----------------------------------------------------------------------
153
154 //============== Methoden
155 //-----------------------------------------------------------------------
170 virtual Base * getBase() const override;
171 //-----------------------------------------------------------------------
187 virtual int getTypeAsString( std::string & rsTypeName ) override;
188 //-----------------------------------------------------------------------
200 bool isNULL() const;
201 //-----------------------------------------------------------------------
211 void setNULL();
212 //-----------------------------------------------------------------------
225 //-----------------------------------------------------------------------
237 const ObjID * getObjIDAsPointer() const;
238 //-----------------------------------------------------------------------
252 virtual int set( const ObjID & rObjID );
253 //-----------------------------------------------------------------------
270 virtual int set( const BasePersistent * pObj );
271 //-----------------------------------------------------------------------
288 virtual int set( const BasePersistent & rObj );
289 //-----------------------------------------------------------------------
317 //-----------------------------------------------------------------------
333 int getBasePersistent( std::shared_ptr<BasePersistent> & rspRetVal );
334 //-----------------------------------------------------------------------
348 virtual int deleteInBase( EnDeepMode eDeepMode = DM_SHALLOW );
349 //-----------------------------------------------------------------------
373 virtual int lock( EnLockMode eLockMode = LK_DELETEvWRITE,
374 EnDeepMode eDeepMode = DM_SHALLOW ) const;
375 //-----------------------------------------------------------------------
397 virtual int lock( const LockSpecification & rLockSpecification ) const;
398 //-----------------------------------------------------------------------
425 virtual int unlock( EnLockMode eLockMode = LK_DELETEvWRITE,
426 EnDeepMode eDeepMode = DM_SHALLOW ) const;
427 //-----------------------------------------------------------------------
452 virtual int unlock( const LockSpecification & rLockSpecification ) const;
453 //-----------------------------------------------------------------------
476 virtual int isLocked( EnLockMode eLockMode = LK_DELETEvWRITE,
477 EnDeepMode eDeepMode = DM_SHALLOW ) const;
478 //-----------------------------------------------------------------------
498 virtual int isLocked( const LockSpecification & rLockSpecification ) const;
499 //-----------------------------------------------------------------------
523 virtual int isPossible( bool bRead,
524 bool bWrite,
525 bool bDelete,
526 EnDeepMode eDeepMode = DM_SHALLOW ) const;
527 //-----------------------------------------------------------------------
547 virtual int isPossible( const LockPossibleSpecification & rLockPossibleSpec,
548 EnDeepMode eDeepMode = DM_SHALLOW ) const;
549 //-----------------------------------------------------------------------
600 virtual int setWatch( TdWatchNotifyMode ulWatchMode,
601 EnDeepMode eDeepMode,
602 CallBack * pCallBack = 0 ) const;
603 //-----------------------------------------------------------------------
626 virtual int setWatch( const WatchSpecification & rWatchSpec ) const;
627 //-----------------------------------------------------------------------
678 virtual int unsetWatch( TdWatchNotifyMode ulWatchMode,
679 EnDeepMode eDeepMode,
680 CallBack * pCallBack ) const;
681 //-----------------------------------------------------------------------
707 virtual int unsetWatch( const WatchSpecification & rWatchSpec ) const;
708 //-----------------------------------------------------------------------
709
710 //============== Operatoren
711 //-----------------------------------------------------------------------
723 Reference & operator= ( const Reference & rT );
724 //-----------------------------------------------------------------------
726
737 bool operator== ( const Reference & rT ) const;
738 bool operator!= ( const Reference & rT ) const;
740 //-----------------------------------------------------------------------
741 };
742 //---------------------------------------------------------------------------
743} // namespace glo
744#endif
Header for CallBack
Header for ObjID
Abstract base class for Persistent and the generic GenericPersistent.
Definition GloBasePersistent.h:124
An object ID consists of the class ID, a database ID and the actual unique object number (all unsigne...
Definition GloObjID.h:84
virtual int unsetWatch(TdWatchNotifyMode ulWatchMode, EnDeepMode eDeepMode, CallBack *pCallBack) const
virtual int set(const BasePersistent &rObj)
friend class OndemandSet
Definition GloReference.h:79
int getBasePersistent(BasePersistent *&prRetVal)
virtual int setWatch(TdWatchNotifyMode ulWatchMode, EnDeepMode eDeepMode, CallBack *pCallBack=0) const
friend class OdRefRecordAttribute
Definition GloReference.h:83
virtual int lock(const LockSpecification &rLockSpecification) const
virtual int unsetWatch(const WatchSpecification &rWatchSpec) const
virtual int isLocked(EnLockMode eLockMode=LK_DELETEvWRITE, EnDeepMode eDeepMode=DM_SHALLOW) const
virtual int isLocked(const LockSpecification &rLockSpecification) const
Reference(const Reference &rT)
virtual int set(const BasePersistent *pObj)
virtual int set(const ObjID &rObjID)
virtual int setWatch(const WatchSpecification &rWatchSpec) const
virtual int getTypeAsString(std::string &rsTypeName) override
virtual int isPossible(bool bRead, bool bWrite, bool bDelete, EnDeepMode eDeepMode=DM_SHALLOW) const
virtual Base * getBase() const override
Reference(const ObjID &rObjID)
friend class ObjectMaker
Definition GloReference.h:76
virtual int lock(EnLockMode eLockMode=LK_DELETEvWRITE, EnDeepMode eDeepMode=DM_SHALLOW) const
friend class OndemandList
Definition GloReference.h:78
virtual int isPossible(const LockPossibleSpecification &rLockPossibleSpec, EnDeepMode eDeepMode=DM_SHALLOW) const
friend class Base
Definition GloReference.h:82
virtual ~Reference()
friend class OndemandLot
Definition GloReference.h:77
friend class TableReaderInterface
Definition GloReference.h:80
ObjID getObjID() const
virtual int deleteInBase(EnDeepMode eDeepMode=DM_SHALLOW)
bool isNULL() const
friend class BaseAllSet
Definition GloReference.h:81
ObjID m_RefObjID
Definition GloReference.h:97
const ObjID * getObjIDAsPointer() const
int getBasePersistent(std::shared_ptr< BasePersistent > &rspRetVal)
virtual int unlock(EnLockMode eLockMode=LK_DELETEvWRITE, EnDeepMode eDeepMode=DM_SHALLOW) const
virtual int unlock(const LockSpecification &rLockSpecification) const
Definition GloBasePersistent.h:60