GlobalObjects
Loading...
Searching...
No Matches
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"
49#include <memory>
50//-----------------------------------------------------------------------------
51namespace glo
52{
53 //---------------------------------------------------------------------------
54 /* Forwards */
55 class BasePersistent;
56 //---------------------------------------------------------------------------
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 //-----------------------------------------------------------------------
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 for CallBack
Header for LockSpecification
Header for ObjID
For each library, here 'GlobalObjects' there is a type file.
#define __glo_export_dll
Definition GloTypes.h:70
Header for WatchSpecification
Is the base class of template AllSets and the generic AllSet.
Definition GloBaseAllSet.h:87
Definition GloBase.h:263
Abstract base class for Persistent and the generic GenericPersistent.
Definition GloBasePersistent.h:124
Superclass for the classes that are 'connected' to a Base.
Definition GloCallBack.h:81
To be able to lock objects, the 'lock mode' and the 'lock depth' are required as parameters....
Definition GloLockSpecification.h:65
An object ID consists of the class ID, a database ID and the actual unique object number (all unsigne...
Definition GloObjID.h:84
This class can instantiate a persistent object from a record or fill a persistent object and vice ver...
Definition GloObjectMaker.h:70
Class for the on-demand reference attributes of a Record. Represents an attribute of type 'TOndemand<...
Definition GloOdRefRecordAttribute.h:70
Is the base class of Template-Ondemand-List. The objects are managed in a std::list....
Definition GloOndemandList.h:73
Is the abstract base class of on-demand sets and lists.
Definition GloOndemandLot.h:69
Is the base class of Template-Ondemand-Set. Objects can be inserted only once.
Definition GloOndemandSet.h:71
The base class of a reference attribute from persistent objects to other persistent objects in the da...
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
An object of this class accesses tables and reads data records (Record) and binary files (eut::Blob).
Definition GloTableReaderInterface.h:87
To be able to watch objects, the 'watching mode', the 'watching depth' and the 'notification object' ...
Definition GloWatchSpecification.h:67
Definition GloAbstractBaseLot.h:49
EnDeepMode
Definition GloTypes.h:254
EnLockMode
Definition GloTypes.h:1055
unsigned long TdWatchNotifyMode
Definition GloTypes.h:558
Permitted actions in the database such as read, write and delete can be queried for an object....
Definition GloTypes.h:1256