GlobalObjects
Lade ...
Suche ...
Keine Treffer
GloTableReaderInterface.h
gehe zur Dokumentation dieser Datei
1#ifndef INC_GLOTABLEREADERINTERFACE_H
2#define INC_GLOTABLEREADERINTERFACE_H
3//-----------------------------------------------------------------------------
43//-----------------------------------------------------------------------------
44#include <map>
45#include <unordered_map>
46#include <list>
47#include <vector>
48#include <stack>
49#include "GloTypes.h"
50#include "GloTableInterface.h"
51#include "GloRealIndexPool.h"
53#include "GloTransactionOwner.h"
54//-----------------------------------------------------------------------------
55namespace glo
56{
57 //---------------------------------------------------------------------------
58 /* Forwards */
59 struct ReaderInfo;
61 //---------------------------------------------------------------------------
62 #ifdef _MSC_VER
63 /* 'Bezeichner': Klasse 'Typ' benötigt eine DLL-Schnittstelle, die von... */
64 #pragma warning( disable : 4251 )
65 #endif
66 //---------------------------------------------------------------------------
88 {
89 private:
90 //-----------------------------------------------------------------------
91 // >>>>>>>>>>>>>>> AllSetObjectStrIndexIteratorItem >>>>>>>>>>>>>>>>>>>>>>>
92 //-----------------------------------------------------------------------
110 {
111 public:
112 //============== Attribute
113 //---------------------------------------------------------------------
124 //---------------------------------------------------------------------
134 std::string m_sIndexName;
135 //---------------------------------------------------------------------
136
137 private:
138 //============= De- und Konstruktoren
139 //---------------------------------------------------------------------
150 //---------------------------------------------------------------------
161 //---------------------------------------------------------------------
162
163 public:
164 //============= De- und Konstruktoren
165 //---------------------------------------------------------------------
186 const std::string & m_sIndexName );
187 //---------------------------------------------------------------------
198 //---------------------------------------------------------------------
199
200 //============== Methoden
201 //---------------------------------------------------------------------
216 std::size_t getObjectStrIndexSize() const;
217 //---------------------------------------------------------------------
233 int setCurrentObject( const ObjID & rObjID );
234 //---------------------------------------------------------------------
251 int setPosition( std::size_t nPosition );
252 //---------------------------------------------------------------------
269 bool inObjectStrIndex( const ObjID & rObjID );
270 //---------------------------------------------------------------------
271
272 private:
273 //============== Operatoren
274 //---------------------------------------------------------------------
285 //---------------------------------------------------------------------
286 };
287 //-----------------------------------------------------------------------
288 // <<<<<<<<<<<<<<< AllSetObjectStrIndexIteratorItem <<<<<<<<<<<<<<<<<<<<<<<
289 //-----------------------------------------------------------------------
290
291 private:
292 //============== Attribute
293 //-----------------------------------------------------------------------
304 std::unordered_map< ObjID, Record *, glo::ObjID::HashFunction > m_RecursionRecordMap;
305 //-----------------------------------------------------------------------
325 std::unordered_map< NUM_PTR, IndexPool::TableObjIdIndexIterator * > * m_pAllSetTableObjIdIndexIteratorMap;
326 //-----------------------------------------------------------------------
346 std::unordered_map< NUM_PTR, AllSetObjectStrIndexIteratorItem * > * m_pAllSetObjectStrIndexIteratorMap;
347 //-----------------------------------------------------------------------
367 std::unordered_map< TransactionOwner, TransactionIndexPool *, glo::TransactionOwner::HashFunction > m_pTransactionIndexPools;
368 //-----------------------------------------------------------------------
369
370 protected:
371 //============== Konstruktoren
372 //-----------------------------------------------------------------------
383 //-----------------------------------------------------------------------
384
385 public:
386 //============== De- und Konstruktoren
387 //-----------------------------------------------------------------------
404 RealIndexPool * pRealIndexPool );
405 //-----------------------------------------------------------------------
417 //-----------------------------------------------------------------------
418
419 private:
420 //============== Konstruktoren
421 //-----------------------------------------------------------------------
432 //-----------------------------------------------------------------------
433
434 public:
435 //============== Methoden
436 //-----------------------------------------------------------------------
451 virtual int openTable( const std::string & sTableName );
452 //-----------------------------------------------------------------------
465 //-----------------------------------------------------------------------
492 int setTransactionIndexPool( const TransactionOwner & rCommunicatorWithTreadID,
493 TransactionIndexPool * pTransactionIndexPool );
494 //-----------------------------------------------------------------------
516 TransactionIndexPool * getTransactionIndexPool( const TransactionOwner & rCommunicatorWithTreadID ) const;
517 //-----------------------------------------------------------------------
537 void getAllTransactionIndexPools( std::vector< TransactionIndexPool * > & rTransactionIndexPoolVector ) const;
538 //-----------------------------------------------------------------------
559 //-----------------------------------------------------------------------
593 int openAllSet( const TransactionOwner & rCommunicatorWithTreadID,
594 NUM_PTR ipClientAllSetAddress,
595 unsigned long ulClassID,
596 bool bWithSubClasses );
597 //-----------------------------------------------------------------------
628 int openAllSet( const TransactionOwner & rCommunicatorWithTreadID,
629 NUM_PTR ipClientAllSetAddress,
630 unsigned long ulClassID,
631 const std::string & rsIndexName );
632 //-----------------------------------------------------------------------
652 int isAllSetOpen( NUM_PTR ipClientAllSetAddress ) const;
653 //-----------------------------------------------------------------------
667 int closeAllSet( NUM_PTR ipClientAllSetAddress );
668 //-----------------------------------------------------------------------
707 NUM_PTR ipClientAllSetAddress,
708 EnSeekMode eMode ) const;
709 //-----------------------------------------------------------------------
739 int getIndexedObjIdListFromAllSet( std::vector< glo::ObjID > & rObjIDContainer,
740 NUM_PTR ipClientAllSetAddress,
741 const std::string & rsIndexSearchValue,
742 EnQueryType eQuerryType ) const;
743 //-----------------------------------------------------------------------
772 int getIndexedObjIdListFromAllSet( std::vector< glo::ObjID > & rObjIDContainer,
773 NUM_PTR ipClientAllSetAddress,
774 const std::string & rsIndexSearchValue,
775 EnComparisionOp eComparisionOp ) const;
776 //-----------------------------------------------------------------------
806 int getIndexedObjIdListFromAllSet( std::vector< glo::ObjID > & rObjIDContainer,
807 NUM_PTR ipClientAllSetAddress,
808 const std::string & rsRangeStartIndex,
809 const std::string & rsRangeEndIndex ) const;
810 //-----------------------------------------------------------------------
829 int setFilterInAllSet( NUM_PTR ipClientAllSetAddress,
830 const std::string & rsIndexFilterValue ) const;
831 //-----------------------------------------------------------------------
857 int setFilterInAllSet( NUM_PTR ipClientAllSetAddress,
858 const std::string & rsIndexFilterValue,
859 EnComparisionOp eComparisionOp ) const;
860 //-----------------------------------------------------------------------
886 int setFilterInAllSet( NUM_PTR ipClientAllSetAddress,
887 const std::string & rsRangeStartIndex,
888 const std::string & rsRangeEndIndex ) const;
889 //-----------------------------------------------------------------------
903 int removeFilterInAllSet( NUM_PTR ipClientAllSetAddress ) const;
904 //-----------------------------------------------------------------------
924 int getSizeFromAllSet( std::size_t & rnSize, NUM_PTR ipClientAllSetAddress ) const;
925 //-----------------------------------------------------------------------
947 int setCurrentObjectInAllSet( const ObjID & rObjID,
948 NUM_PTR ipClientAllSetAddress ) const;
949 //-----------------------------------------------------------------------
969 int setPositionInAllSet( std::size_t nPosition,
970 NUM_PTR ipClientAllSetAddress ) const;
971 //-----------------------------------------------------------------------
997 int objIDInAllSet( const ObjID & rObjID,
998 NUM_PTR ipClientAllSetAddress ) const;
999 //-----------------------------------------------------------------------
1017 int getAllObjIDs( std::list<ObjID> & rRetValList );
1018 //-----------------------------------------------------------------------
1038 int getObjIDs( std::list<ObjID> & rRetValList, unsigned long ulClassID );
1039 //-----------------------------------------------------------------------
1059 int getObjIDs( std::map< ObjID, ObjID, std::less<ObjID> > & rRetValMap,
1060 unsigned long ulClassID );
1061 //-----------------------------------------------------------------------
1089 int getRecord( Record *& prRetVal,
1090 const ObjID & rObjID,
1091 ReaderInfo * pReaderInfo );
1092 //-----------------------------------------------------------------------
1117 int getObjectData( Record *& prRetVal,
1118 const ObjID & rObjID,
1119 ReaderInfo * pReaderInfo );
1120 //-----------------------------------------------------------------------
1121
1122 protected:
1123 //============== Methoden
1124 //-----------------------------------------------------------------------
1158 int getObjectData( Record *& prRetVal,
1159 const ObjID & rObjID,
1160 ReaderInfo * pReaderInfo,
1161 bool bInRecursion );
1162 //-----------------------------------------------------------------------
1207 const TransactionOwner & rCommunicatorWithTreadID,
1208 NUM_PTR ipClientAllSetAddress,
1209 unsigned long ulClassID,
1210 bool bWithSubClasses = true );
1211 //-----------------------------------------------------------------------
1251 const TransactionOwner & rCommunicatorWithTreadID,
1252 NUM_PTR ipClientAllSetAddress,
1253 unsigned long ulClassID,
1254 const std::string & rsIndexName );
1255 //-----------------------------------------------------------------------
1276 int getObjIDs( std::list<ObjID> * pRetValList,
1277 std::map< ObjID, ObjID, std::less<ObjID> > * pRetValMap,
1278 unsigned long ulClassID );
1279 //-----------------------------------------------------------------------
1308 int getRecord( Record *& prRetVal,
1309 const std::string & sTableName,
1310 const ObjID & rObjID,
1311 unsigned long ulClassID,
1312 bool bOnlyClassIDTable = false );
1313 //-----------------------------------------------------------------------
1340 int getRecord( Record *& prRetVal,
1341 const ObjID & rObjID,
1342 ClassInfo & rClassInfo,
1343 bool bOnlyClassIDTable = false );
1344 //-----------------------------------------------------------------------
1384 int generateRecord( Record *& prRetVal,
1385 const std::string & sFieldNameRow,
1386 const std::string & sDataRow,
1387 std::streampos StreamPosRow,
1388 const std::string & rsTable,
1389 bool bOnlyClassIDTable = false );
1390 //-----------------------------------------------------------------------
1426 int generateRecord( Record *& prRetVal,
1427 const std::string & sDataRow,
1428 ClassInfo & rClassInfo,
1429 std::streampos StreamPosRow,
1430 bool bOnlyClassIDTable = false );
1431 //-----------------------------------------------------------------------
1461 const ObjID & rObjID,
1462 unsigned long ulClassID,
1463 bool bOnlyClassIDTable = false );
1464 //-----------------------------------------------------------------------
1489 int getObjectDataFromDataRow( std::shared_ptr<Record> & sprRetVal,
1490 const ObjID & rObjID,
1491 unsigned long ulClassID,
1492 bool bOnlyClassIDTable = false );
1493 //-----------------------------------------------------------------------
1494
1495
1496 private:
1497 //============== Methoden
1498 //-----------------------------------------------------------------------
1514 void deleteAllSetTableObjIdIndexIteratorMap( std::unordered_map< NUM_PTR, IndexPool::TableObjIdIndexIterator * > * pMapToDelete );
1515 //-----------------------------------------------------------------------
1531 void deleteAllSetObjectStrIndexIteratorMap( std::unordered_map< NUM_PTR, AllSetObjectStrIndexIteratorItem * > * pMapToDelete );
1532 //-----------------------------------------------------------------------
1533
1534 //============== Operatoren
1535 //-----------------------------------------------------------------------
1545 TableInterface & operator= ( const TableInterface & );
1546 //-----------------------------------------------------------------------
1547 };
1548 //---------------------------------------------------------------------------
1549 #ifdef _MSC_VER
1550 /* 'Bezeichner': Klasse 'Typ' benötigt eine DLL-Schnittstelle, die von... */
1551 #pragma warning( default : 4251 )
1552 #endif
1553 //---------------------------------------------------------------------------
1554} // namespace glo
1555#endif
Header für RealIndexPool
Header für TableInterface und TableInterface::TableInterfaceTable
Header für TransactionIndexPool
Header für TransactionOwner
Für jede Bibliothek, hier 'GlobalObjects' gibt es eine Typen-Datei.
#define __glo_export_dll
Definition GloTypes.h:70
Basisklasse für die einzelnen Attribute eines Record.
Definition GloBaseRecordAttribute.h:116
Diese Klasse beinhaltet alle Informationen um Objekte einer Klasse in einer Datenbank speichern zu kö...
Definition GloClassInfo.h:86
Hat einen Zeiger auf einen ObjectStrIndex und ermöglicht das iterieren durch diesen Index....
Definition GloIndexPool.h:2637
Hat einen Zeiger auf einen TableObjIdIndex und ermöglicht das iterieren durch diesen Index....
Definition GloIndexPool.h:1430
Ein Objekt-ID besteht aus der Klassen-ID, einer Datenbank-ID und der eigentlichen eindeutigen ObjektZ...
Definition GloObjID.h:84
Der reale Index im Gegensatz zum TransactionIndexPool, welcher für jede Transaktion erstellt wird.
Definition GloRealIndexPool.h:69
Objekte dieser Klasse transportieren die Daten von den Tabellen ins persistente Objekt und von diesen...
Definition GloRecord.h:108
Diese Klasse ist die Schnittstelle zu einem GlobalObjects-Schema. Sie beinhaltet alle Klasseninformat...
Definition GloSchemaInterface.h:91
AllSetObjectStrIndexIteratorItem(IndexPool::ObjectStrIndexIterator *pObjectStrIndexIterator, const std::string &m_sIndexName)
std::string m_sIndexName
Definition GloTableReaderInterface.h:134
AllSetObjectStrIndexIteratorItem(const AllSetObjectStrIndexIteratorItem &)
IndexPool::ObjectStrIndexIterator * m_pObjectStrIndexIterator
Definition GloTableReaderInterface.h:123
int setFilterInAllSet(NUM_PTR ipClientAllSetAddress, const std::string &rsRangeStartIndex, const std::string &rsRangeEndIndex) const
std::unordered_map< NUM_PTR, AllSetObjectStrIndexIteratorItem * > * m_pAllSetObjectStrIndexIteratorMap
Definition GloTableReaderInterface.h:346
int getObjIDs(std::map< ObjID, ObjID, std::less< ObjID > > &rRetValMap, unsigned long ulClassID)
int getObjectData(Record *&prRetVal, const ObjID &rObjID, ReaderInfo *pReaderInfo, bool bInRecursion)
int setTransactionIndexPool(const TransactionOwner &rCommunicatorWithTreadID, TransactionIndexPool *pTransactionIndexPool)
TableReaderInterface(const SchemaInterface &rScheme, RealIndexPool *pRealIndexPool)
int getSizeFromAllSet(std::size_t &rnSize, NUM_PTR ipClientAllSetAddress) const
int generateRecord(Record *&prRetVal, const std::string &sFieldNameRow, const std::string &sDataRow, std::streampos StreamPosRow, const std::string &rsTable, bool bOnlyClassIDTable=false)
int getIndexedObjIdListFromAllSet(std::vector< glo::ObjID > &rObjIDContainer, NUM_PTR ipClientAllSetAddress, const std::string &rsIndexSearchValue, EnComparisionOp eComparisionOp) const
int setFilterInAllSet(NUM_PTR ipClientAllSetAddress, const std::string &rsIndexFilterValue) const
int removeFilterInAllSet(NUM_PTR ipClientAllSetAddress) const
int getObjIdFromAllSet(ObjID &rObjID, NUM_PTR ipClientAllSetAddress, EnSeekMode eMode) const
int getRecord(Record *&prRetVal, const ObjID &rObjID, ClassInfo &rClassInfo, bool bOnlyClassIDTable=false)
int setFilterInAllSet(NUM_PTR ipClientAllSetAddress, const std::string &rsIndexFilterValue, EnComparisionOp eComparisionOp) const
std::unordered_map< TransactionOwner, TransactionIndexPool *, glo::TransactionOwner::HashFunction > m_pTransactionIndexPools
Definition GloTableReaderInterface.h:367
int isAllSetOpen(NUM_PTR ipClientAllSetAddress) const
int setCurrentObjectInAllSet(const ObjID &rObjID, NUM_PTR ipClientAllSetAddress) const
std::unordered_map< NUM_PTR, IndexPool::TableObjIdIndexIterator * > * m_pAllSetTableObjIdIndexIteratorMap
Definition GloTableReaderInterface.h:325
void deleteAllSetTableObjIdIndexIteratorMap(std::unordered_map< NUM_PTR, IndexPool::TableObjIdIndexIterator * > *pMapToDelete)
int closeAllSet(NUM_PTR ipClientAllSetAddress)
int getObjectDataFromDataRow(Record *&prRetVal, const ObjID &rObjID, unsigned long ulClassID, bool bOnlyClassIDTable=false)
int getObjIDs(std::list< ObjID > *pRetValList, std::map< ObjID, ObjID, std::less< ObjID > > *pRetValMap, unsigned long ulClassID)
RealIndexPool * getRealIndexPool() const
void getAllTransactionIndexPools(std::vector< TransactionIndexPool * > &rTransactionIndexPoolVector) const
int objIDInAllSet(const ObjID &rObjID, NUM_PTR ipClientAllSetAddress) const
int openAllSet(const TransactionOwner &rCommunicatorWithTreadID, NUM_PTR ipClientAllSetAddress, unsigned long ulClassID, bool bWithSubClasses)
int getAllObjIDs(std::list< ObjID > &rRetValList)
int setPositionInAllSet(std::size_t nPosition, NUM_PTR ipClientAllSetAddress) const
int getObjectDataFromDataRow(std::shared_ptr< Record > &sprRetVal, const ObjID &rObjID, unsigned long ulClassID, bool bOnlyClassIDTable=false)
int getIndexedObjIdListFromAllSet(std::vector< glo::ObjID > &rObjIDContainer, NUM_PTR ipClientAllSetAddress, const std::string &rsIndexSearchValue, EnQueryType eQuerryType) const
std::unordered_map< ObjID, Record *, glo::ObjID::HashFunction > m_RecursionRecordMap
Definition GloTableReaderInterface.h:304
virtual int openTable(const std::string &sTableName)
int getRecord(Record *&prRetVal, const std::string &sTableName, const ObjID &rObjID, unsigned long ulClassID, bool bOnlyClassIDTable=false)
IndexPool::ObjectStrIndexIterator * openAllSet(int &riErr, const TransactionOwner &rCommunicatorWithTreadID, NUM_PTR ipClientAllSetAddress, unsigned long ulClassID, const std::string &rsIndexName)
int getObjectData(Record *&prRetVal, const ObjID &rObjID, ReaderInfo *pReaderInfo)
IndexPool::TableObjIdIndexIterator * openAllSet(int &riErr, const TransactionOwner &rCommunicatorWithTreadID, NUM_PTR ipClientAllSetAddress, unsigned long ulClassID, bool bWithSubClasses=true)
int openAllSet(const TransactionOwner &rCommunicatorWithTreadID, NUM_PTR ipClientAllSetAddress, unsigned long ulClassID, const std::string &rsIndexName)
TableReaderInterface(const TableReaderInterface &)
int getIndexedObjIdListFromAllSet(std::vector< glo::ObjID > &rObjIDContainer, NUM_PTR ipClientAllSetAddress, const std::string &rsRangeStartIndex, const std::string &rsRangeEndIndex) const
TransactionIndexPool * getTransactionIndexPool(const TransactionOwner &rCommunicatorWithTreadID) const
int getObjIDs(std::list< ObjID > &rRetValList, unsigned long ulClassID)
int getRecord(Record *&prRetVal, const ObjID &rObjID, ReaderInfo *pReaderInfo)
int generateRecord(Record *&prRetVal, const std::string &sDataRow, ClassInfo &rClassInfo, std::streampos StreamPosRow, bool bOnlyClassIDTable=false)
void deleteAllSetObjectStrIndexIteratorMap(std::unordered_map< NUM_PTR, AllSetObjectStrIndexIteratorItem * > *pMapToDelete)
Dieser Index wird in jeder Transaktion generiert und die Änderungen wie speichern,...
Definition GloTransactionIndexPool.h:66
Um Transaktionen nicht nur einem glo::Communicator zur Verfügung zu stellen, sondern auch einzelnen T...
Definition GloTransactionOwner.h:81
Definition GloAbstractBaseLot.h:49
EnComparisionOp
Definition GloTypes.h:1567
EnSeekMode
Definition GloTypes.h:173
EnQueryType
Definition GloTypes.h:1164
Objekte dieser Struktur transportieren Daten zu Objekten des Typs TableReaderInterface.
Definition GloReaderWriterInfo.h:119