BankAndCustomer
Lade ...
Suche ...
Keine Treffer
GloReference.h
gehe zur Dokumentation dieser Datei
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;
80 friend class TableReaderInterface;
81 friend class BaseAllSet;
82 friend class Base;
83 friend class OdRefRecordAttribute;
84 //-----------------------------------------------------------------------
85
86 //============== Attribute
87 //-----------------------------------------------------------------------
97 unsigned long m_ulDatabaseID;
98 //-----------------------------------------------------------------------
109 //-----------------------------------------------------------------------
110
111 public:
112 //============== de- contructors
113 //-----------------------------------------------------------------------
124 //-----------------------------------------------------------------------
138 Reference( const ObjID & rObjID );
139 //-----------------------------------------------------------------------
153 Reference( Base & rBase );
154 //-----------------------------------------------------------------------
168 Reference( unsigned long ulDatabaseID );
169 //-----------------------------------------------------------------------
190 Reference( const ObjID & rObjID, Base & rBase );
191 //-----------------------------------------------------------------------
213 Reference( const ObjID & rObjID, unsigned long ulDatabaseID );
214 //-----------------------------------------------------------------------
226 Reference( const Reference & rT );
227 //-----------------------------------------------------------------------
237 virtual ~Reference();
238 //-----------------------------------------------------------------------
239
240 //============== Methoden
241 //-----------------------------------------------------------------------
262 virtual int setBase( Base * pBase ) override;
263 //-----------------------------------------------------------------------
278 virtual Base * getBase() const override;
279 //-----------------------------------------------------------------------
295 virtual int getTypeAsString( std::string & rsTypeName ) override;
296 //-----------------------------------------------------------------------
308 bool isNULL() const;
309 //-----------------------------------------------------------------------
319 void setNULL();
320 //-----------------------------------------------------------------------
333 //-----------------------------------------------------------------------
345 const ObjID * getObjIDAsPointer() const;
346 //-----------------------------------------------------------------------
360 virtual int setReference( const ObjID & rObjID );
361 //-----------------------------------------------------------------------
378 int setReference( const BasePersistent * pObj );
379 //-----------------------------------------------------------------------
396 int setReference( const BasePersistent & rObj );
397 //-----------------------------------------------------------------------
424 int getReference( BasePersistent *& prRetVal );
425 //-----------------------------------------------------------------------
441 int getReference( std::shared_ptr<BasePersistent> & sprRetVal );
442 //-----------------------------------------------------------------------
456 virtual int deleteInBase( EnDeepMode eDeepMode = DM_SHALLOW );
457 //-----------------------------------------------------------------------
481 virtual int lock( EnLockMode eLockMode = LK_DELETEvWRITE,
482 EnDeepMode eDeepMode = DM_SHALLOW ) const;
483 //-----------------------------------------------------------------------
505 virtual int lock( const LockSpecification & rLockSpecification ) const;
506 //-----------------------------------------------------------------------
533 virtual int unlock( EnLockMode eLockMode = LK_DELETEvWRITE,
534 EnDeepMode eDeepMode = DM_SHALLOW ) const;
535 //-----------------------------------------------------------------------
560 virtual int unlock( const LockSpecification & rLockSpecification ) const;
561 //-----------------------------------------------------------------------
584 virtual int isLocked( EnLockMode eLockMode = LK_DELETEvWRITE,
585 EnDeepMode eDeepMode = DM_SHALLOW ) const;
586 //-----------------------------------------------------------------------
606 virtual int isLocked( const LockSpecification & rLockSpecification ) const;
607 //-----------------------------------------------------------------------
631 virtual int isPossible( bool bRead,
632 bool bWrite,
633 bool bDelete,
634 EnDeepMode eDeepMode = DM_SHALLOW ) const;
635 //-----------------------------------------------------------------------
655 virtual int isPossible( const LockPossibleSpecification & rLockPossibleSpec,
656 EnDeepMode eDeepMode = DM_SHALLOW ) const;
657 //-----------------------------------------------------------------------
708 virtual int setWatch( TdWatchNotifyMode ulWatchMode,
709 EnDeepMode eDeepMode,
710 CallBack * pCallBack = 0 ) const;
711 //-----------------------------------------------------------------------
734 virtual int setWatch( const WatchSpecification & rWatchSpec ) const;
735 //-----------------------------------------------------------------------
786 virtual int unsetWatch( TdWatchNotifyMode ulWatchMode,
787 EnDeepMode eDeepMode,
788 CallBack * pCallBack ) const;
789 //-----------------------------------------------------------------------
815 virtual int unsetWatch( const WatchSpecification & rWatchSpec ) const;
816 //-----------------------------------------------------------------------
817
818 //============== Operatoren
819 //-----------------------------------------------------------------------
831 Reference & operator= ( const Reference & rT );
832 //-----------------------------------------------------------------------
834
845 bool operator== ( const Reference & rT ) const;
846 bool operator!= ( const Reference & rT ) const;
848 //-----------------------------------------------------------------------
849 };
850 //---------------------------------------------------------------------------
851} // namespace glo
852#endif
Header für CallBack
Header für ObjID
Ist die Basisklasse von Template-AllSets und dem generischen AllSet.
Definition GloBaseAllSet.h:87
Abstrakte Basisklasse für Persistent und die generische GenericPersistent.
Definition GloBasePersistent.h:124
Oberklasse für die Klassen, welche mit einer Base 'verbunden' sind.
Definition GloCallBack.h:81
Ein Objekt-ID besteht aus der Klassen-ID, einer Datenbank-ID und der eigentlichen eindeutigen ObjektZ...
Definition GloObjID.h:84
Die Basisklasse eines Referenz-Attributs von persistenten Objekten auf andere persistente Objekte in ...
Definition GloReference.h:72
virtual int unsetWatch(TdWatchNotifyMode ulWatchMode, EnDeepMode eDeepMode, CallBack *pCallBack) const
virtual int setWatch(TdWatchNotifyMode ulWatchMode, EnDeepMode eDeepMode, CallBack *pCallBack=0) const
virtual int lock(const LockSpecification &rLockSpecification) const
virtual int unsetWatch(const WatchSpecification &rWatchSpec) const
virtual int setReference(const ObjID &rObjID)
int getReference(std::shared_ptr< BasePersistent > &sprRetVal)
int getReference(BasePersistent *&prRetVal)
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 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
int setReference(const BasePersistent *pObj)
int setReference(const BasePersistent &rObj)
virtual Base * getBase() const override
virtual int setBase(Base *pBase) override
Reference(unsigned long ulDatabaseID)
Reference(const ObjID &rObjID)
virtual int lock(EnLockMode eLockMode=LK_DELETEvWRITE, EnDeepMode eDeepMode=DM_SHALLOW) const
virtual int isPossible(const LockPossibleSpecification &rLockPossibleSpec, EnDeepMode eDeepMode=DM_SHALLOW) const
virtual ~Reference()
Reference(Base &rBase)
ObjID getObjID() const
virtual int deleteInBase(EnDeepMode eDeepMode=DM_SHALLOW)
bool isNULL() const
unsigned long m_ulDatabaseID
Definition GloReference.h:97
ObjID m_RefObjID
Definition GloReference.h:108
Reference(const ObjID &rObjID, unsigned long ulDatabaseID)
const ObjID * getObjIDAsPointer() const
Reference(const ObjID &rObjID, Base &rBase)
virtual int unlock(EnLockMode eLockMode=LK_DELETEvWRITE, EnDeepMode eDeepMode=DM_SHALLOW) const
virtual int unlock(const LockSpecification &rLockSpecification) const
Definition GloBasePersistent.h:60